Infolinks

Friday 6 July 2012

Format Customization in Oracle Payments using Extensibility Utility Package

From Oracle Accounts Payable, user submits the invoices to Oracle Payments as a Payment Process Request. Oracle Payments uses the invoice information submitted in the Payment Request to create Documents Payable and then groups them into Payments and Payment Instructions for processing payments. This processed information is then recorded in the database tables. The processed payment information is retrieved by Oracle Payments database views to generate the XML extract. The generated XML extract is used in conjunction with the RTF/ETEXT template by Business Intelligence Publisher to generate output.
Oracle Payments provides the IBY_FD_EXTRACT_EXT_PUB extensibility package to construct custom XML element structure that can be added to the payment XML extract generated by Oracle Payments. The package specification and body definition can be found in files ibyfdxes.pls and ibyfdxeb.pls respectively. These files are located in the $IBY_TOP/patch/115/sql directory. 
The package allows custom elements to be created at following levels.
  • Instruction
  • Payment
  • Document Payable
  • Document Payable Line
  • Payment Process Request
You cannot customize the package specification, but package body contains stubbed functions that you can customize. 
The five functions are as follows:
FUNCTION Get_Ins_Ext_Agg(p_payment_instruction_id IN NUMBER) RETURN XMLTYPE
This function allows XML element to be introduced at instruction level and run only once for the instruction.
FUNCTION Get_Pmt_Ext_Agg(p_payment_id IN NUMBER) RETURN XMLTYPE
This function allows XML element to be introduced at payment level and run once for each payment in the instruction.
FUNCTION Get_Doc_Ext_Agg(p_document_payable_id IN NUMBER) RETURN XMLTYPE
This function allows XML element to be introduced at document payable level and run once for each document payable in the instruction.
FUNCTION Get_Docline_Ext_Agg(p_document_payable_id IN NUMBER, p_line_number IN NUMBER) RETURN XMLTYPE
This function allows XML element to be introduced at document payable line level and run once for each document payable line in the instruction.
FUNCTION Get_Ppr_Ext_Agg(p_payment_service_request_id IN NUMBER) RETURN XMLTYPE
This function allows XML element to be introduced at document payable level and run once for each payment process request. 
First determine which function within IBY_FD_EXTRACT_EXT_PUB should be modified. Then write a PL/SQL block similar to the structure given below into the package body function definition, replacing the lines “BEGIN” and “RETURN NULL”, and retaining all other lines:
01<local_xml_variable>  XMLTYPE;
02 
03  CURSOR <cursor_name> (<cursor_parameter_name> IN NUMBER) IS
04  SELECT XMLConcat(
05           XMLElement("Extend",
06             XMLElement("Name", '<xml_tag_name1>'),
07             XMLElement("Value", <xml_tag_value2>)),
08           XMLElement("Extend",
09             XMLElement("Name", '<xml_tag_name2>'),
10             XMLElement("Value", < xml_tag_value2>))
11         )
12   FROM <data_table_name>
13 WHERE <table_identifier_column> = <cursor_parameter_name>;
14 
15BEGIN
16 
17  OPEN <cursor_name> (<function_parameter_name>);
18  FETCH <cursor_name> INTO <local_xml_variable>;
19  CLOSE <cursor_name>;
20 
21  RETURN <local_xml_variable>;
A sample xml file with extended tags will look like:

Then modify the eText template using the new custom elements. Use the following syntax to select the appropriate Name/Value pair.
…/Extend[Name='<xml_tag_name1>']/Value

You can use BI Publisher Template Viewer to view the final eText Outputs.
Reference Articles in MOS:
  • Format Customization in Oracle Payments for Oracle Applications Release 12 [ID 787467.1]
  • R12: Can Users Customize XML Extract? [ID 457539.1]
  • R12 Oracle Payments Processing ‘How To’ documents [ID 579132.1]
  • R12: How To Assign/Modify XML Publisher Payment Templates [ID 414336.1]

No comments:

Post a Comment