add

About Me

My photo
Oracle Apps - Techno Functional consultant

Friday, February 17

Add Concurrent Program to Request Group From Backend via API

DECLARE
   v_program_short_name    VARCHAR2 (200);
   v_program_application   VARCHAR2 (200);
   v_request_group         VARCHAR2 (200);
   v_group_application     VARCHAR2 (200);
   v_check                 VARCHAR2 (2);
BEGIN
   v_program_short_name  := 'XX_SHARTNAME'; /*Concurrent Program Short Name*/
   v_program_application := 'Payables';
   v_request_group       := 'All Reports';
   v_group_application   := 'Assets';
   apps.fnd_program.add_to_group (program_short_name  => v_program_short_name,
                                  program_application => v_program_application,
                                  request_group       => v_request_group,
                                  group_application   => v_group_application
                                 );
  COMMIT;
  BEGIN
  SELECT 'Y'
  INTO   v_check
  FROM   FND_REQUEST_GROUPS FRG,
         FND_REQUEST_GROUP_UNITS FRGU,
           FND_CONCURRENT_PROGRAMS FCP
  WHERE  FRG.request_group_id       = FRGU.REQUEST_GROUP_ID
  AND    FRG.application_id         = FRGU.application_id
  AND    FRGU.request_unit_id       = FCP.concurrent_program_ID
  AND    FRGU.unit_application_id   = FCP.application_id      
  AND    FCP.concurrent_program_name = 'XX_SHARTNAME'; /*Concurrent Program Short Name*/
  EXCEPTION
      WHEN NO_DATA_FOUND
      THEN
         DBMS_OUTPUT.put_line ('Adding Concurrent Program to Request Group Failed');
  END;

END;

No comments: