BI Publisher Procedure Registration Steps
BI Publisher Procedure Registration Steps
is
cursor EMP_CUR
is
SELECT PERSON_ID, FULL_NAME, DATE_OF_BIRTH
from PER_ALL_PEOPLE_F
WHERE PERSON_ID BETWEEN 194 AND 198;
-- Declare a Record
-- Record is a collection of fields
-- Record can be declared on the basis of a table / cursor
-- Declaring a Record based on a Cursor
EMP_REC EMP_CUR%ROWTYPE;
-- emp_rec is the name of the record
-- emp_rec will hold person_id, full_name and date_of_birth
BEGIN
OPEN EMP_CUR; -- It will the execute the query , active set gets created and
-- it will point to the row above the first row
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0"?>');
FND_FILE.PUT_LINE(fnd_file.output,'<EmployeeRoot>');
LOOP
-- Fetch fetches one row from the Active Set and stores
-- it into the record
FETCH EMP_CUR
INTO EMP_REC;
-- STOP WHEN THE Records present in the Active Set are processed.
EXIT WHEN EMP_CUR%NOTFOUND;
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<EMPLOYEE>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<PERSON_ID>' || EMP_REC.PERSON_ID ||
'</PERSON_ID>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<FULL_NAME>' || EMP_REC.FULL_NAME ||
'</FULL_NAME>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<DATE_OF_BIRTH>'|| EMP_REC.DATE_OF_BIRTH ||
'</DATE_OF_BIRTH>');
FND_FILE.PUT_LINE(fnd_file.output,'</EMPLOYEE>');
END LOOP;
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</EmployeeRoot>');
CLOSE EMP_CUR; -- Memory is released.
EXCEPTION
-- Generic Exception Handler
WHEN OTHERS THEN
V_ERROR_CODE := SQLCODE;
-- SQLCode is a function returns the error code
-- SQLERRM is a function which return the message associated with the Error
-- ORA-01476: divisor is equal to zero
-- SQLCode gives 01476
-- SQLERRM gives divisor is equal to zero
-- SUBSTR gives the Substring of length 200 characters
V_ERR_MESSAGE := SUBSTR(SQLERRM,1,200);
FND_FILE.PUT_LINE(FND_FILE.LOG, 'Error Code :' || V_ERROR_CODE);
FND_FILE.PUT_LINE(FND_FILE.LOG,'Error Message :' || V_ERR_MESSAGE);
end;
Save
3. Create Concurrent Program
Login to system Administrator Responsibility
Navigate to Concurrentà Programà Define
Save
4. Attach the concurrent program to the Request Group
Login to system Administrator Responsibility
Securityà ResponsibilityàRequest
Press F11
Put Group Name : All Reports
Put Application : Purchasing
Press Ctrl + F11
Create one blank row by pressing the “+” button
Save