Register a test concurrent program from backend in Oracle EBS

By admin

Register a test concurrent program from backend in Oracle EBS

Create concurrent program using PLSQL

Create concurrent program executable using PLSQL

SQL Querysql
1DECLARE
2l_program VARCHAR2 (200);
3l_application VARCHAR2 (200);
4l_enabled VARCHAR2 (200);
5l_short_name VARCHAR2 (200);
6l_description VARCHAR2 (200);
7l_executable_short_name VARCHAR2 (200);
8l_executable_application VARCHAR2 (200);
9l_execution_options VARCHAR2 (200);
10l_priority NUMBER;
11l_save_output VARCHAR2 (200);
12l_print VARCHAR2 (200);
13l_cols NUMBER;
14l_rows NUMBER;
15l_style VARCHAR2 (200);
16l_style_required VARCHAR2 (200);
17l_printer VARCHAR2 (200);
18l_request_type VARCHAR2 (200);
19l_request_type_application VARCHAR2 (200);
20l_use_in_srs VARCHAR2 (200);
21l_allow_disabled_values VARCHAR2 (200);
22l_run_alone VARCHAR2 (200);
23l_output_type VARCHAR2 (200);
24l_enable_trace VARCHAR2 (200);
25l_restart VARCHAR2 (200);
26l_nls_compliant VARCHAR2 (200);
27l_icon_name VARCHAR2 (200);
28l_language_code VARCHAR2 (200);
29l_mls_function_short_name VARCHAR2 (200);
30l_mls_function_application VARCHAR2 (200);
31l_incrementor VARCHAR2 (200);
32l_refresh_portlet VARCHAR2 (200);
33l_check VARCHAR2 (2);
34--
35BEGIN --
36l_program := 'XX Test Concurrent Program';
37l_application := 'Application Object Library';
38l_enabled := 'Y';
39l_short_name := 'XX_TEST_CP';
40l_description := 'XX Test Concurrent Program';
41l_executable_short_name := 'XX_TEST_EXE';
42l_executable_application := 'Application Object Library';
43l_execution_options := NULL;
44l_priority := NULL;
45l_save_output := 'Y';
46l_print := 'Y';
47l_cols := NULL;
48l_rows := NULL;
49l_style := NULL;
50l_style_required := 'N';
51l_printer := NULL;
52l_request_type := NULL;
53l_request_type_application := NULL;
54l_use_in_srs := 'Y';
55l_allow_disabled_values := 'N';
56l_run_alone := 'N';
57l_output_type := 'TEXT';
58l_enable_trace := 'N';
59l_restart := 'Y';
60l_nls_compliant := 'Y';
61l_icon_name := NULL;
62l_language_code := 'US';
63l_mls_function_short_name := NULL;
64l_mls_function_application := NULL;
65l_incrementor := NULL;
66l_refresh_portlet := NULL;
67--
68--Calling API to create concurrent program definition
69--
70BEGIN FND_PROGRAM.executable(
71  executable => 'XX_TEST_EXE', 
72  -- Executable Name
73  application => 'FND', 
74  -- Application Short Name
75  short_name => 'XX_TEST_EXE', 
76  -- Executable Short Name
77  description => 'Test Executable', 
78  -- Description,DEFAULT NULL
79  execution_method => 'PL/SQL Stored Procedure', 
80  -- Execution Method
81  execution_file_name => 'XX_TEST_PROC', 
82  -- Execution File Name,DEFAULT NULL
83  subroutine_name => NULL, 
84  -- Subroutine Name,DEFAULT NULL
85  icon_name => NULL, 
86  -- Icon Name,DEFAULT NULL
87  language_code => 'US', 
88  -- Language Code,DEFAULT 'US'
89  execution_file_path => NULL -- Execution File Path, DEFAULT NULL
90  );
91COMMIT;
92END;
93apps.fnd_program.register (
94  program => l_program, 
95  application => l_application, 
96  enabled => l_enabled, 
97  short_name => l_short_name, 
98  description => l_description, 
99  executable_short_name => l_executable_short_name, 
100  executable_application => l_executable_application, 
101  execution_options => l_execution_options, 
102  priority => l_priority, 
103  save_output => l_save_output, 
104  print => l_print, 
105  cols => l_cols, 
106  rows => l_rows, 
107  style => l_style, 
108  style_required => l_style_required, 
109  printer => l_printer, 
110  request_type => l_request_type, 
111  request_type_application => l_request_type_application, 
112  use_in_srs => l_use_in_srs, 
113  allow_disabled_values => l_allow_disabled_values, 
114  run_alone => l_run_alone, 
115  output_type => l_output_type, 
116  enable_trace => l_enable_trace, 
117  restart => l_restart, 
118  nls_compliant => l_nls_compliant, 
119  icon_name => l_icon_name, 
120  language_code => l_language_code, 
121  mls_function_short_name => l_mls_function_short_name, 
122  mls_function_application => l_mls_function_application, 
123  incrementor => l_incrementor, 
124  refresh_portlet => l_refresh_portlet
125);
126--
127COMMIT;
128--
129BEGIN --
130--To check whether Concurrent Program is registered or not
131--
132SELECT 
133  'Y' INTO l_check 
134FROM 
135  fnd_concurrent_programs 
136WHERE 
137  concurrent_program_name = 'XX_TEST_CP';
138--
139DBMS_OUTPUT.put_line (
140  'Concurrent Program Registered Successfully'
141);
142--
143EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.put_line (
144  'Concurrent Program Registration Failed'
145);
146END;
147BEGIN FND_PROGRAM.add_to_group(
148  'XX_TEST_CP', 
149  -- Concurrent Program Short Name
150  'FND', 
151  -- Application Short Name
152  'Customizations', 
153  -- Report Group Name
154  'XX'
155);
156-- Report Group Application
157COMMIT;
158END;
159END;
160
161create 
162or replace procedure XX_TEST_PROC(
163  errbuf out varchar2, retcode out varchar2
164) is o_currency_code VARCHAR2(1000);
165x_return_status VARCHAR2(1000);
166x_msg_count number;
167x_msg_data number;
168l_ret_val number;
169begin 
170fnd_file.put_line(
171  fnd_file.log, 'Program test successful.'
172);
173end;
174/

Related posts: