Saturday 10 March 2012

Responsibility Add Package

To Add Responsibility via Toad


   -- To get responsiblity ID --
SELECT *
  FROM fnd_responsibility_tl
 WHERE responsibility_name = 'Application Developer'
   
   -- To get User ID --   
SELECT *
  FROM fnd_user
 WHERE user_name = :user_name 
   
   -- To get Application ID --
SELECT *
  FROM fnd_application_tl
 WHERE application_name = 'Application Object Library'




-- Execute the below anonymous package to add responsibility --


DECLARE
   p_user_id         NUMBER;
   p_responsibility_id   NUMBER;
   p_application_id      NUMBER;
BEGIN
   p_user_id := 8891;
   p_responsibility_id := 53956;
   p_application_id := 7000;
   fnd_user_resp_groups_api.insert_assignment
                          (user_id                            => p_user_id,
                           responsibility_id                  => p_responsibility_id,
                           responsibility_application_id      => p_application_id,
                           security_group_id                  => 0,
                           start_date                         => SYSDATE - 1,
                           end_date                           => NULL,
                           description                        => NULL
                          );
END;

No comments:

Post a Comment