Vous êtes sur la page 1sur 17

Qlikview - Accounts Payable (AP)

Dashboard
For Oracle EBS (12.1.x)
Contents

1. Introduction .................................................................................................................................... 2
2. Data Flow ........................................................................................................................................ 2
3. Packages .......................................................................................................................................... 2
4. Views ............................................................................................................................................... 3
5. Tables to be created ....................................................................................................................... 3
6. QVC Components ............................................................................................................................ 4
7. Folder Structure .............................................................................................................................. 4
8. QVD Generator ............................................................................................................................... 4
9. Presentation File ............................................................................................................................. 6
10. Dashboard Tabs .......................................................................................................................... 8
Invoice ................................................................................................................................................. 9
Aging ................................................................................................................................................. 10
Payments........................................................................................................................................... 11
Vendors ............................................................................................................................................. 12
Requisitions ....................................................................................................................................... 13
Purchases .......................................................................................................................................... 13
Receipts ............................................................................................................................................. 14
Team Efficiency ................................................................................................................................. 15
11. Other Important Information ................................................................................................... 16
12. Oracle Scripts for packages and Views ..................................................................................... 16
13. Steps to Load the Files .............................................................................................................. 16

Updated 20/05/2014 (Added the Requisition and Receipts tables to complete the Procure to pay
cycle)

By Ishaq Baig
ishaqbaig@yahoo.com

1
1. Introduction
AP Analysis Dashboard has been designed to provide an overview of the health of the payables side
of the business and enables Finance to best manage its cash outflows and ensure timely payments to
its suppliers.

The Dashboard is based on Oracle EBS (E-Business Suite) Version 12.1.1 to 12.1.3. It is directly based
on Oracle EBS, AP related tables. The scripts provided can be created in a separate user/schema
which has rights to view APPS tables and views or they can be created in the APPS schema. All the
Views and packages created have a prefix (XX_).

Access to the AP Data is restricted by using a security table XX_AP_USER_ACCESS. Data in this table
controls the access of users to different operating units.

Technologies Used
Qlikview Desktop 11.2 (SP5)
Oracle Database 11.2.0.1
PL/SQL

2. Data Flow

Oracle EBS Create Views and Incremental QVD QVW Presentation


Packages In Oracle Generator Which File Created on TOP
Schema on Tables reads data from the of the QVDs
related to AP underlying Views

3. Packages
The Packages script contains the packages needed to created. The packages have some functions
which are used by views to get lookups data.

Package Name
XX_APPS_AP_UTIL_API AP Related Functions
XX_APPS_GL_CODE_COMB_UTIL_API Functions to get the GL Segment Description based on the
ValueSetID of the Segment.

In My case the sement4 is a sub segment of segment3. Please


note the difference between Function of Segment3 and
segment4. You can modify the function to suite your needs.

--Following Query can be used to find segments which have sub


segments
SELECT *
FROM fnd_flex_values
WHERE fnd_flex_values.parent_flex_value_low IS NOT NULL
AND fnd_flex_values.flex_value_set_id IN
(SELECT DISTINCT flex_value_set_id
FROM apps.hr_operating_units hou, apps.gl_ledgers gled, fnd_id_flex_segments
WHERE ledger_id = set_of_books_id
AND id_flex_code = 'GL#'
AND id_flex_num = gled.chart_of_accounts_id)

2
XX_APPS_GL_UTIL_API
XX_APPS_HR_UTIL_API Functions to get Person Name, Location Code, Name, Org Name
XX_APPS_INV_UTIL_API Inventory Module related Functions
XX_APPS_PO_UTIL_API Purchasing Area related functions

4. Views
All columns have been prefixed to prevent Qlikview to create unnecessary joins. (ER Diagram
Attached for reference)

View Name in Oracle Table Name Column Unique Key of the


