Step1) Create Procedure with parameters
Package Specification:
Package Body:
Step2) Create Executable
Navigation : Application Developer --> Concurrent --> Executable
Give Execution File Name as Package.Procedure name.
Step3) Create Concurrent Program
Navigation : Application Developer --> Concurrent --> Program
Step4) Click on Parameters button and give parameters in the order same as in the procedure. No need to add errbuf and retcode parameters.
Step5) Assign Program to Request group.
Navigation : System Administrator --> Security --> Responsibility --> Request
Step6) Run program from Responsibility
Give the department number to get the employee information.
Submit the program and the output is
Package Specification:
CREATE OR REPLACE PACKAGE APPS.H_EMP_PKG AS PROCEDURE H_EMP_DATA_PARAM (ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2, P_FROM_DEPTNO IN NUMBER, P_TO_DEPTNO IN NUMBER); END H_EMP_PKG;
Package Body:
CREATE OR REPLACE PACKAGE BODY APPS.H_EMP_PKG AS PROCEDURE H_EMP_DATA_PARAM (ERRBUF OUT VARCHAR2, RETCODE OUT VARCHAR2, P_FROM_DEPTNO IN NUMBER, P_TO_DEPTNO IN NUMBER) IS CURSOR C_EMP IS SELECT EMPNO, ENAME, SAL, HIREDATE, DEPTNO FROM EMP WHERE DEPTNO BETWEEN P_FROM_DEPTNO AND P_TO_DEPTNO; BEGIN FOR C_EMP_REC IN C_EMP LOOP FND_FILE.PUT_LINE ( FND_FILE.OUTPUT, RPAD (C_EMP_REC.EMPNO, 3) || ' -- ' || RPAD (C_EMP_REC.ENAME, 15) || ' -- ' || RPAD (C_EMP_REC.SAL, 10) || ' -- ' || RPAD (C_EMP_REC.HIREDATE, 10) || ' -- ' || C_EMP_REC.DEPTNO); END LOOP; END H_EMP_DATA_PARAM; END H_EMP_PKG; /
Step2) Create Executable
Navigation : Application Developer --> Concurrent --> Executable
Give Execution File Name as Package.Procedure name.
Step3) Create Concurrent Program
Navigation : Application Developer --> Concurrent --> Program
Step4) Click on Parameters button and give parameters in the order same as in the procedure. No need to add errbuf and retcode parameters.
Step5) Assign Program to Request group.
Navigation : System Administrator --> Security --> Responsibility --> Request
Step6) Run program from Responsibility
Give the department number to get the employee information.
Submit the program and the output is
No comments:
Post a Comment