Coding

Find Resp name based on given Concurrent Program Name

SELECT *
FROM fnd_responsibility_tl
WHERE responsibility_id IN (
SELECT responsibility_id
FROM fnd_responsibility
WHERE request_group_id IN (
SELECT request_group_id
FROM fnd_request_group_units
WHERE request_unit_id IN (
SELECT concurrent_program_id
FROM fnd_concurrent_programs_vl
WHERE user_concurrent_program_name =
'Trianz(QMG) Time Entry Report')))


Set Org id in R12

begin
mo_global.SET_POLICY_CONTEXT('S',143);
END;

Apps Initialize through backend

begin
fnd_global.APPS_INITIALIZE( 1039,50266,700);
END;
1-> user id
2-> resp id
3-> application id

Create user and add resp to that user from backend

1. You will be allocated System Administrator resp by using this script.
2. The password will be set to oracle
3. You need apps password to run this script. Alternately you need execute permission on fnd_user_pkg from the user where this script will be run. If using some other user, please use apps.fnd_user_pkg.createuser
4. You need to do a COMMIT after this script has run.
5. When running this script, you will be prompted to enter a user name.
--------Beging of script--------------
DECLARE
  v_session_id INTEGER := userenv('sessionid');
  v_user_name  VARCHAR2(30) := upper('&Enter_User_Name');
BEGIN
  --Note, can be executed only when you have apps password.
  -- Call the procedure to Creaet FND User
  fnd_user_pkg.createuser(x_user_name                  => v_user_name
    ,x_owner                      => ''
    ,x_unencrypted_password       => 'oracle'
    ,x_session_number             => v_session_id
    ,x_start_date                 => SYSDATE - 10
    ,x_end_date                   => SYSDATE + 100
    ,x_last_logon_date            => SYSDATE - 10
    ,x_description                => 'appstechnical.blogspot.com'
    ,x_password_date              => SYSDATE - 10
    ,x_password_accesses_left     => 10000
    ,x_password_lifespan_accesses => 10000
    ,x_password_lifespan_days     => 10000
    ,x_employee_id                => 30 /*Change this id by running below SQL*/
     /*   
     SELECT person_id
           ,full_name
     FROM   per_all_people_f
     WHERE  upper(full_name) LIKE '%' || upper('<ampersand>full_name') || '%'
     GROUP  BY person_id
              ,full_name
     */
    ,x_email_address => 'oracle-applications-forall.blogspot@gmail.com'
    ,x_fax           => ''
    ,x_customer_id   => ''
    ,x_supplier_id   => '');
  fnd_user_pkg.addresp(username       => v_user_name
                      ,resp_app       => 'SYSADMIN'
                      ,resp_key       => 'SYSTEM_ADMINISTRATOR'
                      ,security_group => 'STANDARD'
                      ,description    => 'Auto Assignment'
                      ,start_date     => SYSDATE - 10
                      ,end_date       => SYSDATE + 1000);
END;