GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle Apps  >  AOL

 Print  |  
Question:  How do i recover the responsibility in apps if it is disabled?

Answer: post your answer


July 07, 2006 06:31:42 #6
 Brinda   Member Since: Visitor    Total Comments: N/A 

RE: How do i recover the responsibility in apps if it ...
 

Here is the API script which add the System Administrator responsibility through which you add the other responsibility.

DECLARE
CURSOR c1_cur IS SELECT u.user_name
          ,u.user_id,u.end_date,u.start_date,u.description
   FROM   fnd_user u
   WHERE  u.user_name IN ('subbarab')
   AND    (u.end_date IS NULL OR u.end_date = TO_DATE('31-dec-4712','dd-mon-yyyy'))
   ORDER  BY u.user_name;

    BEGIN
    FOR c1 IN c1_cur LOOP
     BEGIN
       fnd_user_pkg.addresp(username       => c1.user_name --varchar2,
                           ,resp_app       => 'SYSADMIN' --varchar2,
                           ,resp_key       => 'SYSTEM_ADMINISTRATOR' --varchar2,
                           ,security_group => 'STANDARD' --varchar2,
                           ,description    => c1.description --varchar2,
                           ,start_date     => sysdate --date,
                           ,end_date       => c1.end_date --date
             );
       dbms_output.put_line('Inserted '||c1.user_name);
       EXCEPTION
       WHEN OTHERS THEN
       dbms_output.put_line('ERROR '||c1.user_name|| SQLERRM);
      END;
     END LOOP;
     COMMIT;
    END;
/

     

 

Back To Question