DBA Data[Home] [Help]

APPS.AZ_PLSQL_XML dependencies on HR_UTILITY

Line 140: hr_utility.set_location('Entering:'|| l_proc, 10);

136: l_execute integer; -- Value returned by
137: -- dbms_sql.execute
138: l_proc varchar2(72) := g_package||'execute_source';
139: begin
140: hr_utility.set_location('Entering:'|| l_proc, 10);
141: --
142: -- The whole of the new package body code has now been built,
143: -- use dynamic SQL to execute the create or replace package statement
144: --

Line 145: hr_utility.set_location(l_proc, 11);

141: --
142: -- The whole of the new package body code has now been built,
143: -- use dynamic SQL to execute the create or replace package statement
144: --
145: hr_utility.set_location(l_proc, 11);
146: l_dynamic_cursor := dbms_sql.open_cursor;
147: dbms_sql.parse(l_dynamic_cursor, p_source, dbms_sql.v7);
148: l_execute := dbms_sql.execute(l_dynamic_cursor);
149: dbms_sql.close_cursor(l_dynamic_cursor);

Line 150: hr_utility.set_location(' Leaving:'|| l_proc, 20);

146: l_dynamic_cursor := dbms_sql.open_cursor;
147: dbms_sql.parse(l_dynamic_cursor, p_source, dbms_sql.v7);
148: l_execute := dbms_sql.execute(l_dynamic_cursor);
149: dbms_sql.close_cursor(l_dynamic_cursor);
150: hr_utility.set_location(' Leaving:'|| l_proc, 20);
151: exception
152: --
153: -- In case of an unexpected error close the dynamic cursor
154: -- if it was successfully opened.

Line 222: hr_utility.set_location('Entering:'|| l_proc, 10);

218: l_print_length number(15); -- Length position for printing out
219: -- source code for execution.
220: l_proc varchar2(72) := g_package||'call_plsql_api';
221: begin
222: hr_utility.set_location('Entering:'|| l_proc, 10);
223: --hr_utility.set_location(p_xml,11);
224: --
225: -- Parse the XML Document
226: --

Line 223: --hr_utility.set_location(p_xml,11);

219: -- source code for execution.
220: l_proc varchar2(72) := g_package||'call_plsql_api';
221: begin
222: hr_utility.set_location('Entering:'|| l_proc, 10);
223: --hr_utility.set_location(p_xml,11);
224: --
225: -- Parse the XML Document
226: --
227: l_xmldoc := parse(p_xml);

Line 229: hr_utility.set_location(l_proc, 12);

225: -- Parse the XML Document
226: --
227: l_xmldoc := parse(p_xml);
228: if not xmldom.isnull(l_xmldoc) then
229: hr_utility.set_location(l_proc, 12);
230: --
231: -- Once only set-up for start of PL/SQL block
232: --
233: l_declare_code := 'declare ' || c_new_line || 'l_proc varchar2(30);' || c_new_line;

Line 235: hr_utility.set_location(l_proc, 13);

231: -- Once only set-up for start of PL/SQL block
232: --
233: l_declare_code := 'declare ' || c_new_line || 'l_proc varchar2(30);' || c_new_line;
234: l_call_code := 'begin ' || c_new_line;
235: hr_utility.set_location(l_proc, 13);
236: --
237: -- Loop for each APICall in the APICallSet
238: --
239: l_api_call_list := selectNodes(l_xmldoc, '/APICallSet/APICall');

Line 251: hr_utility.trace('Now processing ' || l_api_pkg || '.' || l_api_name);

247: -- Above lines before processing sets were:
248: -- l_api_name := valueof(l_xmldoc, '/APICallSet/APICall/APIName');
249: -- l_api_pkg := valueof(l_xmldoc, '/APICallSet/APICall/APIPkg');
250: --
251: hr_utility.trace('Now processing ' || l_api_pkg || '.' || l_api_name);
252: hr_utility.set_location(l_proc, 15);
253: --
254: -- Obtain the API parameter list by calling an RDBMS procedure
255: -- to obtain the list of parameters to the call package procedure.

