Monday, October 29, 2018

API: Concurrent Program and Request Group related

API: Concurrent Program and Request Group related

1) API to create concurrent program executable
1
2
3
4
5
6
7
8
9
10
11
12
13
14
BEGIN
  fnd_program.executable(
  'Test User Executable'                        --User Executable Name
  ,'System Administration'                      --Application Name
  ,'TEST_SHORT_EXEC'                            --Short Name
  ,'Test Executable Creation'                   --Description
  ,'PL/SQL Stored Procedure'                    --Execution Method
  ,'test_pkg.test_proc' ,''                     -- subroutine_name
  ,''                                           --icon_name
  ,'US'                                         --language_code
  ,''                                           --execution file path
  );
  COMMIT;
END;
2) API to create or register concurrent program for the executable created above.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
BEGIN
  FND_PROGRAM.register('Test User Program' -- User program Name
  , 'System Administration'                -- Application Name
  , 'Y'                                    -- enabled
  , 'TEST_SHORT_PROG'                      -- short_name
  , 'Test Program Creation Using API'      -- description
  , 'TEST_SHORT_EXEC'                      -- executable_short_name
  , 'System Administration'                -- executable_application
  , ''                                     -- execution_options
  , ''                                     -- priority
  , 'Y'                                    -- save_output
  , 'Y'                                    -- print
  , ''                                     -- cols
  , ''                                     -- rows
  , ''                                     -- style
  , 'N'                                    -- style_required
  , ''                                     -- printer
  , ''                                     -- request_type
  , ''                                     -- request_type_application
  , 'Y'                                    -- use_in_srs
  , 'N'                                    -- allow_disabled_values
  , 'N'                                    -- run_alone
  , 'TEXT'                                 -- output_type
  , 'N'                                    -- enable_trace
  , 'Y'                                    -- restart
  , 'Y'                                    -- nls_compliant
  , ''                                     -- icon_name
  , 'US');                                 -- language_code
  COMMIT;
END;
/
3) Below API will add Program to Request Group
1
2
3
4
5
6
7
8
BEGIN
  FND_PROGRAM.add_to_group('TEST_SHORT_PROG' -- program_short_name
  , 'System Administration'                  -- application
  , 'System Administrator Reports'           -- Report Group Name
  , 'Application Object Library');           -- Report Group Application
  COMMIT;
END;
/
4) Below API will remove Program from Request Group
1
2
3
4
5
6
7
8
BEGIN
  FND_PROGRAM.remove_from_group('TEST_SHORT_PROG' -- program_short_name
  , 'System Administration'                       -- application
  , 'System Administrator Reports'                -- Report Group Name
  , 'Application Object Library');                -- Report Group Application
  COMMIT;
END;
/
5) API to Submit Concurrent Program
–Before Submitting concurrent Program,we need to initialize the oracle application session
–We can initialize oracle session by using fnd_global.apps_initialize
–We can submit Concurrent program using fnd_request.submit_request
1
2
3
4
5
6
7
8
9
10
11
SET SERVEROUTPUT ON;
DECLARE
  v_Request_ID NUMBER;
BEGIN
  fnd_global.apps_initialize(user_id=>1318,resp_id=>20420,resp_appl_id=>1);
  v_Request_ID := FND_REQUEST.SUBMIT_REQUEST ('SYSADMIN' --Application Short name,
  ,'TEST_SHORT_PROG'                                     -- Concurrent Program Short Name
  );
  DBMS_OUTPUT.PUT_LINE(v_Request_ID);
  COMMIT;
END;

No comments:

Post a Comment

SQL Important Queries

  How to delete rows with no where clause The following example deletes  all rows  from the  Person.Person  the table in the AdventureWork...