PL/SQL Report Development Process Document OracleApps88
Step1: Compile the Below package in instance
--> Package Specification
CREATE OR REPLACE PACKAGE APPS.XXCUST_PO_DETAILS_PKG
AS
-- XXCUST_PO_DETAILS - XXCUST PO Details Report
PROCEDURE PO_DETAILS (
retcode OUT VARCHAR2, --> Mandatory Parameter Seq:1
errbuff OUT VARCHAR2, --> Mandatory Parameter Seq:2
p_po_num IN VARCHAR2
);
END XXCUST_PO_DETAILS_PKG;
/
--> Package Body
CREATE OR REPLACE PACKAGE BODY APPS.XXCUST_PO_DETAILS_PKG
IS
-- XXCUST_PO_DETAILS - XXCUST PO Details Report
PROCEDURE PO_DETAILS (
retcode OUT VARCHAR2,
errbuff OUT VARCHAR2,
p_po_num IN VARCHAR2
)
IS
CURSOR PH
IS select po_header_id,segment1,authorization_status
from po_headers_all pha
where 1=1
and pha.segment1 = NVL(P_PO_NUM, pha.segment1)
and pha.org_id = 204
and pha.type_lookup_code = 'STANDARD';
CURSOR PL (P_PO_NUMBER VARCHAR2)
IS select pla.po_line_id,pla.line_num,pla.item_id,pla.item_description,pla.unit_price,[Link]
from po_headers_all pha,Po_lines_all pla
where 1=1
and pha.segment1 = P_PO_NUMBER
and pha.org_id = 204
and pha.type_lookup_code = 'STANDARD'
and pha.po_header_id = pla.po_header_id;
BEGIN
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<?xml version="1.0" encoding="UTF-8"?>');
-- FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<!-- Generated by Oracle Reports version [Link].0 -->');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<XXCUST_PO_DETAILS>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<LIST_G_PO_HEADER_ID>');
FOR i IN PH
LOOP
-- Generating XML Tags for Headers
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<G_PO_HEADER_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<SEGMENT1>'|| I.SEGMENT1|| '</SEGMENT1>');
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<PO_HEADER_ID>'|| I.PO_HEADER_ID||
'</PO_HEADER_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<AUTHORIZATION_STATUS>'||
I.AUTHORIZATION_STATUS || '</AUTHORIZATION_STATUS>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'<LIST_G_PO_LINE_ID>');
FOR j IN PL(I.SEGMENT1)
LOOP
-- Generating XML Tags for Lines
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<G_PO_LINE_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<PO_LINE_ID>'|| J.PO_LINE_ID||
'</PO_LINE_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<ITEM_ID>'|| J.ITEM_ID || '</ITEM_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<ITEM_DESCRIPTION>'|| J.ITEM_DESCRIPTION ||
'</ITEM_DESCRIPTION>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<LINE_NUM>'|| J.LINE_NUM || '</LINE_NUM>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<UNIT_PRICE>'|| J.UNIT_PRICE ||
'</UNIT_PRICE>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '<QUANTITY>'|| [Link] || '</QUANTITY>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT, '</G_PO_LINE_ID>');
END LOOP; --End Loop PL
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'</LIST_G_PO_LINE_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'</G_PO_HEADER_ID>');
END LOOP; --End Loop PH
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'</LIST_G_PO_HEADER_ID>');
FND_FILE.PUT_LINE (FND_FILE.OUTPUT,'</XXCUST_PO_DETAILS>');
END PO_DETAILS;
END XXCUST_PO_DETAILS_PKG;
/
Step2 : Loging to Application and go to Applica Developer responsibility and create the concurrent program
Nav : Application Developer Concurrent Executable
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step3 : Enter the below Details save the form
Field Value
Executable XXCUST_PO_DETAILS
Short Name XXCUST_PO_DETAILS
Application Custom Development
Description XXCUST PO Details Report
Execution method PL/SQL Stored Procedure
Execution File Name XXCUST_PO_DETAILS_PKG. PO_DETAILS
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step4 : Create the Concurrent program with above Executable
Nav : Application Developer Concurrent Program
Step5 : Enter the below details and save the form
Field Value
Program XXCUST PO Details Report
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Short Name XXCUST_PO_DETAILS
Application Custom Development
Description XXCUST PO Details Report
Executable Name XXCUST_PO_DETAILS (Created in Step3)
Output Format XML
Save and click on the Parameters
Step 6: Enter the parameter details and save
Note : Concurrent Parameters sequence should follow the Package input parameters sequence
Field Value
Seq 10
Parameter P_PO_NUM (Any meaningful Name)
Value Set 100 Characters
Prompt PO Number
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step 7 : Add the concurrent program to Request group
Nav : System Administrator Security Responsibility Request
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step8: Query the request group and add the concurrent program
Field Value
Group All Reports
Application Purchasing
Program XXCUST PO Details Report
Note: To develop the RTF get the xml from concurrent program
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step9 : Run the program from Purchasing Responsibility
Nav : Purchasing, Vision Operation (USA) View Requests Submit New Requests Single Request
Submit the “XXCUST PO Details Report” program with PO Number parameter as 500 (Any po number value, If
you not pass the value It will disply for all po number)
Step10 : Click on the View Output
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Step11 : Save the XML file in desktop with XXCUST_PO_DETAILS.xml (Any Name)
Step12 : Develop the RTF file with Above xml file and save with XXCUST_PO_DETAILS.rtf
Step13 : Test the RTF file in local System
Load the XML File
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Click on the Preview File
Step 14 : Create the Data definition and Template and upload the above developed RTF file
Create the Data definition
Nav : XML Publisher Administrator Home Data Definition
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Click on Create Data Definition
Enter the below values and save the page
Field Value
Name XXCUST PO Details Report
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Code XXCUST_PO_DETAILS (Data Definition code should be
equals to concurrent program sort name)
Application Custom Development
Create the template with above Data Definition
Nav : XML Publisher Administrator Home Template
Click on the Create Template
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Enter the values and save the page
Field Value
Name XXCUST PO Details Report
Code XXCUST_PO_DETAILS
Application Custom Development
Data Definition XXCUST PO Details Report
Type RTF
Default Output Type PDF
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Now go to Purchasing Responsibility and run the report with parameter
Nav : Purchasing, Vision Operation (USA) View Requests Submit New Requests Single Request
Submit the “XXCUST PO Details Report” program with PO Number parameter as 500 (Any po number value, If
you not pass the value It will disply for all po number)
Note : Once the template is created it will show in concurrent program
RAJU CHINTHAPATLA
PL/SQL Report Development Process Document OracleApps88
Click on View Output file
RAJU CHINTHAPATLA