Line 252: hr_utility.set_location(l_proc, 15);

248: -- l_api_name := valueof(l_xmldoc, '/APICallSet/APICall/APIName');
249: -- l_api_pkg := valueof(l_xmldoc, '/APICallSet/APICall/APIPkg');
250: --
251: hr_utility.trace('Now processing ' || l_api_pkg || '.' || l_api_name);
252: hr_utility.set_location(l_proc, 15);
253: --
254: -- Obtain the API parameter list by calling an RDBMS procedure
255: -- to obtain the list of parameters to the call package procedure.
256: -- A separate begin ... end block has been specified so that errors

Line 282: hr_utility.set_message(800, 'HR_51950_AHC_CALL_PKG_NO_EXIST');

278: exception
279: when Package_Not_Exists then
280: -- Error: The call_package does not exist in the database. Code to
281: -- carry out this hook call has not been created.
282: hr_utility.set_message(800, 'HR_51950_AHC_CALL_PKG_NO_EXIST');
283: l_describe_error := true;
284: hr_utility.set_location(l_proc, 20);
285: when Proc_Not_In_Package then
286: -- Error: The call_procedure does not exist in the call_package.

Line 284: hr_utility.set_location(l_proc, 20);

280: -- Error: The call_package does not exist in the database. Code to
281: -- carry out this hook call has not been created.
282: hr_utility.set_message(800, 'HR_51950_AHC_CALL_PKG_NO_EXIST');
283: l_describe_error := true;
284: hr_utility.set_location(l_proc, 20);
285: when Proc_Not_In_Package then
286: -- Error: The call_procedure does not exist in the call_package.
287: -- Code to carry out this hook call has not been created.
288: hr_utility.set_message(800, 'HR_51951_AHC_CALL_PRO_NO_EXIST');

Line 288: hr_utility.set_message(800, 'HR_51951_AHC_CALL_PRO_NO_EXIST');

284: hr_utility.set_location(l_proc, 20);
285: when Proc_Not_In_Package then
286: -- Error: The call_procedure does not exist in the call_package.
287: -- Code to carry out this hook call has not been created.
288: hr_utility.set_message(800, 'HR_51951_AHC_CALL_PRO_NO_EXIST');
289: l_describe_error := true;
290: hr_utility.set_location(l_proc, 30);
291: when Remote_Object then
292: -- Error: Remote objects cannot be called from API User Hooks.

Line 290: hr_utility.set_location(l_proc, 30);

286: -- Error: The call_procedure does not exist in the call_package.
287: -- Code to carry out this hook call has not been created.
288: hr_utility.set_message(800, 'HR_51951_AHC_CALL_PRO_NO_EXIST');
289: l_describe_error := true;
290: hr_utility.set_location(l_proc, 30);
291: when Remote_Object then
292: -- Error: Remote objects cannot be called from API User Hooks.
293: -- Code to carry out this hook call has not been created.
294: hr_utility.set_message(800, 'HR_51952_AHC_CALL_REMOTE_OBJ');

Line 294: hr_utility.set_message(800, 'HR_51952_AHC_CALL_REMOTE_OBJ');

290: hr_utility.set_location(l_proc, 30);
291: when Remote_Object then
292: -- Error: Remote objects cannot be called from API User Hooks.
293: -- Code to carry out this hook call has not been created.
294: hr_utility.set_message(800, 'HR_51952_AHC_CALL_REMOTE_OBJ');
295: l_describe_error := true;
296: hr_utility.set_location(l_proc, 40);
297: when Invalid_Package then
298: -- Error: The call_package code in the database is invalid.

Line 296: hr_utility.set_location(l_proc, 40);

