Wednesday 21 September 2011

Developing XML Reports without RDF ,SQL Query to develop BI Publisher Reports

The XML Publisher(XMLP / BI Publisher ) requires a Template layout and Data XML to generate the report in PDF, EXCEL, RTF or HTML format .The Data XML can be generated from Oracle Report, OA Framework and Data Template.Using this approach, you can develop BI Publisher reports in Oracle EBS, without having to develop an RDF report.

You can specify an SQL Statement in an XML file, and results of that SQL Statement are published as XMLP Output.

In this article lets understand the usage of Data Template with a small demo. In the next article we will discuss in detail the Data Template XML Schema.
The data template is the XML document whose elements communicate the following information to the data engine.
  • Data Query : The SQL query with bind parameter specifying the data to be fetched.
  • Bind Parameters : Definition of each bind parameter defined in the query.
  • Data Structure : Definition of the Output XML Structure.
  • Data Triggers : Triggers that should be executed before or after the data query execution. Triggers are used to either do initialization or do some post query operation.

Hence Data Template is the means by which we inform the data engine to fetch the data of our interest. Apart from the these , data template also contains other elements. To make our example simple and easy to understand, lets deal with the above 4 elements.

Sample Data template :

XML Publisher Data Template Architecture
The Data engine execute the Data template to generate the Data XML file . The Data XML file is then merged with the Template layout by the XMLP engine to generate the XMLP
Report.

Lets try to build a sample XMLP report to display Employee Details. The Following are the steps involved

Step 1: Design the Data Template XML File.
Step 2: Create the Data Definition in XML Publisher and associate it with Data Template
Step 3: Define a Concurrent Program to generate the Data XML File.
Step 4: Define the RTF Template using the Generated Data XML.
Step 5: Registering the Template with XML Publisher
Step 6: Execute the concurrent program to generate the PDF report.

Step 1 : Design the Data Template XML File.
This Data Template selects the employee details from the EMP table. The select query specifies the columns of interest. It uses a bind parameter to filter the employees of a particular department.

For each bind parameter in the query , we need to define a Parameter. In this case we have defined p_DeptNo parameter.

In the data structure element, we have defined the output XML structure. He we map the columns in the select query with the data xml elements.

Step 2 : Create the Data Definition in XML Publisher and associate it with Data Template
Using Responsibility: XML Publisher Administrator --> Home --> Data Definitions --> Create Data Definition

Screen 1 : Enter the data definition Details and click on Apply. Note down the Code. The code should be used as the short name of the concurrent program.
Screen 2: Click on the "Add File" button against the "Data Template" Label.

Screen 3: Upload the Data Template XML file and Click on Apply.
Screen 4 : The Data Template is associated to the Data Definition..


Step 3: Define a Concurrent Program to generate the Data XML File.

Using Responsibility System Administrator --> Concurrent : Program --> Define.

Screen 1: Define a Concurrent Program With executable = XDODTEXE and Output Format = XML.

Screen 2: For each parameter in the Data Template, define a parameter in the concurrent program. The Data Template parameter name should match the concurrent program parameter token.
Screen 3: Associate the Concurrent Program to a request group.




Screen 4 : Execute the concurrent program "Employee Details Data Template Demo"and click on the output button get the Data XML. Save the XML file. We will use it to generate the RTF Template.

Step 4: Define the RTF Template using the Generated Data XML.
Install the Oracle XML Publisher Desktop available via patch 5887917. Open the Microsoft word. You should be able to see the following menus and toolbars.
Using the menu Data -> Load XML Data... , load the XML File generated from Jdeveloper
If the XML files gets loaded successfully, then you should get the below confirmation.


Using the Table Wizard as below to create the 'Table Report Format' with all the columns of EMP.
The Table Report Format Template should be like

Step 5: Registering the Template with XML Publisher
Responsibility: XML Publisher Administrator --> Home --> Templates --> Create Template.
Enter the Template Name and other details. The Data Definition should be the data definition defined in the above steps. Click on the apply button


Step 6 : Execute the concurrent program to
generate the PDF report.
Open the concurrent program for submission and click on the option button to specify the XML Publisher Template defined in the previous step and Output type to be used. The options specified once gets stored . Hence if open the option window again, the template name and the output type will be available. Click ok button and run the concurrent program. When the program completes. Click on the Output button to see the PDF report.




