How to Change AP Formats in R12

Embed Size (px)

Citation preview

  • 8/3/2019 How to Change AP Formats in R12

    1/27

    How to Change AP Formats in R12

    Cambridge SolutionsM

    Robert Rentz [email protected]

    Christine Courty [email protected]

  • 8/3/2019 How to Change AP Formats in R12

    2/27

    Agenda

    Introduction

    Concepts

    Back in 11i

    2Cambridge Solutions

    Data Definition

    View Changes

    BI Publisher Format File

    Conclusion

  • 8/3/2019 How to Change AP Formats in R12

    3/27

    Introduction

    In R12, Payment documents are delivered through BI Publisher(Also known as XML Publisher)

    Oracle Reports is no longer used

    XSD Data Definition is configured through Views in the IBY schema

    3Cambridge Solutions

    Custom fields are added to these views using functions that appenddata to the XSD

    Oracle provides a package where you can add your custom fields (e.g.Attribute fields)

    Payment Format process creates the XSD based on the paymentparameters and calls the BI template

  • 8/3/2019 How to Change AP Formats in R12

    4/27

    Concepts

    1. Data Definition

    1. XML Data Definition File containing the structure and data

    2. Format File

    1. MS Word RTF file created by BI Publisher that uses the Data Definition to

    4Cambridge Solutions

    crea e a spec c ou pu orma

    3. Template

    1. Definition of the link between a Data Definition and a Format File that islinked to a Payment Format

  • 8/3/2019 How to Change AP Formats in R12

    5/27

    Concepts

    1. Create the templates for your payment outputs

    1. Can use Payment Setups but XML Publisher Administrator is also available.

    2. Create your BI Format File using BI Publisher and MS Word

    3. Im ort the format file into our tem late

    5Cambridge Solutions

    4. Run the Payment Format process to get the sample DataDefinition (XSD)

    5.

    Modify your BI Format File to use the fields that you added

    6. Re-import and save your new BI Format File

  • 8/3/2019 How to Change AP Formats in R12

    6/27

    Back in 11i

    1. You created a Payment Format using Oracle Reports

    2. You linked that format to a payment type

    3. You changed the Report Output to XML to generate the XSD

    6Cambridge Solutions

    4.

    ou eve ope your orma e o use e emp a e

    5. You registered the Data Definition

    6. You registered the Template with the BI Format File

    7. When you run the Payment Format the output wasgenerated in the BI format

  • 8/3/2019 How to Change AP Formats in R12

    7/27

    Template Setup

    7Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    8/27

    Template Setup

    8Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    9/27

    Template Setup Template Definition

    9Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    10/27

    Template Setup Template Definition

    10Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    11/27

    Template Setup Define Format File

    11Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    12/27

    Template Setup Export Default Format File

    12Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    13/27

    Template Setup Export Default Format File

    13Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    14/27

    Template Setup Export Default Format File

    1. Save this to your local drive

    2. Assign it the name you want to use as your Format FileName

    14Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    15/27

    Template Setup Define Format File

    15Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    16/27

    Template Setup Define Format File

    16Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    17/27

    Data Definition1. Prepare an invoice for payment

    2. Run the Payments Manager process to format a check

    3. When the Pending Actions displays, go to Monitor Requests

    4. View the Log of the Format Payment Instructions program

    17Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    18/27

    Data Definition1. Find the line beginning

    2. Cut and paste the entire line and save as with a .XML extension

    3. Save it in the directory where you will be developing your BI Format file

    18Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    19/27

    View Changes

    To add additional fields to the default XML data definition:

    1. Open the package IBY_FD_EXTRACT_EXT_PUB

    2. Create a cursor that uses the XML_CONCAT andXML_ELEMENT functions

    19Cambridge Solutions

    3. Save and compile the package

  • 8/3/2019 How to Change AP Formats in R12

    20/27

    View Changes Using the Seeded ExampleFUNCTION Get_Docline_Ext_Agg(p_document_payable_id IN NUMBER, p_line_number IN NUMBER) RETURN XMLTYPE IS

    l_ins_ext_agg XMLTYPE;

    CURSOR l_ins_ext_csr IS

    SELECT XMLConcat(

    XMLElement("Extend", XMLElement("Name", 'HundredK'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,1))),

    XMLElement("Extend", XMLElement("Name", 'TenK'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,2))),

    XMLElement("Extend", XMLElement("Name", 'Thousand'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,3))),

    XMLElement("Extend", XMLElement("Name", 'Hundred'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,4))),

    XMLElement("Extend", XMLElement("Name", 'Tens'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,5))),

    XMLElement("Extend", XMLElement("Name", 'Units'), XMLElement("Value", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,6))) )

    20Cambridge Solutions

    FROM ap_document_lines_v apdl, iby_docs_payable_all ibydoc, iby_pay_service_requests ibypsr

    WHERE ibydoc.document_payable_id = p_document_payable_id

    AND nvl(ibydoc.calling_app_doc_unique_ref1,-99) = nvl(apdl.calling_app_doc_unique_ref1,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref2,-99) = nvl(apdl.calling_app_doc_unique_ref2,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref3,-99) = nvl(apdl.calling_app_doc_unique_ref3,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref4,-99) = nvl(apdl.calling_app_doc_unique_ref4,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref5,-99) = nvl(apdl.calling_app_doc_unique_ref5,-99)

    AND ibydoc.calling_app_id = apdl.calling_app_id AND ibypsr.call_app_pay_service_req_code = apdl.call_app_pay_service_req_code

    AND ibydoc.payment_service_request_id = ibypsr.payment_service_request_id;

    BEGIN

    OPEN l_ins_ext_csr ;

    FETCH l_ins_ext_csr INTO l_ins_ext_agg;

    CLOSE l_ins_ext_csr;

    RETURN l_ins_ext_agg;

    END Get_Docline_Ext_Agg;

  • 8/3/2019 How to Change AP Formats in R12

    21/27

    View Changes Using the Seeded Example

    HundredK ZERO

    TenK ZERO

    Issues

    1. There is an Extend group tag and

    Name and Value tags for eachcustom field

    2. You would need to loop through eachExtend and perform a When on

    21Cambridge Solutions

    Thousand ONE

    Hundred TWO

    Tens THREE

    Units FOUR

    the name to see if that is the Valueyou want to print

    3. Way too cumbersome

  • 8/3/2019 How to Change AP Formats in R12

    22/27

    View Changes Recommended Example

    FUNCTION Get_Docline_Ext_Agg(p_document_payable_id IN NUMBER, p_line_number IN NUMBER) RETURN XMLTYPE IS

    l_ins_ext_agg XMLTYPE;

    CURSOR l_ins_ext_csr IS

    SELECT XMLConcat(

    XMLElement("Custom",

    XMLElement("HundredK",nhssc_positive_pay_pkg.words(apdl.line_gross_amount,1)),

    XMLElement("TenK", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,2)),

    XMLElement("Thousand", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,3)),

    XMLElement("Hundred", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,4)),

    XMLElement("Tens", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,5)),

    22Cambridge Solutions

    XMLElement("Units", nhssc_positive_pay_pkg.words(apdl.line_gross_amount,6)) ) )

    FROM ap_document_lines_v apdl, iby_docs_payable_all ibydoc, iby_pay_service_requests ibypsr

    WHERE ibydoc.document_payable_id = p_document_payable_id

    AND nvl(ibydoc.calling_app_doc_unique_ref1,-99) = nvl(apdl.calling_app_doc_unique_ref1,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref2,-99) = nvl(apdl.calling_app_doc_unique_ref2,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref3,-99) = nvl(apdl.calling_app_doc_unique_ref3,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref4,-99) = nvl(apdl.calling_app_doc_unique_ref4,-99)

    AND nvl(ibydoc.calling_app_doc_unique_ref5,-99) = nvl(apdl.calling_app_doc_unique_ref5,-99)

    AND ibydoc.calling_app_id = apdl.calling_app_id AND ibypsr.call_app_pay_service_req_code = apdl.call_app_pay_service_req_code

    AND ibydoc.payment_service_request_id = ibypsr.payment_service_request_id;

    BEGIN

    OPEN l_ins_ext_csr ;

    FETCH l_ins_ext_csr INTO l_ins_ext_agg;

    CLOSE l_ins_ext_csr;

    RETURN l_ins_ext_agg;

    END Get_Docline_Ext_Agg;

  • 8/3/2019 How to Change AP Formats in R12

    23/27

    View Changes Recommended Example

    ZERO

    ZERO

    ONE

    TWO

    THREE

    Better:

    1.

    Only one Custom tag

    2. Can reference the fielddirectly

    23Cambridge Solutions

    FOUR

    3. No looping

  • 8/3/2019 How to Change AP Formats in R12

    24/27

    BI Publisher Format File

    1. Open BI Publisher

    2. Open the format file you exported earlier and renamed

    3. Open the XML data definition you copied from the Format Payment Instructions concurrent program

    4. Modify / add the fields to this format file

    5. Save and update the format file in the Format screen of the Template in Oracle Payments setup

    24Cambridge Solutions

  • 8/3/2019 How to Change AP Formats in R12

    25/27

    BI Publisher Format File

    25Cambridge Solutions

    emons ra on

  • 8/3/2019 How to Change AP Formats in R12

    26/27

    Conclusion and Tips

    1. The R12 technical architecture is vastly different than 11i

    2. Get a copy of the XML Data Definition before thinking thatyou need to add fields

    3. Attribute fields are NOT in the XML Data Definition so you

    26Cambridge Solutions

    payment documents

    4. Use a single invoice to test your changes. There is a limit of1 million bytes that will print the XML Data Definition in thelog file

    5. For testing purposes, void and recreate the same check. Itbypasses the need to keep creating invoices to pay

  • 8/3/2019 How to Change AP Formats in R12

    27/27

    How to Change AP Formats in R12

    Cambridge SolutionsM

    Robert Rentz [email protected]

    Christine Courty [email protected]