292: -- Error: Remote objects cannot be called from API User Hooks.
293: -- Code to carry out this hook call has not been created.
294: hr_utility.set_message(800, 'HR_51952_AHC_CALL_REMOTE_OBJ');
295: l_describe_error := true;
296: hr_utility.set_location(l_proc, 40);
297: when Invalid_Package then
298: -- Error: The call_package code in the database is invalid.
299: -- Code to carry out this hook call has not been created.
300: hr_utility.set_message(800, 'HR_51953_AHC_CALL_PKG_INVALID');

Line 300: hr_utility.set_message(800, 'HR_51953_AHC_CALL_PKG_INVALID');

296: hr_utility.set_location(l_proc, 40);
297: when Invalid_Package then
298: -- Error: The call_package code in the database is invalid.
299: -- Code to carry out this hook call has not been created.
300: hr_utility.set_message(800, 'HR_51953_AHC_CALL_PKG_INVALID');
301: l_describe_error := true;
302: hr_utility.set_location(l_proc, 50);
303: when Invalid_Object_Name then
304: -- Error: An error has occurred while attempting to parse the name of

Line 302: hr_utility.set_location(l_proc, 50);

298: -- Error: The call_package code in the database is invalid.
299: -- Code to carry out this hook call has not been created.
300: hr_utility.set_message(800, 'HR_51953_AHC_CALL_PKG_INVALID');
301: l_describe_error := true;
302: hr_utility.set_location(l_proc, 50);
303: when Invalid_Object_Name then
304: -- Error: An error has occurred while attempting to parse the name of
305: -- the call package and call procedure. Check the package and procedure
306: -- names. Code to carry out this hook call has not been created.

Line 307: hr_utility.set_message(800, 'HR_51954_AHC_CALL_PARSE');

303: when Invalid_Object_Name then
304: -- Error: An error has occurred while attempting to parse the name of
305: -- the call package and call procedure. Check the package and procedure
306: -- names. Code to carry out this hook call has not been created.
307: hr_utility.set_message(800, 'HR_51954_AHC_CALL_PARSE');
308: l_describe_error := true;
309: hr_utility.set_location(l_proc, 60);
310: end;
311: hr_utility.set_location(l_proc, 70);

Line 309: hr_utility.set_location(l_proc, 60);

305: -- the call package and call procedure. Check the package and procedure
306: -- names. Code to carry out this hook call has not been created.
307: hr_utility.set_message(800, 'HR_51954_AHC_CALL_PARSE');
308: l_describe_error := true;
309: hr_utility.set_location(l_proc, 60);
310: end;
311: hr_utility.set_location(l_proc, 70);
312: if not l_describe_error then
313: --

Line 311: hr_utility.set_location(l_proc, 70);

307: hr_utility.set_message(800, 'HR_51954_AHC_CALL_PARSE');
308: l_describe_error := true;
309: hr_utility.set_location(l_proc, 60);
310: end;
311: hr_utility.set_location(l_proc, 70);
312: if not l_describe_error then
313: --
314: -- Loop through the API parameter list.
315: -- For IN and IN OUT parameters checking to see if the

Line 322: hr_utility.set_location(l_proc, 90);

318: -- FOR OUT and IN OUT parameters add a local variable to
319: -- catch the returned value.
320: --
321: l_call_code := l_call_code || l_api_pkg || '.' || l_api_name || '(' || c_new_line;
322: hr_utility.set_location(l_proc, 90);
323: l_not_first_param := false;
324: --
325: -- Search through the tables returned to create the parameter list
326: --

Line 354: -- hr_utility.trace(l_argument_name(l_loop) ||' l_param_value is ' || l_param_value || ' l_param_link is ' || l_param_link);

350: --
351: -- Processing before sets the above line was:
352: -- l_param_value := valueof(l_xmldoc, '/APICall/' || l_argument_name(l_loop));
353: --
354: -- hr_utility.trace(l_argument_name(l_loop) ||' l_param_value is ' || l_param_value || ' l_param_link is ' || l_param_link);
355: -- Process depending on IN, OUT, IN OUT status
356: if l_in_out(l_loop) = 0 then
357: -- hr_utility.set_location(l_proc, 100);
358: -- Parameter is IN