Friday 9 September 2011

Accounting Periods In AP

Setup>Calendar>Accounting>AP Accounting Periods
Overview:
GL Periods are determined by the Calendar attached to GL Set of Books. Each period represents one Accounting Period in a financial year. Each such period controls whether any transaction can be entered in the period or not. The said periods appear in all sub- ledgers, and the period can have an individual status in each subledger.
Various Statuses are - Never Opened, Future, Open, Closed, and Permanently Closed.
Never Opened: Before opening a period, the status of the period stands ‘Never opened’. No transaction can be entered in such period.
Future: Payables allows invoice entry and accounting in a Future period. However, you cannot transfer accounting entries to general ledger if the accounting date is in a future period.
Open: All transaction such as entering Invoices, Payments voiding payments, canceling Invoices can be done.
Closed: The status of the period after closing stands as Closed. No transaction can be entered in a closed period.
Permanently Closed: No transactions can be entered, and the status cannot be changed again to open, to enter any transactions in future. The status of the periods should me made permanently closed once the Annual accounts are audited and closed.
Note: Control of AP Periods is Set of Books Specific. Head Office operating unit will be responsible for controlling AP Periods.
Accounting Period cannot be closed if any of the following conditions exists:
  • If transactions are accounted in AP and have not been transferred to general ledger.
  • If there are any Unconfirmed Payment Batches.
Period Closing
Ensure that all the Invoices entered in the period to be closed are approved. Invoice Register report will be used to identify all the unapproved transactions.
  • Confirm all the Payment Batches.
  • Submit the “Payable Accounting Process” to account all Unaccounted transactions.
  • Head Office Operating Unit will receive communication from the London Operating unit that all the transaction for the period are accounted, transferred to General Ledger and other period end activities completed. On receipt of the information, the following activities will have to be performed.
  • In the Control Payables Periods window, change the status of the period to Closed and save the transactions. If there are any unaccounted transactions in the period, the following message will appear:


Click OK and click on the Sweep button and the following window appears.
Click on Review and the system will automatically spawn the concurrent program “Unaccounted Transactions Report”. Review the output of the report in the Find Request window to identify all the transactions that will be sweeped. Take corrective actions to account any of the listed transactions. This report lists down transactions at set of book level i.e. for the two payable operating units.
Click on Sweep button in the Control Payables Window and the above screen again appears. Now click on Sweep to sweep the transactions. Enter the period to which the transactions need to be sweeped and click on submit. The system automatically spawns a concurrent program “Unaccounted Transactions Report” and list out the transactions that are swept.
  • Change the status of the period to Closed in “Control Payable Periods Window” and save the transaction.
On closing the AP Period, “Receipt Accrual – Period End- Process” will have to be initiated in Oracle Purchasing to create accrual accounting entries for un-invoiced receipts for expense distributions. This process will create accrual journal entries automatically and mark them for reversal.
Accrual Write Off
Overview:
In case of inventory items, an accrual account will always be credited on receipt of goods. On entering an invoice and matching to PO, the accrual account will get cleared. However, there could be instances where balances will be pending in Accrual Account for various reasons like supplier invoiced for less quantity etc.
The amount in accrual account needs to be written-off on a periodic basis.
Steps to Perform Accrual Write Off
  • The standard “Uninvoiced Receipts Report” will have to be generated to identify the balances in accrual account.
  • Select Accrual write-offs from the menu (Fig 5.3.1). This menu is available to only limited users. Enter search criteria in the Find Write-Off Transactions window to find the transactions you want to write off.
  • Enter the Source: AP - Payables, INV - Inventory, PO - Purchasing, WIP - Work in Progress.
  • You can optionally enter the following additional search criteria: Account combination, Item number, item Description, PO Number, Document Order Line, Document Number, Document Line, Destination Type, Quantity, and a date range. You can also restrict the search to include written off transactions and transactions matched to a purchase order.
  • Choose Find to initiate the search and display the results in the Write-Off Transactions region.
  • Select the transactions that you want to write off. Enter a Write Off Date that is in the same accounting period as the journal entry you will prepare to write off selected transactions.
  • Transactions that you selected to write off in this window will no longer appear on the Accrual Reconciliation Report.
  • Submit the Accrual Write Off Report.
  • Using the Accrual Write Off Report as support, prepare a manual journal entry for the transactions you wish to write off.