Prefix Table/View used in
used in Incremental load
View
XX_AP_BATCHES_ALL AP_BATCHES_ALL BAT_ BATCH_ID
XX_AP_CHECKS_ALL AP_CHECKS_ALL CHK_ CHECK_ID
XX_AP_HOLDS_ALL AP_HOLDS_V HLD_ HLD_HOLD_ID
XX_AP_INVOICE_DISTRIBUTION_ALL AP_INVOICE_DISTRIBUTION_ALL ID_ ID_INVOICE_DISTRIBUTION_ID
XX_AP_INVOICE_LINES_ALL AP_INVOICE_LINES_ALL IL_ IL_INVOICE_LINE_ID
XX_AP_INVOICE_PAYMENTS_ALL AP_INVOICE_PAYMENTS_ALL IPAY_ IPAY_INVOICE_PAYMENT_ID
XX_AP_INVOICES_ALL AP_INVOICES_ALL IH_ INVOICE_ID
XX_AP_PAYMENT_SCHEDULES_ALL AP_PAYMENT_SCHEDULES_ALL PS_ PS_PAYMENT_SCHEDULES_ID
XX_AP_SUPPLIERS AP_SUPPLIERS VEN_ VEN_VENDOR_ID
XX_AP_TERMS_ALLL AP_TERMS_LINES, TERMS_ TERM_ID
AP_TERMS_TL
XX_AP_VENDOR_BANK_DETAILS Based on View BNK_
xx_sav_vendor_bank_details
XX_GL_CODE_COMBINATIONS GL_CODE_COMNINATIONS CODE_COMBINATION_ID
XX_PO_DISTRIBUTIONS_ALL PO_DISTRIBUTIONS_ALL POD_
XX_PO_HEADERS_ALL PO_HEADERS_ALL POH_ PO_HEADER_ID
XX_PO_LINE_LOCATIONS_ALL PO_LINE_LOCATIONS_ALL PLL_
XX_PO_LINES_ALL PO_LINES_ALL POL_ POL_LINE_LOC_DIST_UNQ_ID
PO_LINE_LOCATIONS_ALL (Incremental load is done
PO_DISTRIBUTIONS_ALL using revision number instead
of Last Update Date)
XX_PO_LINES_ALL3
XX_SAV_VENDOR_BANK_DETAILS Vendor Site bank details, View
used by
XX_AP_VENDOR_BANK_DETAILS
XX_PO_REQUISITION_HEADERS_ALL PO_REQUISITION_HEADERS_ALL RH_ RH_REQUISITION_HEADER_ID
XX_PO_REQUISITION_LINES_ALL PO_REQUISITION_LINES_ALL RL_ RL_REQUISITION_LINE_ID
XX_RCV_SHIPMENT_HEADERS RCV_SHIPMENT_HEADERS RCH_ RCH_SHIPMENT_HEADER_ID
XX_RCV_SHIPMENT_LINES RCV_SHIPMENT_LINES RCL_ RCL_SHIPMENT_LINE_ID

5. Tables to be created
CREATE TABLE XX_AP_USER_ACCESS Table to grant access to the Qlikview user A
( USER_ACCESS_ORG_ID VARCHAR2(100), particular Operating Unit. Insert records into
USERID VARCHAR2(30), this table to grant access to Operating Units to
DISPLAY_NAME VARCHAR2(50),
BOOKMARK_NAME VARCHAR2(50), a Qlikview user.
EMAIL_ADDRESS VARCHAR2(50) Example 12, IBAIG
) 15, IBAIG
3
Which means IBAIG has access to 2 Operating
Units.

6. QVC Components
Qvc Components for Qlikview were used for incremental load of tables. To incrementally load data
from Oracle Views into the QVD Files.
http://code.google.com/p/qlikview-components/downloads/list

Following was the change done in the qvc.qvs script File


Changed the Variable to ORACLE instead of SQLSERVER

SET Qvc.Loader.v.Database = ORACLE;

7. Folder Structure
The below Folders can be on any drive (C: or D: )

8. QVD Generator
The QVD generator loads data from the underlying Oracle Views and stores them into QVD Files. The
QVD files are stored in Folder/Directory set by the variable Qvc.Loader.v.QvdDirectory

Below are the variables which are initialized on startup

// The Default Database


SET Qvc.Loader.v.Database = ORACLE;

// The directory for the QVD file


SET Qvc.Loader.v.QvdDirectory = '..\QVDs\'; //'D:\QlikView\QVDs\';

// How far back to load if First Load


LET Qvc.Loader.v.BaseValue = num(MakeDate(1990,01,01));

// Datetime literal format for Excel - Shipper exercise


SET Qvc.Loader.v.DatabaseDatetimeMask = 'DD/MM/YYYY hh:mm:ss';

// Will the max Modfield value be stored with the QVD?


// The recommended value is True. This will greatly speed up subsequent loads.
SET Qvc.Loader.v.StoreMaxModFieldValue = -1;

//ODBC connection to the Database


//NOTE - PLEASE CHANGE THIS ACCORDING TO YOUR DATABASE
ODBC CONNECT32 TO [visiondb;DBQ=visiondb] (XUserId is AXYMYQBOQbcYH, XPassword is
eSNcXQBOQbcMM);

4
The first tab set the Initial Variables.