Line 357: -- hr_utility.set_location(l_proc, 100);

353: --
354: -- hr_utility.trace(l_argument_name(l_loop) ||' l_param_value is ' || l_param_value || ' l_param_link is ' || l_param_link);
355: -- Process depending on IN, OUT, IN OUT status
356: if l_in_out(l_loop) = 0 then
357: -- hr_utility.set_location(l_proc, 100);
358: -- Parameter is IN
359: -- Only add to procedure list if the parameter has
360: -- been given a value in the XML document or a link
361: -- value has been defined.

Line 391: -- hr_utility.set_location(l_proc, 110);

387: l_call_code := l_call_code || 'l_' || l_param_link || c_new_line;
388: end if;
389: end if;
390: elsif l_in_out(l_loop) = 1 then
391: -- hr_utility.set_location(l_proc, 110);
392: -- Parameter is OUT
393: -- Add local variable to the declare section with the
394: -- same datatype. Add to the procedure list so local
395: -- variable catches any return result.

Line 420: -- hr_utility.set_location(l_proc, 120);

416: -- each instance of the local variable will have the same datatype
417: -- length.
418: --
419: if instr(l_declare_code, l_var_name) = 0 then
420: -- hr_utility.set_location(l_proc, 120);
421: -- Add local variable name
422: l_declare_code := l_declare_code || l_var_name;
423: -- Add datatype
424: if l_datatype(l_loop) = c_dtype_varchar2 then

Line 439: -- hr_utility.set_location(l_proc, 130);

435: -- Unexpected need to raise error;
436: null;
437: end if;
438: end if;
439: -- hr_utility.set_location(l_proc, 130);
440: l_call_code := l_call_code || l_argument_name(l_loop) || ' => ';
441: l_call_code := l_call_code || l_var_name || c_new_line;
442: elsif l_in_out(l_loop) = 2 then
443: -- hr_utility.set_location(l_proc, 140);

Line 443: -- hr_utility.set_location(l_proc, 140);

439: -- hr_utility.set_location(l_proc, 130);
440: l_call_code := l_call_code || l_argument_name(l_loop) || ' => ';
441: l_call_code := l_call_code || l_var_name || c_new_line;
442: elsif l_in_out(l_loop) = 2 then
443: -- hr_utility.set_location(l_proc, 140);
444: -- Parameter is IN OUT
445: -- Add local variable to the declare section. If a value
446: -- as been given in the XML document then default the
447: -- local variable to that value. Also add to the

Line 473: -- hr_utility.set_location(l_proc, 150);

469: -- each instance of the local variable will have the same datatype
470: -- length.
471: --
472: if instr(l_declare_code, l_var_name) = 0 then
473: -- hr_utility.set_location(l_proc, 150);
474: -- Add local variable name
475: l_declare_code := l_declare_code || l_var_name;
476: -- Add datatype with or without defaulted value
477: -- Assumption: When a local variable is being used with

Line 487: -- hr_utility.set_location(l_proc, 160);

483: --
484: -- When an IN parameter value has been provided include default value
485: -- in local variable declare. Otherwise don't mention default in declare.
486: if l_param_value is not null then
487: -- hr_utility.set_location(l_proc, 160);
488: if l_datatype(l_loop) = c_dtype_varchar2 then
489: l_declare_code := l_declare_code || ' varchar2(200) := ' || '''' || l_param_value || '''' ;
490: l_declare_code := l_declare_code || ';' || c_new_line;
491: elsif l_datatype(l_loop) = c_dtype_number then

Line 508: -- hr_utility.set_location(l_proc, 170);

504: -- Unexpected need to raise error;
505: null;
506: end if;
507: else
508: -- hr_utility.set_location(l_proc, 170);
509: if l_datatype(l_loop) = c_dtype_varchar2 then
510: l_declare_code := l_declare_code || ' varchar2(200);' || c_new_line;
511: elsif l_datatype(l_loop) = c_dtype_number then
512: l_declare_code := l_declare_code || ' number(15);' || c_new_line;

