Create ADI by using Package /Procedure
Create ADI by using Package /Procedure
:-
--====================================================
CREATE TABLE APPS.XXSD_PROC_ADI_TL
(
EMPLOYEE_NUMBER VARCHAR2(100 BYTE),
FIRST_NAME VARCHAR2(100 BYTE),
LAST_NAME VARCHAR2(100 BYTE),
DATE_OF_BIRTH DATE,
GRADE VARCHAR2(10 BYTE)
)
select * from XXSD_PROC_ADI_TL
--====================================================
CREATE OR REPLACE PACKAGE APPS.XX_PROCEDURE_ADI AS
PROCEDURE
XX_INSERT_DATA_ADI (
P_EMPLOYEE_NUMBER VARCHAR2
,P_FIRST_NAME
VARCHAR2
,P_LAST_NAME
VARCHAR2
,P_DATE_OF_BIRTH
DATE
,P_GRADE
VARCHAR2
);
END;
/
--====================================================
CREATE OR REPLACE PACKAGE BODY APPS.XX_PROCEDURE_ADI AS
PROCEDURE
XX_INSERT_DATA_ADI (
P_EMPLOYEE_NUMBER VARCHAR2
,P_FIRST_NAME
VARCHAR2
,P_LAST_NAME
VARCHAR2
,P_DATE_OF_BIRTH
DATE
,P_GRADE
VARCHAR2
) IS
lc_sqlerrm VARCHAR2 (2000);
lc_error_msg VARCHAR2 (2000);
l_responsibility_id NUMBER := apps.fnd_global.resp_id;
l_resp_application_id NUMBER := apps.fnd_global.resp_appl_id;
l_org_id NUMBER := apps.fnd_global.org_id;
l_user_id NUMBER := apps.fnd_global.user_id;
BEGIN
INSERT INTO XXSD_PROC_ADI_TL (
EMPLOYEE_NUMBER
,FIRST_NAME
,LAST_NAME
,DATE_OF_BIRTH
,GRADE
)
VALUES (
P_EMPLOYEE_NUMBER
,P_FIRST_NAME
,P_LAST_NAME
,P_DATE_OF_BIRTH
,P_GRADE
);
COMMIT;
EXCEPTION WHEN OTHERS THEN
lc_sqlerrm := SUBSTR(SQLERRM,1,1999);
raise_application_error (-20001, 'OTHER_EXCEPTION
- MSG | ' ||
lc_sqlerrm);
END;
END;
/
--====================================================
Comments
Post a Comment