The following tables are loaded fully from the Oracle Database on each load

HR_OPERATING_UNITS
GL_SET_OF_BOOKS
AP_TERMS_ALL
PAYMENT_DOCUMENTS
XX_AP_USER_ACCESS
AP_SUPPLIERS
AP_VENDOR_BANK_DETAILS

The sub-sequent tabs Have logic to incrementally load data from the views in Oracle. Using the QVC
Incremental load routines. Below screen shot show info of the incremental load screen.

All the other tabs have similar code which loads data from the respective tables

5
Please note Data is incrementally loaded from XX_PO_LINES_ALL table using the revision number
instead of LAST_UPDATE_DATE. (The LAST_UPDATE_DATE is number column which stores the latest
revision number)

9. Presentation File
The presentation files loads data from the QVD Files and the joins between tables is established
here. User is shown the data in different visual perspectives. The Below diagram shows the
relationship established between the tables

Mapping Tab has the In-Line Tables used for Aging Bucket Classification/Grouping and other
Mapping tables.

QVD Loads Loads the data from the QVD files stored in (C:\Qliview\QVDs Folder) into Qlikview
Tables. (Diagram on next page specifies the relationship/joins among the tables and their fields)

Security Security Tab loads the security Tables.

6
7
10. Dashboard Tabs

Invoice Aging Aging % (based on due Date) as the data from


the vision database is too old we are only
viewing invoices whose age is greater than 180
days. Sample Screen shot

Payment Analysis Gives the bucket in which the payment was


made. (Check date - Invoice Due Date)
Top 10 Outstanding Vendor Outstanding / Remaining amount of Top 10
vendors
Top 10 Payments Top 10 payment to vendors

8
Invoice
Data in this tab is based on the Invoice Date perspective

All Invoices Shows a list of all invoice based on the filters


selected
Hold Invoices Show Invoices which were Hold and Released
Top 10 Payments Top 10 payment to vendors

9
Aging
NOTE Date is not to be taken into consideration here. The tab shows Outstanding and Overdue
Invoices, It also shows in which Aging bucket the invoice fall.

(Aging is based on System/Current date Invoice Due date)

10
Payments
Check date is taken into consideration here

Payment Detail Shows a list of all payments based on the


filters selected. Void and UnVoid payments
can be filtered using the Check Status List Box
Payment Analysis Shows the payment buckets, It give info in
which pay bucket the invoice was paid (Check
date Invoice Due date)

11
Vendors

Vendor Detail Shows vendor and vendor site details


Vendor bank Details Shows vendor bank details
Others Counts of payment on time, Payment
efficiency

12
Requisitions
Shows Purchase Requisition line details. Requisition header date is the filter here

Purchases
Show Purchase order and PO line details of a particular invoice, PO header date is the filter here.

13
Receipts
Shows Purchase receipt details of a particular purchase order/Invoice. Receipt header date is the
filter here

14
Team Efficiency
Shows info of the data entry statistics

No of Supplier created by supplier creation date


The minyear, Maxyear Filter control the no of
year visible

Below sheet shows the user and their access to the operating units

15
11. Other Important Information
Aging is based on Due Date as of system/current date. The Age of the invoice is (Today()
DueDate)
Dates on the Tab are important
(Invoice Tab Analysis is done based on Invoice Date)
(Aging Tab Dates should not be considered as Aging is as of system/current date)
(Payments Tab Analysis done based on Check/Payment date)
(Vendor Tab Invoice date)
(Requisitions Requisition Header date)
(Purchases Purchase date)
(Receipts Receipts Header date)
(Team Efficiency Invoice Creation Date)

12. Oracle Scripts for packages and Views

Tables_Script.sql Views_Script.SQL Packages_Script.sql

13. Steps to Load the Files


1) Create the Packages using Packages_Script.sql file.
2) Create the Views Views_Script.sql file
3) Create the User Access Table using Tables_Script.sql file.
4) Qvc.qvs script file. In C:\QlikView\ qvc_runtime Folder
5) Click Reload in file AP Analysis - QVD Generator Incremental.
Loads Data from the Oracle EBS Database into QVD files, this step creates the QVD file in the
C:\Qlikview\QVDs Folder
(Note- Please replace the ODBC connect with the connection of your database).
6) Click Reload in File AP Analysis . This reloads data from the QVD files to the presentation
file.

Reload Screen shot of file AP Analysis - QVD Generator Incremental.

16
Reload Screen shot of file AP Analysis - QVD Generator Incremental.

17

Vous aimerez peut-être aussi