Line 533: -- hr_utility.set_location(l_proc, 180);

529: null;
530: end if;
531: l_pre_overload := l_overload(l_loop);
532: l_loop := l_loop + 1;
533: -- hr_utility.set_location(l_proc, 180);
534: end loop; -- end of while loop
535:
536: -- Following IF statement may be executed when there is
537: -- more than one overload for the same API

Line 554: -- hr_utility.set_location(l_proc, 190);

550: -- parameter list with a closing bracket. The bracket should not be
551: -- included when there are zero parameters.
552: l_call_code := l_call_code || ');' || c_new_line;
553: end if;
554: -- hr_utility.set_location(l_proc, 190);
555: end;
556: end if; -- if not l_describe_error
557: hr_utility.set_location(l_proc, 200);
558: end loop;

Line 557: hr_utility.set_location(l_proc, 200);

553: end if;
554: -- hr_utility.set_location(l_proc, 190);
555: end;
556: end if; -- if not l_describe_error
557: hr_utility.set_location(l_proc, 200);
558: end loop;
559: --
560: -- Once only end PL/SQL block
561: --

Line 563: hr_utility.set_location(l_proc, 210);

559: --
560: -- Once only end PL/SQL block
561: --
562: l_call_code := l_call_code || 'end;' || c_new_line;
563: hr_utility.set_location(l_proc, 210);
564: --
565: for l_print IN 0..length(l_declare_code) loop
566: if mod(l_print, 200) = 0 then
567: hr_utility.trace(substr(l_declare_code, l_print, 200));

Line 567: hr_utility.trace(substr(l_declare_code, l_print, 200));

563: hr_utility.set_location(l_proc, 210);
564: --
565: for l_print IN 0..length(l_declare_code) loop
566: if mod(l_print, 200) = 0 then
567: hr_utility.trace(substr(l_declare_code, l_print, 200));
568: end if;
569: end loop;
570: for l_print IN 0..length(l_call_code) loop
571: if mod(l_print, 200) = 0 then

Line 572: hr_utility.trace(substr(l_call_code, l_print, 200));

568: end if;
569: end loop;
570: for l_print IN 0..length(l_call_code) loop
571: if mod(l_print, 200) = 0 then
572: hr_utility.trace(substr(l_call_code, l_print, 200));
573: end if;
574: end loop;
575: -- l_print_length := 1;
576: -- while l_print_length < length(l_declare_code) loop

Line 577: -- hr_utility.trace(substr(l_declare_code, l_print_length, l_print_length + 200));

573: end if;
574: end loop;
575: -- l_print_length := 1;
576: -- while l_print_length < length(l_declare_code) loop
577: -- hr_utility.trace(substr(l_declare_code, l_print_length, l_print_length + 200));
578: -- l_print_length := l_print_length + 200;
579: -- end loop;
580: -- l_print_length := 1;
581: -- while l_print_length < length(l_call_code) loop

Line 582: -- hr_utility.trace(substr(l_call_code, l_print_length, l_print_length + 200));

578: -- l_print_length := l_print_length + 200;
579: -- end loop;
580: -- l_print_length := 1;
581: -- while l_print_length < length(l_call_code) loop
582: -- hr_utility.trace(substr(l_call_code, l_print_length, l_print_length + 200));
583: -- l_print_length := l_print_length + 200;
584: -- end loop;
585: --
586: -- Use dynamic SQL to perform the actual API call

Line 591: hr_utility.set_location(' Leaving:'||l_proc, 220);

587: --
588:
589: execute_source(l_declare_code || l_call_code);
590: end if; -- not xmldom.isnull
591: hr_utility.set_location(' Leaving:'||l_proc, 220);
592: end call_plsql_api;
593:
594: end az_plsql_xml;