291: if p_function_parameter.parameter_name = 'P_BUSINESS_GROUP_ID' then
292: if p_function_parameter.datatype <> c_dtype_number and
293: p_function_parameter.datatype <> c_dtype_binary_integer
294: then
295: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
296: hr_utility.set_message_token( 'ARGUMENT', 'P_BUSINESS_GROUP_ID' );
297: hr_utility.raise_error;
298: end if;
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
292: if p_function_parameter.datatype <> c_dtype_number and
293: p_function_parameter.datatype <> c_dtype_binary_integer
294: then
295: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
296: hr_utility.set_message_token( 'ARGUMENT', 'P_BUSINESS_GROUP_ID' );
297: hr_utility.raise_error;
298: end if;
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
300: if p_function_parameter.datatype <> c_dtype_boolean then
293: p_function_parameter.datatype <> c_dtype_binary_integer
294: then
295: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
296: hr_utility.set_message_token( 'ARGUMENT', 'P_BUSINESS_GROUP_ID' );
297: hr_utility.raise_error;
298: end if;
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
300: if p_function_parameter.datatype <> c_dtype_boolean then
301: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
297: hr_utility.raise_error;
298: end if;
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
300: if p_function_parameter.datatype <> c_dtype_boolean then
301: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
302: hr_utility.set_message_token( 'ARGUMENT', 'P_VALIDATE' );
303: hr_utility.raise_error;
304: end if;
305: elsif p_function_parameter.parameter_name = 'P_DATA_PUMP_ALWAYS_CALL'
298: end if;
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
300: if p_function_parameter.datatype <> c_dtype_boolean then
301: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
302: hr_utility.set_message_token( 'ARGUMENT', 'P_VALIDATE' );
303: hr_utility.raise_error;
304: end if;
305: elsif p_function_parameter.parameter_name = 'P_DATA_PUMP_ALWAYS_CALL'
306: then
299: elsif p_function_parameter.parameter_name = 'P_VALIDATE' then
300: if p_function_parameter.datatype <> c_dtype_boolean then
301: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
302: hr_utility.set_message_token( 'ARGUMENT', 'P_VALIDATE' );
303: hr_utility.raise_error;
304: end if;
305: elsif p_function_parameter.parameter_name = 'P_DATA_PUMP_ALWAYS_CALL'
306: then
307: if p_function_parameter.datatype <> c_dtype_varchar2 then
304: end if;
305: elsif p_function_parameter.parameter_name = 'P_DATA_PUMP_ALWAYS_CALL'
306: then
307: if p_function_parameter.datatype <> c_dtype_varchar2 then
308: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
309: hr_utility.set_message_token( 'ARGUMENT', 'P_DATA_PUMP_ALWAYS_CALL' );
310: hr_utility.raise_error;
311: end if;
312: end if;
305: elsif p_function_parameter.parameter_name = 'P_DATA_PUMP_ALWAYS_CALL'
306: then
307: if p_function_parameter.datatype <> c_dtype_varchar2 then
308: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
309: hr_utility.set_message_token( 'ARGUMENT', 'P_DATA_PUMP_ALWAYS_CALL' );
310: hr_utility.raise_error;
311: end if;
312: end if;
313: end check_special_parameter;
306: then
307: if p_function_parameter.datatype <> c_dtype_varchar2 then
308: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
309: hr_utility.set_message_token( 'ARGUMENT', 'P_DATA_PUMP_ALWAYS_CALL' );
310: hr_utility.raise_error;
311: end if;
312: end if;
313: end check_special_parameter;
314:
393: ( ( l_mapping_type = c_mapping_type_aliased or
394: l_mapping_type = c_mapping_type_user_key ) and
395: special_parameter( l_mapping_definition ) )
396: then
397: hr_utility.set_message( 800, 'HR_50328_DP_SEED_SPECIAL_ARG' );
398: hr_utility.set_message_token( 'ARGUMENT', l_parameter_name );
399: hr_utility.raise_error;
400: end if;
401:
394: l_mapping_type = c_mapping_type_user_key ) and
395: special_parameter( l_mapping_definition ) )
396: then
397: hr_utility.set_message( 800, 'HR_50328_DP_SEED_SPECIAL_ARG' );
398: hr_utility.set_message_token( 'ARGUMENT', l_parameter_name );
399: hr_utility.raise_error;
400: end if;
401:
402: l_seqno := l_seqno + 1;
395: special_parameter( l_mapping_definition ) )
396: then
397: hr_utility.set_message( 800, 'HR_50328_DP_SEED_SPECIAL_ARG' );
398: hr_utility.set_message_token( 'ARGUMENT', l_parameter_name );
399: hr_utility.raise_error;
400: end if;
401:
402: l_seqno := l_seqno + 1;
403: p_seed_parameter_tbl(l_seqno).parameter_name := l_parameter_name;
505: l_max_mandatory_args number;
506: l_distinct_overloads dbms_describe.number_table;
507: begin
508: if g_debug then
509: hr_utility.trace('Entered get_latest_api.');
510: end if;
511:
512: --
513: -- Want the latest overload for a procedure i.e. the maximum overload
525: l_distinct_overloads( p_overload(i) ) := -1;
526:
527: if g_debug then
528: if p_position(i) = 0 then
529: hr_utility.trace
530: ('Unsuitable overload ' || p_overload(i) || ' is a function.');
531: else
532: hr_utility.trace
533: ('Unsuitable overload ' || p_overload(i) || ' has no parameters');
528: if p_position(i) = 0 then
529: hr_utility.trace
530: ('Unsuitable overload ' || p_overload(i) || ' is a function.');
531: else
532: hr_utility.trace
533: ('Unsuitable overload ' || p_overload(i) || ' has no parameters');
534: end if;
535: end if;
536:
541: elsif not l_distinct_overloads.exists( p_overload(i) ) then
542: l_distinct_overloads( p_overload(i) ) := 0;
543:
544: if g_debug then
545: hr_utility.trace
546: ('Overload ' || p_overload(i) || ' is a candidate API.');
547: end if;
548: end if;
549:
573: p_parameters := false;
574: p_apis := false;
575:
576: if g_debug then
577: hr_utility.trace('No candidate API procedures found.');
578: end if;
579:
580: return;
581: else
607: l_max_mandatory_args := l_distinct_overloads(i);
608: loop
609:
610: if g_debug then
611: hr_utility.trace
612: ('Overload: ' || i || ' Mandatory Args: ' || l_distinct_overloads(i)
613: );
614: end if;
615:
624:
625: end loop;
626:
627: if g_debug then
628: hr_utility.trace('Selected overload: ' || l_chosen_overload);
629: end if;
630:
631: --
632: -- Delete information that does not belong to the selected overload
658: i := j;
659: end loop;
660:
661: if g_debug then
662: hr_utility.trace('get_latest_api: deleted unwanted overloads');
663: end if;
664: end get_latest_api;
665:
666: -- -------------------------- describe_api --------------------------------
700: l_apis boolean;
701: --
702: begin
703: if g_debug then
704: hr_utility.trace('Entered describe_api.');
705: end if;
706:
707: begin
708: hr_general.describe_procedure
722: radix => l_radix,
723: spare => l_spare );
724: exception
725: when package_not_exists or proc_not_in_package or invalid_object_name then
726: hr_utility.set_message( 800, 'HR_50305_DP_NO_SUCH_API' );
727: hr_utility.set_message_token( 'PACKAGE', p_module_package );
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
723: spare => l_spare );
724: exception
725: when package_not_exists or proc_not_in_package or invalid_object_name then
726: hr_utility.set_message( 800, 'HR_50305_DP_NO_SUCH_API' );
727: hr_utility.set_message_token( 'PACKAGE', p_module_package );
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
724: exception
725: when package_not_exists or proc_not_in_package or invalid_object_name then
726: hr_utility.set_message( 800, 'HR_50305_DP_NO_SUCH_API' );
727: hr_utility.set_message_token( 'PACKAGE', p_module_package );
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
732: hr_utility.set_message_token
725: when package_not_exists or proc_not_in_package or invalid_object_name then
726: hr_utility.set_message( 800, 'HR_50305_DP_NO_SUCH_API' );
727: hr_utility.set_message_token( 'PACKAGE', p_module_package );
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
732: hr_utility.set_message_token
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
727: hr_utility.set_message_token( 'PACKAGE', p_module_package );
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
732: hr_utility.set_message_token
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
734: hr_utility.raise_error;
735: when invalid_package then
728: hr_utility.set_message_token( 'MODULE', p_module_name );
729: hr_utility.raise_error;
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
732: hr_utility.set_message_token
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
734: hr_utility.raise_error;
735: when invalid_package then
736: hr_utility.set_message( 800, 'HR_50306_DP_INVALID_PKG' );
730: when remote_object then
731: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
732: hr_utility.set_message_token
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
734: hr_utility.raise_error;
735: when invalid_package then
736: hr_utility.set_message( 800, 'HR_50306_DP_INVALID_PKG' );
737: hr_utility.set_message_token( 'PACKAGE', p_module_package );
738: hr_utility.raise_error;
732: hr_utility.set_message_token
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
734: hr_utility.raise_error;
735: when invalid_package then
736: hr_utility.set_message( 800, 'HR_50306_DP_INVALID_PKG' );
737: hr_utility.set_message_token( 'PACKAGE', p_module_package );
738: hr_utility.raise_error;
739: end;
740:
733: ( 'OBJECT', p_module_package || '.' || p_module_name );
734: hr_utility.raise_error;
735: when invalid_package then
736: hr_utility.set_message( 800, 'HR_50306_DP_INVALID_PKG' );
737: hr_utility.set_message_token( 'PACKAGE', p_module_package );
738: hr_utility.raise_error;
739: end;
740:
741: if g_debug then
734: hr_utility.raise_error;
735: when invalid_package then
736: hr_utility.set_message( 800, 'HR_50306_DP_INVALID_PKG' );
737: hr_utility.set_message_token( 'PACKAGE', p_module_package );
738: hr_utility.raise_error;
739: end;
740:
741: if g_debug then
742: hr_utility.trace('Successful dbms_describe.');
738: hr_utility.raise_error;
739: end;
740:
741: if g_debug then
742: hr_utility.trace('Successful dbms_describe.');
743: end if;
744:
745: --
746: -- Get the latest overloaded version of the API.
764: --
765: -- Check that an API with parameters was found.
766: --
767: if not l_parameters and not l_apis then
768: hr_utility.set_message( 800, 'HR_50308_DP_NOT_AN_API' );
769: hr_utility.set_message_token
770: ( 'OBJECT', p_module_package || '.' || p_module_name );
771: hr_utility.raise_error;
772: end if;
765: -- Check that an API with parameters was found.
766: --
767: if not l_parameters and not l_apis then
768: hr_utility.set_message( 800, 'HR_50308_DP_NOT_AN_API' );
769: hr_utility.set_message_token
770: ( 'OBJECT', p_module_package || '.' || p_module_name );
771: hr_utility.raise_error;
772: end if;
773:
767: if not l_parameters and not l_apis then
768: hr_utility.set_message( 800, 'HR_50308_DP_NOT_AN_API' );
769: hr_utility.set_message_token
770: ( 'OBJECT', p_module_package || '.' || p_module_name );
771: hr_utility.raise_error;
772: end if;
773:
774: --
775: -- Process the parameters.
784: --
785: i := l_position(l_seqno);
786:
787: if g_debug then
788: hr_utility.trace
789: ('Parameter: ' || l_argument_name(l_seqno) || ' Call Position: ' || i ||
790: ' Table Position: ' || l_seqno
791: );
792: end if;
794: --
795: -- Check that parameter names start with 'p_'.
796: --
797: if substr(lower(l_argument_name(l_seqno)), 1, 2) <> 'p_' then
798: hr_utility.set_message( 800, 'HR_50310_DP_BAD_API_ARG_NAME');
799: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno));
800: hr_utility.raise_error;
801: end if;
802:
795: -- Check that parameter names start with 'p_'.
796: --
797: if substr(lower(l_argument_name(l_seqno)), 1, 2) <> 'p_' then
798: hr_utility.set_message( 800, 'HR_50310_DP_BAD_API_ARG_NAME');
799: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno));
800: hr_utility.raise_error;
801: end if;
802:
803: --
796: --
797: if substr(lower(l_argument_name(l_seqno)), 1, 2) <> 'p_' then
798: hr_utility.set_message( 800, 'HR_50310_DP_BAD_API_ARG_NAME');
799: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno));
800: hr_utility.raise_error;
801: end if;
802:
803: --
804: -- Check that the data type is supported.
808: l_datatype(l_seqno) <> c_dtype_date and
809: l_datatype(l_seqno) <> c_dtype_boolean and
810: l_datatype(l_seqno) <> c_dtype_long
811: then
812: hr_utility.set_message( 800, 'HR_50311_DP_BAD_API_ARG_TYPE' );
813: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
814: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
815: hr_utility.raise_error;
816: end if;
809: l_datatype(l_seqno) <> c_dtype_boolean and
810: l_datatype(l_seqno) <> c_dtype_long
811: then
812: hr_utility.set_message( 800, 'HR_50311_DP_BAD_API_ARG_TYPE' );
813: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
814: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
815: hr_utility.raise_error;
816: end if;
817:
810: l_datatype(l_seqno) <> c_dtype_long
811: then
812: hr_utility.set_message( 800, 'HR_50311_DP_BAD_API_ARG_TYPE' );
813: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
814: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
815: hr_utility.raise_error;
816: end if;
817:
818: --
811: then
812: hr_utility.set_message( 800, 'HR_50311_DP_BAD_API_ARG_TYPE' );
813: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
814: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
815: hr_utility.raise_error;
816: end if;
817:
818: --
819: -- Set up the long parameter count.
821: if l_datatype(l_seqno) = c_dtype_long then
822: p_parameter_counts.long_parameters :=
823: p_parameter_counts.long_parameters + 1;
824: if p_parameter_counts.long_parameters > 1 then
825: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
826: hr_utility.set_message_token
827: ( 'API', p_module_package || '.' || p_module_name );
828: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
829: hr_utility.set_message_token( 'FUNCTION', p_module_name );
822: p_parameter_counts.long_parameters :=
823: p_parameter_counts.long_parameters + 1;
824: if p_parameter_counts.long_parameters > 1 then
825: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
826: hr_utility.set_message_token
827: ( 'API', p_module_package || '.' || p_module_name );
828: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
829: hr_utility.set_message_token( 'FUNCTION', p_module_name );
830: hr_utility.raise_error;
824: if p_parameter_counts.long_parameters > 1 then
825: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
826: hr_utility.set_message_token
827: ( 'API', p_module_package || '.' || p_module_name );
828: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
829: hr_utility.set_message_token( 'FUNCTION', p_module_name );
830: hr_utility.raise_error;
831: end if;
832: end if;
825: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
826: hr_utility.set_message_token
827: ( 'API', p_module_package || '.' || p_module_name );
828: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
829: hr_utility.set_message_token( 'FUNCTION', p_module_name );
830: hr_utility.raise_error;
831: end if;
832: end if;
833:
826: hr_utility.set_message_token
827: ( 'API', p_module_package || '.' || p_module_name );
828: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
829: hr_utility.set_message_token( 'FUNCTION', p_module_name );
830: hr_utility.raise_error;
831: end if;
832: end if;
833:
834: --
1050: l_seed_parameter.mapping_type <> c_mapping_type_normal and
1051: l_seed_parameter.mapping_definition is null ) or
1052: ( l_seed_parameter.mapping_type is null and
1053: l_seed_parameter.mapping_definition is not null ) then
1054: hr_utility.set_message( 800, 'HR_50312_DP_BAD_MAP_DATA' );
1055: hr_utility.set_message_token
1056: ( 'PARAMETER', l_seed_parameter.parameter_name );
1057: hr_utility.raise_error;
1058: end if;
1051: l_seed_parameter.mapping_definition is null ) or
1052: ( l_seed_parameter.mapping_type is null and
1053: l_seed_parameter.mapping_definition is not null ) then
1054: hr_utility.set_message( 800, 'HR_50312_DP_BAD_MAP_DATA' );
1055: hr_utility.set_message_token
1056: ( 'PARAMETER', l_seed_parameter.parameter_name );
1057: hr_utility.raise_error;
1058: end if;
1059: --
1053: l_seed_parameter.mapping_definition is not null ) then
1054: hr_utility.set_message( 800, 'HR_50312_DP_BAD_MAP_DATA' );
1055: hr_utility.set_message_token
1056: ( 'PARAMETER', l_seed_parameter.parameter_name );
1057: hr_utility.raise_error;
1058: end if;
1059: --
1060: -- Copy values over from the seed data.
1061: --
1286: p_function.package_name := l_package;
1287: exit;
1288: exception
1289: when package_not_exists or invalid_package then
1290: hr_utility.set_message( 800, 'HR_50313_DP_NO_MAP_PKG' );
1291: hr_utility.set_message_token( 'PACKAGE', l_package );
1292: hr_utility.raise_error;
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1287: exit;
1288: exception
1289: when package_not_exists or invalid_package then
1290: hr_utility.set_message( 800, 'HR_50313_DP_NO_MAP_PKG' );
1291: hr_utility.set_message_token( 'PACKAGE', l_package );
1292: hr_utility.raise_error;
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1295: hr_utility.set_message_token
1288: exception
1289: when package_not_exists or invalid_package then
1290: hr_utility.set_message( 800, 'HR_50313_DP_NO_MAP_PKG' );
1291: hr_utility.set_message_token( 'PACKAGE', l_package );
1292: hr_utility.raise_error;
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1295: hr_utility.set_message_token
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1290: hr_utility.set_message( 800, 'HR_50313_DP_NO_MAP_PKG' );
1291: hr_utility.set_message_token( 'PACKAGE', l_package );
1292: hr_utility.raise_error;
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1295: hr_utility.set_message_token
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1297: hr_utility.raise_error;
1298: when invalid_object_name then
1291: hr_utility.set_message_token( 'PACKAGE', l_package );
1292: hr_utility.raise_error;
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1295: hr_utility.set_message_token
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1297: hr_utility.raise_error;
1298: when invalid_object_name then
1299: hr_utility.set_message( 800, 'HR_50315_DP_BAD_FUNCTION_NAME' );
1293: when remote_object then
1294: hr_utility.set_message( 800, 'HR_50307_DP_REMOTE_OBJECT' );
1295: hr_utility.set_message_token
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1297: hr_utility.raise_error;
1298: when invalid_object_name then
1299: hr_utility.set_message( 800, 'HR_50315_DP_BAD_FUNCTION_NAME' );
1300: hr_utility.set_message_token
1301: ( 'OBJECT', l_package || '.' || p_function.function_name );
1295: hr_utility.set_message_token
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1297: hr_utility.raise_error;
1298: when invalid_object_name then
1299: hr_utility.set_message( 800, 'HR_50315_DP_BAD_FUNCTION_NAME' );
1300: hr_utility.set_message_token
1301: ( 'OBJECT', l_package || '.' || p_function.function_name );
1302: hr_utility.raise_error;
1303: when proc_not_in_package then
1296: ( 'OBJECT', l_package || '.' || p_function.function_name );
1297: hr_utility.raise_error;
1298: when invalid_object_name then
1299: hr_utility.set_message( 800, 'HR_50315_DP_BAD_FUNCTION_NAME' );
1300: hr_utility.set_message_token
1301: ( 'OBJECT', l_package || '.' || p_function.function_name );
1302: hr_utility.raise_error;
1303: when proc_not_in_package then
1304: if i = p_mapping_package_tbl.count then
1298: when invalid_object_name then
1299: hr_utility.set_message( 800, 'HR_50315_DP_BAD_FUNCTION_NAME' );
1300: hr_utility.set_message_token
1301: ( 'OBJECT', l_package || '.' || p_function.function_name );
1302: hr_utility.raise_error;
1303: when proc_not_in_package then
1304: if i = p_mapping_package_tbl.count then
1305: hr_utility.set_message( 800, 'HR_50314_DP_NO_SUCH_FUNCTION' );
1306: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1301: ( 'OBJECT', l_package || '.' || p_function.function_name );
1302: hr_utility.raise_error;
1303: when proc_not_in_package then
1304: if i = p_mapping_package_tbl.count then
1305: hr_utility.set_message( 800, 'HR_50314_DP_NO_SUCH_FUNCTION' );
1306: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1307: hr_utility.raise_error;
1308: end if;
1309: end;
1302: hr_utility.raise_error;
1303: when proc_not_in_package then
1304: if i = p_mapping_package_tbl.count then
1305: hr_utility.set_message( 800, 'HR_50314_DP_NO_SUCH_FUNCTION' );
1306: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1307: hr_utility.raise_error;
1308: end if;
1309: end;
1310: end loop;
1303: when proc_not_in_package then
1304: if i = p_mapping_package_tbl.count then
1305: hr_utility.set_message( 800, 'HR_50314_DP_NO_SUCH_FUNCTION' );
1306: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1307: hr_utility.raise_error;
1308: end if;
1309: end;
1310: end loop;
1311:
1323: --
1324: -- Check for overloaded function call as overloading is not allowed.
1325: --
1326: if l_overload(l_seqno) <> l_first_overload then
1327: hr_utility.set_message( 800, 'HR_50318_DP_OVL_FUNCTION' );
1328: hr_utility.set_message_token
1329: ( 'OBJECT', c_get_function_package || '.' || p_function.function_name );
1330: hr_utility.raise_error;
1331: end if;
1324: -- Check for overloaded function call as overloading is not allowed.
1325: --
1326: if l_overload(l_seqno) <> l_first_overload then
1327: hr_utility.set_message( 800, 'HR_50318_DP_OVL_FUNCTION' );
1328: hr_utility.set_message_token
1329: ( 'OBJECT', c_get_function_package || '.' || p_function.function_name );
1330: hr_utility.raise_error;
1331: end if;
1332:
1326: if l_overload(l_seqno) <> l_first_overload then
1327: hr_utility.set_message( 800, 'HR_50318_DP_OVL_FUNCTION' );
1328: hr_utility.set_message_token
1329: ( 'OBJECT', c_get_function_package || '.' || p_function.function_name );
1330: hr_utility.raise_error;
1331: end if;
1332:
1333: --
1334: -- Handle the function return value.
1345: ( ( l_datatype( l_seqno ) = c_dtype_number or
1346: l_datatype( l_seqno ) = c_dtype_binary_integer ) and
1347: p_parameter.datatype = c_dtype_varchar2 )
1348: then
1349: hr_utility.set_message( 800, 'HR_50317_DP_BAD_FUNCTION_RET' );
1350: hr_utility.set_message_token
1351: ( 'FUNCTION', c_get_function_package || '.' || p_function.function_name );
1352: hr_utility.set_message_token( 'PARAMETER', p_parameter.parameter_name );
1353: hr_utility.raise_error;
1346: l_datatype( l_seqno ) = c_dtype_binary_integer ) and
1347: p_parameter.datatype = c_dtype_varchar2 )
1348: then
1349: hr_utility.set_message( 800, 'HR_50317_DP_BAD_FUNCTION_RET' );
1350: hr_utility.set_message_token
1351: ( 'FUNCTION', c_get_function_package || '.' || p_function.function_name );
1352: hr_utility.set_message_token( 'PARAMETER', p_parameter.parameter_name );
1353: hr_utility.raise_error;
1354: end if;
1348: then
1349: hr_utility.set_message( 800, 'HR_50317_DP_BAD_FUNCTION_RET' );
1350: hr_utility.set_message_token
1351: ( 'FUNCTION', c_get_function_package || '.' || p_function.function_name );
1352: hr_utility.set_message_token( 'PARAMETER', p_parameter.parameter_name );
1353: hr_utility.raise_error;
1354: end if;
1355:
1356: p_function.ret_type := l_datatype( l_seqno );
1349: hr_utility.set_message( 800, 'HR_50317_DP_BAD_FUNCTION_RET' );
1350: hr_utility.set_message_token
1351: ( 'FUNCTION', c_get_function_package || '.' || p_function.function_name );
1352: hr_utility.set_message_token( 'PARAMETER', p_parameter.parameter_name );
1353: hr_utility.raise_error;
1354: end if;
1355:
1356: p_function.ret_type := l_datatype( l_seqno );
1357:
1373: l_datatype(l_seqno) <> c_dtype_date and
1374: l_datatype(l_seqno) <> c_dtype_boolean and
1375: l_datatype(l_seqno) <> c_dtype_long
1376: then
1377: hr_utility.set_message( 800, 'HR_50319_DP_FUN_BAD_ARG_TYPE' );
1378: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1379: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1380: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
1381: hr_utility.raise_error;
1374: l_datatype(l_seqno) <> c_dtype_boolean and
1375: l_datatype(l_seqno) <> c_dtype_long
1376: then
1377: hr_utility.set_message( 800, 'HR_50319_DP_FUN_BAD_ARG_TYPE' );
1378: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1379: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1380: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
1381: hr_utility.raise_error;
1382: end if;
1375: l_datatype(l_seqno) <> c_dtype_long
1376: then
1377: hr_utility.set_message( 800, 'HR_50319_DP_FUN_BAD_ARG_TYPE' );
1378: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1379: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1380: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
1381: hr_utility.raise_error;
1382: end if;
1383:
1376: then
1377: hr_utility.set_message( 800, 'HR_50319_DP_FUN_BAD_ARG_TYPE' );
1378: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1379: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1380: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
1381: hr_utility.raise_error;
1382: end if;
1383:
1384: p_function_call_tbl(l_currpos).parameter_name :=
1377: hr_utility.set_message( 800, 'HR_50319_DP_FUN_BAD_ARG_TYPE' );
1378: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1379: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1380: hr_utility.set_message_token( 'TYPE', l_datatype(l_seqno) );
1381: hr_utility.raise_error;
1382: end if;
1383:
1384: p_function_call_tbl(l_currpos).parameter_name :=
1385: upper(l_argument_name(l_seqno));
1400: --
1401: -- Got a match. Check that parameter usage types are compatible.
1402: --
1403: if p_distinct_parameter_tbl(i).datatype <> l_datatype(l_seqno) then
1404: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1405: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1406: hr_utility.raise_error;
1407: end if;
1408: --
1401: -- Got a match. Check that parameter usage types are compatible.
1402: --
1403: if p_distinct_parameter_tbl(i).datatype <> l_datatype(l_seqno) then
1404: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1405: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1406: hr_utility.raise_error;
1407: end if;
1408: --
1409: -- If p_parameter is not defaultable then all parameters for its
1402: --
1403: if p_distinct_parameter_tbl(i).datatype <> l_datatype(l_seqno) then
1404: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1405: hr_utility.set_message_token( 'ARGUMENT', l_argument_name(l_seqno) );
1406: hr_utility.raise_error;
1407: end if;
1408: --
1409: -- If p_parameter is not defaultable then all parameters for its
1410: -- mapping function are not defaultable either. If this mapping
1458: --
1459: -- Verify that this it was actually a function.
1460: --
1461: if not l_is_a_function then
1462: hr_utility.set_message( 800, 'HR_50316_DP_NOT_FUNCTION' );
1463: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1464: hr_utility.raise_error;
1465: end if;
1466:
1459: -- Verify that this it was actually a function.
1460: --
1461: if not l_is_a_function then
1462: hr_utility.set_message( 800, 'HR_50316_DP_NOT_FUNCTION' );
1463: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1464: hr_utility.raise_error;
1465: end if;
1466:
1467: --
1460: --
1461: if not l_is_a_function then
1462: hr_utility.set_message( 800, 'HR_50316_DP_NOT_FUNCTION' );
1463: hr_utility.set_message_token( 'FUNCTION', p_function.function_name );
1464: hr_utility.raise_error;
1465: end if;
1466:
1467: --
1468: -- Update indexes in the function table, and the count of function call
1621: --
1622: -- Check that parameter types match.
1623: --
1624: if l_api_parameter.datatype <> l_function_parameter.datatype then
1625: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1626: hr_utility.set_message_token
1627: ( 'ARGUMENT', l_api_parameter.parameter_name );
1628: hr_utility.raise_error;
1629: end if;
1622: -- Check that parameter types match.
1623: --
1624: if l_api_parameter.datatype <> l_function_parameter.datatype then
1625: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1626: hr_utility.set_message_token
1627: ( 'ARGUMENT', l_api_parameter.parameter_name );
1628: hr_utility.raise_error;
1629: end if;
1630: --
1624: if l_api_parameter.datatype <> l_function_parameter.datatype then
1625: hr_utility.set_message( 800, 'HR_50320_DP_FUN_ARG_USAGE' );
1626: hr_utility.set_message_token
1627: ( 'ARGUMENT', l_api_parameter.parameter_name );
1628: hr_utility.raise_error;
1629: end if;
1630: --
1631: -- Get the batch lines column from the parameter list.
1632: --
1663: if l_function_parameter.datatype = c_dtype_long then
1664: p_parameter_counts.long_parameters :=
1665: p_parameter_counts.long_parameters + 1;
1666: if p_parameter_counts.long_parameters > 1 then
1667: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
1668: hr_utility.set_message_token
1669: ( 'API', p_module_package || '.' || p_module_name );
1670: hr_utility.set_message_token
1671: ( 'ARGUMENT', l_function_parameter.parameter_name );
1664: p_parameter_counts.long_parameters :=
1665: p_parameter_counts.long_parameters + 1;
1666: if p_parameter_counts.long_parameters > 1 then
1667: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
1668: hr_utility.set_message_token
1669: ( 'API', p_module_package || '.' || p_module_name );
1670: hr_utility.set_message_token
1671: ( 'ARGUMENT', l_function_parameter.parameter_name );
1672: hr_utility.set_message_token
1666: if p_parameter_counts.long_parameters > 1 then
1667: hr_utility.set_message( 800, 'HR_50016_DP_TOO_MANY_LONGS' );
1668: hr_utility.set_message_token
1669: ( 'API', p_module_package || '.' || p_module_name );
1670: hr_utility.set_message_token
1671: ( 'ARGUMENT', l_function_parameter.parameter_name );
1672: hr_utility.set_message_token
1673: ( 'FUNCTION', l_function_parameter.mapping_function );
1674: hr_utility.raise_error;
1668: hr_utility.set_message_token
1669: ( 'API', p_module_package || '.' || p_module_name );
1670: hr_utility.set_message_token
1671: ( 'ARGUMENT', l_function_parameter.parameter_name );
1672: hr_utility.set_message_token
1673: ( 'FUNCTION', l_function_parameter.mapping_function );
1674: hr_utility.raise_error;
1675: end if;
1676: end if;
1670: hr_utility.set_message_token
1671: ( 'ARGUMENT', l_function_parameter.parameter_name );
1672: hr_utility.set_message_token
1673: ( 'FUNCTION', l_function_parameter.mapping_function );
1674: hr_utility.raise_error;
1675: end if;
1676: end if;
1677:
1678: l_total_parameters := p_parameter_counts.total_parameters + 1;
1896: end if;
1897: end loop;
1898:
1899: if p_parameter_counts.batch_lines_parameters > c_max_batch_lines_cols then
1900: hr_utility.set_message( 800, 'HR_50321_DP_TOO_MANY_ARGS' );
1901: hr_utility.set_message_token
1902: ( 'TOTAL', p_parameter_counts.batch_lines_parameters );
1903: hr_utility.set_message_token( 'MAXIMUM', c_max_batch_lines_cols );
1904: hr_utility.raise_error;
1897: end loop;
1898:
1899: if p_parameter_counts.batch_lines_parameters > c_max_batch_lines_cols then
1900: hr_utility.set_message( 800, 'HR_50321_DP_TOO_MANY_ARGS' );
1901: hr_utility.set_message_token
1902: ( 'TOTAL', p_parameter_counts.batch_lines_parameters );
1903: hr_utility.set_message_token( 'MAXIMUM', c_max_batch_lines_cols );
1904: hr_utility.raise_error;
1905: end if;
1899: if p_parameter_counts.batch_lines_parameters > c_max_batch_lines_cols then
1900: hr_utility.set_message( 800, 'HR_50321_DP_TOO_MANY_ARGS' );
1901: hr_utility.set_message_token
1902: ( 'TOTAL', p_parameter_counts.batch_lines_parameters );
1903: hr_utility.set_message_token( 'MAXIMUM', c_max_batch_lines_cols );
1904: hr_utility.raise_error;
1905: end if;
1906:
1907: exception
1900: hr_utility.set_message( 800, 'HR_50321_DP_TOO_MANY_ARGS' );
1901: hr_utility.set_message_token
1902: ( 'TOTAL', p_parameter_counts.batch_lines_parameters );
1903: hr_utility.set_message_token( 'MAXIMUM', c_max_batch_lines_cols );
1904: hr_utility.raise_error;
1905: end if;
1906:
1907: exception
1908: when others then
2029: open csr_check_compile( p_object_name, p_object_type );
2030: fetch csr_check_compile into l_status;
2031: close csr_check_compile;
2032: if upper( l_status ) <> 'VALID' then
2033: hr_utility.set_message( 800, 'HR_50322_DP_COMPILE_FAILED' );
2034: hr_utility.set_message_token( 'OBJECT', p_object_name );
2035: hr_utility.raise_error;
2036: end if;
2037: end check_compile;
2030: fetch csr_check_compile into l_status;
2031: close csr_check_compile;
2032: if upper( l_status ) <> 'VALID' then
2033: hr_utility.set_message( 800, 'HR_50322_DP_COMPILE_FAILED' );
2034: hr_utility.set_message_token( 'OBJECT', p_object_name );
2035: hr_utility.raise_error;
2036: end if;
2037: end check_compile;
2038:
2031: close csr_check_compile;
2032: if upper( l_status ) <> 'VALID' then
2033: hr_utility.set_message( 800, 'HR_50322_DP_COMPILE_FAILED' );
2034: hr_utility.set_message_token( 'OBJECT', p_object_name );
2035: hr_utility.raise_error;
2036: end if;
2037: end check_compile;
2038:
2039: -- ------------------------ create_view -----------------------------------
2628: else
2629: p_precall := p_precall || 'else' || c_newline;
2630: end if;
2631: p_precall := p_precall ||
2632: 'hr_utility.set_message(800,''HR_50327_DP_TYPE_ERR'');' || c_newline ||
2633: 'hr_utility.set_message_token(''TYPE'',''BOOLEAN'');' || c_newline ||
2634: 'hr_utility.set_message_token(''PARAMETER'',''' ||
2635: p_parameter.parameter_name || ''');' || c_newline ||
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2629: p_precall := p_precall || 'else' || c_newline;
2630: end if;
2631: p_precall := p_precall ||
2632: 'hr_utility.set_message(800,''HR_50327_DP_TYPE_ERR'');' || c_newline ||
2633: 'hr_utility.set_message_token(''TYPE'',''BOOLEAN'');' || c_newline ||
2634: 'hr_utility.set_message_token(''PARAMETER'',''' ||
2635: p_parameter.parameter_name || ''');' || c_newline ||
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2637: ');' || c_newline ||
2630: end if;
2631: p_precall := p_precall ||
2632: 'hr_utility.set_message(800,''HR_50327_DP_TYPE_ERR'');' || c_newline ||
2633: 'hr_utility.set_message_token(''TYPE'',''BOOLEAN'');' || c_newline ||
2634: 'hr_utility.set_message_token(''PARAMETER'',''' ||
2635: p_parameter.parameter_name || ''');' || c_newline ||
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2637: ');' || c_newline ||
2638: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
2632: 'hr_utility.set_message(800,''HR_50327_DP_TYPE_ERR'');' || c_newline ||
2633: 'hr_utility.set_message_token(''TYPE'',''BOOLEAN'');' || c_newline ||
2634: 'hr_utility.set_message_token(''PARAMETER'',''' ||
2635: p_parameter.parameter_name || ''');' || c_newline ||
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2637: ');' || c_newline ||
2638: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
2639: c_newline ||
2640: 'hr_utility.raise_error;' || c_newline ||
2634: 'hr_utility.set_message_token(''PARAMETER'',''' ||
2635: p_parameter.parameter_name || ''');' || c_newline ||
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2637: ');' || c_newline ||
2638: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
2639: c_newline ||
2640: 'hr_utility.raise_error;' || c_newline ||
2641: 'end if;';
2642: return;
2636: 'hr_utility.set_message_token(''VALUE'',' || l_cursor_field ||
2637: ');' || c_newline ||
2638: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
2639: c_newline ||
2640: 'hr_utility.raise_error;' || c_newline ||
2641: 'end if;';
2642: return;
2643: end if;
2644: end add_to_precall;
2999: p_call :=
3000: p_call || p_parameter.mapping_definition || ' => ' || p_local_variable;
3001:
3002: if g_debug then
3003: hr_utility.trace
3004: (p_parameter.parameter_name || ':' ||
3005: p_parameter.mapping_definition || ':' || p_local_variable
3006: );
3007: end if;
3459: 'hr_data_pump.entry(''call'');' || c_newline ||
3460: 'open cr;' || c_newline ||
3461: 'fetch cr into c;' || c_newline ||
3462: 'if cr%notfound then' || c_newline ||
3463: 'hr_utility.set_message(800,''HR_50326_DP_NO_ROW'');' || c_newline ||
3464: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
3465: c_newline ||
3466: 'hr_utility.set_message_token(''COLUMN'',''P_BATCH_LINE_ID'');' ||
3467: c_newline ||
3460: 'open cr;' || c_newline ||
3461: 'fetch cr into c;' || c_newline ||
3462: 'if cr%notfound then' || c_newline ||
3463: 'hr_utility.set_message(800,''HR_50326_DP_NO_ROW'');' || c_newline ||
3464: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
3465: c_newline ||
3466: 'hr_utility.set_message_token(''COLUMN'',''P_BATCH_LINE_ID'');' ||
3467: c_newline ||
3468: 'hr_utility.set_message_token(''VALUE'',p_batch_line_id);' ||
3462: 'if cr%notfound then' || c_newline ||
3463: 'hr_utility.set_message(800,''HR_50326_DP_NO_ROW'');' || c_newline ||
3464: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
3465: c_newline ||
3466: 'hr_utility.set_message_token(''COLUMN'',''P_BATCH_LINE_ID'');' ||
3467: c_newline ||
3468: 'hr_utility.set_message_token(''VALUE'',p_batch_line_id);' ||
3469: c_newline ||
3470: 'hr_utility.raise_error;' || c_newline ||
3464: 'hr_utility.set_message_token(''TABLE'',''HR_PUMP_BATCH_LINES'');' ||
3465: c_newline ||
3466: 'hr_utility.set_message_token(''COLUMN'',''P_BATCH_LINE_ID'');' ||
3467: c_newline ||
3468: 'hr_utility.set_message_token(''VALUE'',p_batch_line_id);' ||
3469: c_newline ||
3470: 'hr_utility.raise_error;' || c_newline ||
3471: 'end if;';
3472: --
3466: 'hr_utility.set_message_token(''COLUMN'',''P_BATCH_LINE_ID'');' ||
3467: c_newline ||
3468: 'hr_utility.set_message_token(''VALUE'',p_batch_line_id);' ||
3469: c_newline ||
3470: 'hr_utility.raise_error;' || c_newline ||
3471: 'end if;';
3472: --
3473: split_sql_text
3474: (p_last => false
3633: ,p_text_pieces => l_body_pieces
3634: );
3635: exception
3636: when plsql_value_error then
3637: hr_utility.set_message( 800, 'HR_50323_DP_CODE_TOO_BIG' );
3638: hr_utility.raise_error;
3639: end;
3640: --
3641: -- Compile the header and body.
3634: );
3635: exception
3636: when plsql_value_error then
3637: hr_utility.set_message( 800, 'HR_50323_DP_CODE_TOO_BIG' );
3638: hr_utility.raise_error;
3639: end;
3640: --
3641: -- Compile the header and body.
3642: --
3684: where upper(module_name) = upper(p_module_name)
3685: and upper(module_package) = upper(p_module_package)
3686: and upper(api_module_type) in ('AI', 'BP', 'DM');
3687: begin
3688: g_debug := hr_utility.debug_enabled;
3689:
3690: if g_debug then
3691: hr_utility.trace
3692: ('----------- Generate API: ' || p_module_package || '.' ||
3687: begin
3688: g_debug := hr_utility.debug_enabled;
3689:
3690: if g_debug then
3691: hr_utility.trace
3692: ('----------- Generate API: ' || p_module_package || '.' ||
3693: p_module_name || '----------');
3694: end if;
3695:
3705: open csr_api_module_id(p_module_package, p_module_name);
3706: fetch csr_api_module_id into l_api_module_id;
3707: if csr_api_module_id%notfound then
3708: close csr_api_module_id;
3709: hr_utility.set_message(800, 'HR_33156_DP_NOT_IN_API_MODULES');
3710: hr_utility.set_message_token
3711: ( 'API', p_module_package || '.' || p_module_name );
3712: hr_utility.raise_error;
3713: end if;
3706: fetch csr_api_module_id into l_api_module_id;
3707: if csr_api_module_id%notfound then
3708: close csr_api_module_id;
3709: hr_utility.set_message(800, 'HR_33156_DP_NOT_IN_API_MODULES');
3710: hr_utility.set_message_token
3711: ( 'API', p_module_package || '.' || p_module_name );
3712: hr_utility.raise_error;
3713: end if;
3714: close csr_api_module_id;
3708: close csr_api_module_id;
3709: hr_utility.set_message(800, 'HR_33156_DP_NOT_IN_API_MODULES');
3710: hr_utility.set_message_token
3711: ( 'API', p_module_package || '.' || p_module_name );
3712: hr_utility.raise_error;
3713: end if;
3714: close csr_api_module_id;
3715:
3716: purge( p_module_package, p_module_name );
3718: hr_pump_utils.name( p_module_package, p_module_name, l_package_name,
3719: l_view_name );
3720:
3721: if g_debug then
3722: hr_utility.trace('Package: ' || l_package_name);
3723: hr_utility.trace('View: ' || l_view_name);
3724: end if;
3725:
3726: create_view( l_view_name, l_parameter_tbl, l_parameter_counts,
3719: l_view_name );
3720:
3721: if g_debug then
3722: hr_utility.trace('Package: ' || l_package_name);
3723: hr_utility.trace('View: ' || l_view_name);
3724: end if;
3725:
3726: create_view( l_view_name, l_parameter_tbl, l_parameter_counts,
3727: l_api_module_id );
3931:
3932: --
3933: -- Generate and output the messages saying what has been created.
3934: --
3935: hr_utility.set_message( 800, 'HR_50324_DP_GEN_PKG' );
3936: hr_utility.set_message_token( 'PACKAGE', l_package_name );
3937: l_message := hr_utility.get_message;
3938: output_text( l_message);
3939: --
3932: --
3933: -- Generate and output the messages saying what has been created.
3934: --
3935: hr_utility.set_message( 800, 'HR_50324_DP_GEN_PKG' );
3936: hr_utility.set_message_token( 'PACKAGE', l_package_name );
3937: l_message := hr_utility.get_message;
3938: output_text( l_message);
3939: --
3940: hr_utility.set_message( 800, 'HR_50325_DP_GEN_VIEW' );
3933: -- Generate and output the messages saying what has been created.
3934: --
3935: hr_utility.set_message( 800, 'HR_50324_DP_GEN_PKG' );
3936: hr_utility.set_message_token( 'PACKAGE', l_package_name );
3937: l_message := hr_utility.get_message;
3938: output_text( l_message);
3939: --
3940: hr_utility.set_message( 800, 'HR_50325_DP_GEN_VIEW' );
3941: hr_utility.set_message_token( 'VIEW', l_view_name );
3936: hr_utility.set_message_token( 'PACKAGE', l_package_name );
3937: l_message := hr_utility.get_message;
3938: output_text( l_message);
3939: --
3940: hr_utility.set_message( 800, 'HR_50325_DP_GEN_VIEW' );
3941: hr_utility.set_message_token( 'VIEW', l_view_name );
3942: l_message := hr_utility.get_message;
3943: output_text( l_message);
3944: --
3937: l_message := hr_utility.get_message;
3938: output_text( l_message);
3939: --
3940: hr_utility.set_message( 800, 'HR_50325_DP_GEN_VIEW' );
3941: hr_utility.set_message_token( 'VIEW', l_view_name );
3942: l_message := hr_utility.get_message;
3943: output_text( l_message);
3944: --
3945: -- Generate the header.
3938: output_text( l_message);
3939: --
3940: hr_utility.set_message( 800, 'HR_50325_DP_GEN_VIEW' );
3941: hr_utility.set_message_token( 'VIEW', l_view_name );
3942: l_message := hr_utility.get_message;
3943: output_text( l_message);
3944: --
3945: -- Generate the header.
3946: --