Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 42

Upload catalogue item Images in iProcurement

Oracle iProcurement module is widely used by oracle users to raise catalog and non-catalog
Purchase Requisitions. iProcurment module is very user friendly screen to raise requisitions and
hence it is most used module.
“Picture Speaks Louder than Words”, as famous English idiom says a picture
provides more information instead of providing just letters or description of an item. Hence the
user will be able to understand and choose his right product from the catalogue in iProcurement.
This document describes the Steps to add images in the iprocurement to show
them while performing catalogue requisitions.

BENEFIT OF THIS FEATURE:


 Helps the user
o to identify the appropriate product
o to clearly identify the product
o to avoid ordering wrong product

STEP1: SET THE REQUIRED PROFILE OPTION


We have to set below profile options at site level to start the process.

1. POR: Hosted images Directory:


Set the value to the directory where you will be storing the image files
tobe used by iProcurement. Mostly the directory would be /OA_MEDIA/. Set the real path of this
directory as the profile option value.

POR: Show Thumbnail image set to Yes

STEP2: STORE THE IMAGES IN THE DIRECTORY:


Keep the images in .Jpeg or .png format and store the images in “$JAVA_TOP / Oracle /
apps / Media” folder. You may have to work with DBA team to store the images If you don’t
have access to database.
In our example we are storing below image in the images folder

STEP3: CREATE BPA AND MAP THE IMAGE FILE


NAME IN BPA LINE
Now create Blanket purchase agreement with the required item and map the image
against the required item.

Enter BPA Header DetailsClick on Line to enter Line details

Enter Line DetailsClick on Pencil icon to enter image details


Enter image file name in Thumbnail image field as shown below Click on apply button once
the data is entered

You will get confirmation message  Submit the BPA for approval
Below confirmation message appears and ensure that the BPA is approved.

Now, BPA is in Approved Status.


Go to iProcurement Shopping page Enter the item Description in the Search WindowClick
Go to get see the item:

You will be able to see the item with Picture as above in the iProcurement Screen.

Enabling Link to access Excel file in iProcurement


Oracle iprocurement module is widely used by oracle users to raise catalogue and non-
catalogue Purchase Requisitions. IProcurment module is very user friendly screen to raise requisitions
and hence it is most used module.

We have a requirement from one of our customer to show the Approved Supplier List in
Oracle iProcurement Page itself when the user Clicks a link under “Purchasing News” Area. The
customer also wants to show below details along with the approved Suppliers list.

 iProcurement Store Name

 iProcurement Smart Form Name

 Shopping Category mapped to the Smart Form

 Supplier Name mapped to the Smart form

 Operating unit associated to the Store

This document describes the Steps to get the above mentioned details and the steps to
create a link in iProcurement Page under “Purchasing News” Area. The excel sheet which is stored in
the database will open when the user clicks the link in iprocurement Page.

BENEFIT OF THIS ENHANCEMENT:

 Helps the user

o to identify the appropriate Smart form to use for a Specific category

o to check the approved Suppliers for a specific category

o to identify the required Smart Form name to select for the category

 It reduces the wrong category and Supplier combinations to raise requisitions

GETTING THE REQUIRED DATA & CREATE A LINK


STEP1: WRITE A QUERY AND EXECUTE IT TO GET
THE REQUIRED DATA

Write a SQL query to get the required data from the database which need to be stored in the
database and to retrive when the users click the link.
For examble, below query is used to obtain the above data

SELECT DISTINCT STORE.NAME store_name, smartforms.template_name request_name,

pas.commodity_id,

pas.vendor_name supplier,

(SELECT NAME

FROM apps.hr_operating_units

WHERE organization_id = smartforms.org_id) operating_unit,

(SELECT segment1 || '.' || segment2

FROM apps.mtl_categories_b

WHERE category_id = smartforms.category_id) CATEGORY

FROM apps.icx_cat_shop_stores_vl STORE,

apps.icx_cat_store_contents store_contents,

apps.por_noncat_templates_all_vl smartforms,

apps.po_asl_suppliers_v pas

WHERE store_contents.store_id = STORE.store_id(+)

AND smartforms.template_id = store_contents.content_id(+)

AND smartforms.org_id IN (210, 2616)

AND pas.commodity_id = smartforms.category_id

AND pas.owning_organization_id IN (

SELECT organization_id

FROM apps.org_organization_definitions

WHERE operating_unit =

smartforms.org_id)

ORDER BY CATEGORY

The Sample output will be as below.


STEP2: STORE THE FILE IN $OA_HTML LOCATION
Copy the ASL.xls file to $OA_HTML path in the instance.

STEP3: FORMS PERSONALIZATION IN IPROC HOME


PAGE.

Please follow the instructions below to get the forms personalization’s done.

Step 3A: Set the following Profile Options using System Administrator Responsibility at User
Level.
User: ABCDE

Step 3B: Open iProcurement Home Page


Navigation: iProcurement > iProcurement Home Page
FND: Personalization Region Link Enabled Yes

FND: Personalization Seeding Mode Yes

Personalize Self-Service Defn Yes

Utilities:Diagnostics Yes

Open the Personalize Stack Layout (Purchasing News)

Step 3C: Add Approved Supplier List to the Purchasing News Section
Create Item under the Purchasing News (Content Container: Purchasing News)
Create the Link with the following attributes:

Level Item Style

Site Link

Property Value
ID UK_Approved_Supplier_List

Admin Personialization True

Destination URI http://xxxxxxxxxxxxxx.com:8018/OA_HTML/UK_ASL.xls

Disable Server Side Validation False

Popup Enabled True

Popup Render Event Onclick

Rendered True

Text UK – Approved Supplier List

User personalization False

Warn about changes True

Approved Supplier List Link is added.


Step 3D: Personalize the Link to restrict to XX_OU.

Set the attributes as below.

Attributes Site Organization: XX_OU Responsibility:

iProcurement

Destination Inherit http://xxxxxx.com:8018/OA_HTML/UK_ASL.xls Inherit


URI

Text Inherit UK – Approved Supplier List Inherit

Then Save and Return to the Application to perform the test.


STEP 4: TEST IPROCUREMENT HOME PAGE FOR UK
AND OTHER OU USERS.
For UK Users:

For Other OU Users:


STEP 5: OPEN THE NEWLY ADDED LINK.
The saved file will show below values:

Update/Add lines in Global Blanket Purchase


Agreement using "Upload" Functionality in Oracle
EBS
Introduction

Procurement Team would like to use “Upload” or Excel sheet options to update the Global
Blanket Purchase Agreement (GBPA). Using the functionality in R12 has changed.

Hence this document describes the Step by Step Process to use “Upload” functionality.

Issue Resolution

Login to oracle Instance with your User name and Password.


Instance Name: XXXXXX
Log in using the URL : xxxx
Step1:

Create a Data file using the attched Excel sheet and Save the same in Text(Tab delimited)
format.

The data source file template can be downloaded from iProcurement Catalogue
Administration ---> Upload Tab. (Skip this activity if you have a source file)

You can see below Page:

Select Tab-delimited Text and click on Download button to download it.


Y You can see the downloaded file and save it to the computer and open the downloaded file
which has file name as "TextTemplate.txt"
Sample Excel File :

Open the file in Excel format and Enter the all relevant information in the column.
 To Add a New line, use “ADD” in “Action Column.
 To update the existing line, use “SYNC” in Action column.
 To Use price break, Enter the Quantity and Break Price column
After entering the data, Save the file in Tab delimited format.

Sample "Tab Delimited" file with the filled in data


Step2:
 Please note that this step is one time activity to enable the agreement for
catalog authoring.
 Please skip this step 2 and go to Step 3 if the agreement is already enabled
for Catalog authoring
 Navigate to “Buyer Work Center Menu” with in your Purchasing Responsibility àClick on
Agreement
Click on Search to select the required GBPA

Enter required information to get the Agreement.


Select the Agreement and “select “Enable catalog Administrator Authoring” and click on Go
to enable the catalog authoring to check it from iProcurment catalog administration
responsibility

You will receive a Confirmation as shown


below.

Step 3:
Navigate to “iPrcourement catalog Adminstration” page

Search the Agrement number which you want to update and query the Agreement and click on
“Update” to update the GBPA

Note: If the Agreement is not appearing in the screen, Please perfrom the Step2 and then go
to Step3.

Go to the Lines Tab and select “Via Upload” option and click on GO
Below Page Opens to upload the file

Select the file to load and keep other selection options are as it is and Click Submit.
You will get a confirmation as above.

You can check the Program and it will get completed in Normal.
Go back to iProcurment catalog Administration Responsibility-->Agreements Summary

Search the Agreement and check the BPA line to see the update.

In our Example, 1st line price got updated as 333.01 from the old price of 200.01.
SQL to Find Employee – Supervisor Hierarchy details
BACKGROUND

The Purchase order or Requisitions are not valid unless it is approved. In any of the
procurement process, most of the issues occur in the approval of the purchasing document
due to the issues in approval hierarchy and related setups.

Hence we have built a query to show the approval hierarchy of the Requestor of the
Requisition or Purchase Order along with other required details like Supervisor Name, User
Name, Expense account details etc.

This will help the support person to easily identify the issues in the hierarchy in a single query
output and to provide required resolution.

Resolution:

Step 1:

Please pass 'Employee number' of Requester in the below code. Run the script download the
output

SELECT
fu.user_name "User Name",
haou.name "Employee BG",
fu.employee_id "Employee ID @User",
gl.name "Emp. Ledger Name",
ppx.full_name "Employee Name",
ppx.employee_number "Employee Number",
ppx.person_id "Employee ID @ Person",
pjv.name "Employee Job Name",
pjv.approval_authority "Job Level",
hl.location_code "Employee Location",
gcc.concatenated_segments "Default Expense
Account",
ppx1.full_name "Supervisor Name",
ppx1.person_id "Supervisor Emp ID @ Person",
ppx1.employee_number "SuperVisor Emp Num @
Person",
haou1.name "Supervisor BG",
CONNECT_BY_ISCYCLE
FROM
apps.per_people_x ppx,
apps.per_people_x ppx1,
apps.per_assignments_x pax,
apps.per_jobs_v pjv,
apps.gl_code_combinations_kfv gcc,
apps.hr_locations hl,
apps.fnd_user fu,
apps.gl_ledgers gl,
apps.hr_all_organization_units haou
,apps.hr_all_organization_units haou1
WHERE 1=1
and ppx.person_id = pax.person_id
and ppx.person_id = fu.employee_id(+)
and pax.job_id = pjv.job_id
and pax.default_code_comb_id =
gcc.code_combination_id(+)
and pax.location_id = hl.location_id
and pax.set_of_books_id = gl.ledger_id(+)
and ppx1.person_id = pax.supervisor_id

and ppx.business_group_id = haou.organization_id


and ppx1.business_group_id = haou1.organization_id
connect by nocycle prior pax.supervisor_id =
pax.person_id
start with ppx.employee_number = '10484';
------------------------------------------------------------

The above Query provides below results.

Employee ID Emp. Ledger


User Name Employee BG @User Name

XXXX.BLANXXXX XX Business Group 34658 XX Ledger

YYYY.YYYEST XX Business Group 34513 XX Ledger

ZZZZ.ZZZZERT XX Business Group 34643 XX Ledger

Employee Employee ID @ Job


Employee Name Number Person Employee Job Name Level

Blan, M 10484 34658 Responsable Achats 0

Est, D 10339 34513 Direct. Projet 2

ERT, A 10469 34643 Directeur Général 5

Employee Location Default Expense Account

London 12345.6789012.00000.03420.9999999.00000.0000.0000.0000

London 12345.6789012.00000.03700.9999999.00000.0000.0000.0000

London 12345.6789012.00000.03100.9999999.00000.0000.0000.0000

SuperVisor
Supervisor Supervisor Emp Emp Num @ CONNECT_BY_ISCY
Name ID @ Person Person Supervisor BG CLE

David 34513 10339 XX Business Group 0

Arnaud 34643 10469 XX Business Group 0


Marshall 34718 10004 XX Business Group 1

Step 2:

From Table # 1, find the Employee number of 'Supervisor' for the last record. In the above
example it is (10004)

Step 3:

Add the output from Step 2 into the Table # 1

The Final Output would be as follows:

Employee ID Emp. Ledger


User Name Employee BG @User Name

XXXX.BLANXXXX XX Business Group 34658 XX Ledger

YYYY.YYYEST XX Business Group 34513 XX Ledger

ZZZZ.ZZZZERT XX Business Group 34643 XXLedger

XX Business Group XX Ledger

Employee Employee ID @ Job


Employee Name Number Person Employee Job Name Level

Blan, M 10484 34658 Responsable Achats 0

Est, D 10339 34513 Direct. Projet 2

ERT, A 10469 34643 Directeur Général 5

Marshall 10004 34718 GM Western 15

Employee Location Default Expense Account

London 12345.6789012.00000.03420.9999999.00000.0000.0000.0000
London 12345.6789012.00000.03700.9999999.00000.0000.0000.0000

London 12345.6789012.00000.03100.9999999.00000.0000.0000.0000

Supervisor
Emp ID @ SuperVisor Emp Num @
Supervisor Name Person Person Supervisor BG CONNECT_BY_ISCYCLE

David 34513 10339 XX Business Group 0

Arnaud 34643 10469 XX Business Group 0

Marshall 34718 10004 XX Business Group 1

Revert 34643 10469 XX Business Group 0

Conclusion

From the final table we can find out that user id for the employee "Marshall" is not mapped.
Hence the approval generation issue has occurred.

This issue will be resolved if the employee and user id of the Marshall is mapped.

Query for finding MTD/YTD/ITD Cost/Revenue and Fee


Details for a Project in PA Module

WITH PARAMETER AS (SELECT :PERIOD_NAME AS PERIOD_NAME FROM DUAL)


SELECT distinct prj.project_id,prj.segment1,
(SELECT ROUND(SUM(tot_burdened_cost),2)
FROM apps.pa_txn_accum
WHERE project_id=prj.project_id
AND gl_period =PARAMETER.PERIOD_NAME
-- and organization_id=TXN.organization_id
) "MTD Cost",
(SELECT ROUND(SUM(unbilled_receivable_dr),2)--round(SUM(tot_revenue),2)
FROM apps.pa_draft_revenues_all
WHERE project_id =prj.project_id
AND TO_CHAR(gl_date,'MON-YY') =PARAMETER.PERIOD_NAME
) "MTD Revenue",
(SELECT ROUND(SUM(tot_burdened_cost),2)
FROM apps.pa_txn_accum
WHERE project_id=prj.project_id
AND gl_period IN
(SELECT PERIOD_NAME
FROM gl.GL_PERIODS
WHERE PERIOD_YEAR = TO_CHAR(SYSDATE, 'RRRR')
AND UPPER(PERIOD_TYPE) <> 'WEEK'
AND ADJUSTMENT_PERIOD_FLAG = 'N'
AND TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') <= TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR')
AND TO_CHAR(TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') , 'RR') = TO_CHAR(TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR') , 'RR')
)
-- and organization_id=TXN.organization_id
) "YTD Cost",
(SELECT ROUND(SUM(tot_revenue),2)
FROM apps.pa_txn_accum
WHERE project_id=prj.project_id
AND gl_period IN
(SELECT PERIOD_NAME
FROM gl.GL_PERIODS
WHERE PERIOD_YEAR = TO_CHAR(SYSDATE, 'RRRR')
AND UPPER(PERIOD_TYPE) <> 'WEEK'
AND ADJUSTMENT_PERIOD_FLAG = 'N'
AND TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') <= TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR')
AND TO_CHAR(TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') , 'RR') = TO_CHAR(TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR') , 'RR')
)
) "YTD Revenue",
(SELECT ROUND(SUM(tot_burdened_cost),2)
FROM pa.pa_txn_accum
WHERE project_id=prj.project_id
) "ITD Cost",
(SELECT ROUND(SUM(tot_revenue),2)
FROM pa.pa_txn_accum
WHERE project_id=prj.project_id
)"ITD Revenue",
(SELECT ROUND(SUM(bill_amount),2)
FROM pa.pa_events
WHERE project_id =prj.project_id
AND TO_CHAR(creation_date,'MON-YY')=PARAMETER.PERIOD_NAME
)"MTD Fee",
(SELECT ROUND(SUM(bill_amount),2)
FROM pa.pa_events
WHERE project_id =prj.project_id
AND TO_CHAR(creation_date,'MON-YY') IN
(SELECT PERIOD_NAME
FROM gl.GL_PERIODS
WHERE PERIOD_YEAR = TO_CHAR(SYSDATE, 'RRRR')
AND UPPER(PERIOD_TYPE) <> 'WEEK'
AND ADJUSTMENT_PERIOD_FLAG = 'N'
AND TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') <= TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR')
AND TO_CHAR(TO_DATE('01-'
||PERIOD_NAME, 'DD-MON-RR') , 'RR') = TO_CHAR(TO_DATE('01-'
||PARAMETER.PERIOD_NAME , 'DD-MON-RR') , 'RR')
)
)"YTD Fee",
(SELECT ROUND(SUM(bill_amount),2)
FROM pa.pa_events
WHERE project_id=prj.project_id
)"ITD Fee",
(SELECT SUM(allocated_amount)
FROM pa_project_fundings
WHERE project_id=prj.project_id
)"Funded Revenue",
(SELECT SUM(a.amount) "Revenue To Date"
FROM pa.PA_DRAFT_REVENUE_ITEMS# a,
pa.PA_DRAFT_REVENUES_ALL# b,
pa.pa_projects_all ppa
WHERE a.project_id = ppa.project_id
AND a.DRAFT_REVENUE_NUM = b.DRAFT_REVENUE_NUM
AND a.project_id = b.project_id
AND b.GL_DATE <=
(SELECT END_DATE
FROM gl.gl_period_statuses
WHERE end_date =
(SELECT MAX(end_date)
FROM gl.gl_period_statuses
WHERE application_id = 101
AND set_of_books_id = 2022
AND closing_status = 'C'
AND adjustment_period_flag = 'N'
)
AND application_id = 101
AND set_of_books_id = 2022
AND adjustment_period_flag = 'N'
)
AND ppa.project_id=prj.project_id
)"GL Close Revenue"
FROM
PA.PA_PROJECTS_ALL# PRJ,
PA.PA_PROJECT_TYPES_ALL# PRJT,
PA.PA_TXN_ACCUM# TXN,PARAMETER
WHERE prj.project_id = txn.project_id
AND prj.project_status_code ='APPROVED'
AND prj.PROJECT_TYPE = PRJT.PROJECT_TYPE(+)
AND prjt.project_type_class_code ='CONTRACT'
AND TO_CHAR(week_ending_date , 'MON-RR') = PARAMETER.PERIOD_NAME

GL Transactions for Payments


SELECT DISTINCT aca.payment_method_lookup_code trans_type,
TO_CHAR (aca.check_number) invoice_num,
TO_CHAR (aca.check_date) invoice_date,
xle.event_type_code ponum_inv_linenum,
ael.currency_code line_desc,
apps.imie_remove_special_chars.remove_special_chars
(TO_CHAR (CASE
WHEN xle.event_type_code =
'PAYMENT CANCELLATION'
THEN (aca.amount * -1)
ELSE aca.amount
END
)
) requestor_qty_inv,
NULL appr_date_unitprice, NULL doc_seq_revamt,
NULL acct_class, NULL PERCENT,
DECODE (ael.entered_dr, NULL, 0, ael.entered_dr)
- DECODE (ael.entered_cr, NULL, 0, ael.entered_cr) amount,
DECODE (ael.accounted_dr,
NULL, 0,
ael.accounted_dr
)
- DECODE (ael.accounted_cr, NULL, 0, ael.accounted_cr)
dist_amt
FROM xla_ae_headers aeh,
xla_ae_lines ael,
xla_events xle,
xla.xla_transaction_entities ent,
xla_distribution_links xdl,
ap_checks_all aca,
ap_payment_hist_dists aphd,
ap_payment_history_all aph
WHERE 1 = 1
AND ael.application_id = aeh.application_id
AND ael.ae_header_id = aeh.ae_header_id
AND xle.application_id = aeh.application_id
AND xle.event_id = aeh.event_id
AND ent.application_id = xle.application_id
AND ent.entity_id = xle.entity_id
AND xdl.ae_header_id = aeh.ae_header_id
AND xdl.ae_line_num = ael.ae_line_num
AND aphd.payment_hist_dist_id = xdl.source_distribution_id_num_1
AND xdl.source_distribution_type = 'AP_PMT_DIST'
AND ent.transaction_number = aca.check_number
AND xdl.application_id = 200
AND aphd.payment_history_id = aph.payment_history_id
AND aph.check_id = aca.check_id
AND ael.ae_header_id = p_hdrid
AND ael.ae_line_num = p_linenum;

GL Transactions for AR
SELECT rctt.description trans_type, TO_CHAR (rct.trx_number) invoice_num,
TO_CHAR (rct.trx_date) invoice_date,
TO_CHAR (rcl.line_number) ponum_inv_linenum, rcl.description line_desc,
TO_CHAR (rcl.quantity_invoiced) requestor_qty_inv,
TO_CHAR (rcl.unit_selling_price) appr_date_unitprice,
TO_CHAR (rcl.revenue_amount) doc_seq_revamt,
rctg.account_class acct_class, TO_CHAR (rctg.PERCENT) PERCENT,
(rctg.amount * -1) amount, (rctg.acctd_amount * -1) dist_amt
FROM xla_ae_headers aeh,
xla_ae_lines ael,
xla_events xle,
xla.xla_transaction_entities ent,
xla_distribution_links xdl,
ra_customer_trx_all rct,
ra_customer_trx_lines_all rcl,
ra_cust_trx_types_all rctt,
ra_cust_trx_line_gl_dist_all rctg
WHERE 1 = 1
AND ael.application_id = aeh.application_id
AND ael.ae_header_id = aeh.ae_header_id
AND xle.application_id = aeh.application_id
AND xle.event_id = aeh.event_id
AND ent.application_id = xle.application_id
AND ent.entity_id = xle.entity_id
AND xdl.ae_header_id = aeh.ae_header_id
AND xdl.ae_line_num = ael.ae_line_num
AND rcl.customer_trx_line_id = rctg.customer_trx_line_id
AND rct.customer_trx_id = rcl.customer_trx_id
AND rctt.cust_trx_type_id = rct.cust_trx_type_id
AND rct.trx_number = ent.transaction_number
AND xdl.source_distribution_id_num_1 = rctg.cust_trx_line_gl_dist_id
AND xdl.source_distribution_type = 'RA_CUST_TRX_LINE_GL_DIST_ALL'
AND ael.ae_header_id = p_hdrid
AND ael.ae_line_num = p_linenum;

GL Transactions for AR Adjustments


SELECT NULL trans_type, ent.transaction_number invoice_num,
(SELECT TO_CHAR (trx_date)
FROM ra_customer_trx_all
WHERE customer_trx_id = aaa.customer_trx_id) invoice_date,
NULL ponum_inv_linenum, art.description line_desc,
NULL requestor_qty_inv, NULL appr_date_unitprice, NULL doc_seq_revamt,
NULL acct_class, NULL PERCENT,
( DECODE (ada.amount_dr, NULL, 0, ada.amount_dr)
- DECODE (ada.amount_cr, NULL, 0, ada.amount_cr)
) amount,
( DECODE (ada.acctd_amount_dr, NULL, 0, ada.acctd_amount_dr)
- DECODE (ada.acctd_amount_cr, NULL, 0, ada.acctd_amount_cr)
) dist_amt
FROM xla_ae_headers aeh,
xla_ae_lines ael,
xla_events xle,
xla.xla_transaction_entities ent,
xla_distribution_links xdl,
ar_distributions_all ada,
ar_payment_schedules_all aps,
ar_adjustments_all aaa,
ar_receivables_trx_all art
WHERE 1 = 1
AND ael.application_id = aeh.application_id
AND ael.ae_header_id = aeh.ae_header_id
AND xle.application_id = aeh.application_id
AND xle.event_id = aeh.event_id
AND ent.application_id = xle.application_id
AND ent.entity_id = xle.entity_id
AND xdl.ae_header_id = aeh.ae_header_id
AND xdl.ae_line_num = ael.ae_line_num
AND aaa.payment_schedule_id = aps.payment_schedule_id
AND aaa.receivables_trx_id = art.receivables_trx_id
AND xdl.source_distribution_id_num_1 = ada.line_id
AND ent.source_id_int_1 = aaa.adjustment_id
AND ael.ae_header_id = p_hdrid
AND ael.ae_line_num = p_linenum;
GL Transactions for AP
SELECT /*+ leading (ael aeh) */
aia.invoice_type_lookup_code trans_type,
ent.transaction_number invoice_num,
TO_CHAR (aia.invoice_date) invoice_date,
TO_CHAR (pod.po_number) ponum_inv_linenum,
CASE
WHEN aia.SOURCE = 'RECURRING INVOICE'
THEN aia.description
ELSE aid.description
END line_desc,
TO_CHAR (pod.requested_by) requestor_qty_inv,
TO_CHAR (pod.approved_date) appr_date_unitprice,
TO_CHAR (aia.doc_sequence_value) doc_seq_revamt, NULL acct_class,
NULL PERCENT, NULL amount,
DECODE (aid.base_amount, NULL, aid.amount, aid.base_amount) dist_amt
FROM xla_ae_headers aeh,
xla_ae_lines ael,
xla_events xle,
xla.xla_transaction_entities ent,
xla_distribution_links xdl,
apps.ap_invoices_all aia,
apps.ap_invoice_distributions_all aid,
(SELECT poh.segment1 po_number, poh.approved_date approved_date,
pod.po_distribution_id po_dist_id, pod.code_combination_id,
pap.full_name requested_by
FROM apps.po_headers_all poh,
apps.po_distributions_all pod,
(SELECT pap1.person_id, pap2.full_name
FROM (SELECT MAX (effective_end_date) end_date,
person_id person_id
FROM apps.per_all_people_f pap
GROUP BY person_id) pap1,
(SELECT full_name, person_id,
effective_end_date end_date
FROM apps.per_all_people_f) pap2
WHERE pap1.person_id = pap2.person_id
AND pap1.end_date = pap2.end_date) pap
WHERE poh.po_header_id = pod.po_header_id
AND pod.deliver_to_person_id = pap.person_id) pod
WHERE 1 = 1
AND ael.application_id = aeh.application_id
AND ael.ae_header_id = aeh.ae_header_id
AND xle.application_id = aeh.application_id
AND xle.event_id = aeh.event_id
AND ent.application_id = xle.application_id
AND ent.entity_id = xle.entity_id
AND xdl.ae_header_id = aeh.ae_header_id
AND xdl.ae_line_num = ael.ae_line_num
AND ent.transaction_number = aia.invoice_num
AND xdl.source_distribution_id_num_1 = aid.invoice_distribution_id
AND xdl.source_distribution_type = 'AP_INV_DIST'
AND aid.invoice_id = aia.invoice_id
AND ent.entity_code = 'AP_INVOICES'
AND NVL (aid.amount, 0) <> 0
AND aid.po_distribution_id = pod.po_dist_id(+)
AND ael.ae_header_id = p_hdrid
AND ael.ae_line_num = p_linenum;

Extract for Payments - Check and EFT


SELECT papf.employee_number employee_number
, aps.vendor_name payee_name
, ieba.bank_account_num bank_account_number
, hp_bank.party_name bank_name
, hp_bank.organization_name_phonetic bank_number
, hps_branch.party_name branch_name
, ipa.org_id org_id
, ipa.payment_date payment_date
, ieba.bank_account_type bank_account_type
, ieba.bank_id
, cba.bank_account_type int_bank_account_type
, cba.bank_account_num int_bank_account_num
, round(sum(ifdpv.payment_amount *
decode(ipa.payment_currency_code,
asp.base_currency_code,
1,
decode(aivsc.exchange_rate_type,
'User', --l_exchange_rate_type
ap_pmt_callout_pkg.get_user_rate(asp.base_currency_code,
ipa.payment_currency_code,
ifdpv.calling_app_doc_unique_ref1),
ap_utilities_pkg.get_exchange_rate(ipa.payment_currency_code,
asp.base_currency_code,
aivsc.exchange_rate_type,
aivsc.check_date,
'CONFIRM')))),0) payment_amount
, MIN(ifdpv.calling_app_doc_ref_number) reference
, MIN(ifdpv.document_description) document_description
FROM iby_pay_instructions_all ipia
, iby_payments_all ipa
, iby_external_payees_all iepa
, ap_supplier_sites_all assa
, ap_suppliers aps
, iby_ext_bank_accounts ieba
, hz_parties hp_bank
, hz_parties hps_branch
, iby_fd_docs_payable_v ifdpv
, ap_inv_selection_criteria_all aivsc
, ap_system_parameters_all asp
, ce_bank_accounts cba
, per_all_people_f papf
WHERE ipia.payment_instruction_id = p_payment_instruction_id
AND ipia.payment_instruction_id = ipa.payment_instruction_id
AND ipa.ext_payee_id = iepa.ext_payee_id
AND iepa.supplier_site_id = assa.vendor_site_id
AND assa.vendor_id = aps.vendor_id
AND ipa.external_bank_account_id = ieba.ext_bank_account_id (+)
AND ieba.bank_id = hp_bank.party_id (+)
AND ieba.branch_id = hps_branch.party_id (+)
AND ipa.payment_id = ifdpv.payment_id
AND ifdpv.calling_app_doc_unique_ref1 = aivsc.checkrun_id
AND ipa.org_id = asp.org_id
AND ipa.internal_bank_account_id = cba.bank_account_id
AND aps.employee_id = papf.person_id (+)
GROUP BY papf.employee_number
, aps.vendor_name
, ieba.bank_account_num
, hp_bank.party_name
, hp_bank.organization_name_phonetic
, hps_branch.party_name
, ipa.org_id
, ipa.payment_date
, ieba.bank_account_type
, ieba.bank_id
, cba.bank_account_type
, cba.bank_account_num;

Query to find open invoices with the Supplier and PO details

SELECT i.invoice_num "Invoice Number",


(SELECT MAX (pha.segment1) po_number
FROM apps.ap_invoices_all aia,
apps.ap_invoice_lines_all aila,
apps.ap_invoice_distributions_all aida,
apps.po_headers_all pha,
apps.po_lines_all pla,
apps.po_distributions_all pda
WHERE pha.po_header_id = pla.po_header_id
AND pla.po_line_id = pda.po_line_id
AND aida.po_distribution_id = pda.po_distribution_id
AND aida.invoice_id = aia.invoice_id
AND aia.invoice_id = aila.invoice_id
AND aia.invoice_id = i.invoice_id
AND aila.line_number = ail.line_number
AND aia.vendor_id = i.vendor_id) "PO Number",
v.segment1 "Supplier Number", v.vendor_name "Supplier Name",
vs.vendor_site_code "Supplier Site", i.invoice_date "Invoice Date",
i.description "Invoice Description",
ail.description "Invoice Line Description", SUM (ail.amount)
"Amount",
DECODE (i.cancelled_date, NULL, 'NO', 'YES') "Cancel Status"
FROM po_vendors v,
po_vendor_sites_all vs,
ap_invoices_all i,
apps.ap_invoice_lines_all ail
WHERE v.vendor_id = vs.vendor_id
AND i.invoice_id = ail.invoice_id
AND i.vendor_id = v.vendor_id
AND i.vendor_site_id = vs.vendor_site_id
--and i.invoice_num = '10190183'
AND i.invoice_date BETWEEN '01-JAN-2015' AND '31-DEC-2015'
AND EXISTS (
SELECT 1
FROM apps.ap_invoice_distributions_all d
WHERE d.invoice_id = i.invoice_id
AND d.match_status_flag = 'A')
GROUP BY v.vendor_name,
vs.vendor_site_code,
i.invoice_id,
i.invoice_num,
i.invoice_date,
i.description,
ail.description,
ail.line_number,
i.vendor_id,
v.segment1,
i.cancelled_date

ORDER BY v.vendor_name, i.invoice_num;

Open Receipt Report

Description
This Open Receipt Report is used to review a list of receipts which are in open status for the date range
that you specify.

SELECT coll.coll_name "COLLECTOR", cons.group_name "PARENT",


cons.group_acc "GROUP_ACC", hca.account_number "CUST_NUMBER",
hp.party_name "CUSTOMER_NAME", rcpt.posted_date "POSTED_DATE",
rcpt.receipt_date "RCPT_DATE", rcpt.currency "CURRENCY",
rcpt.receipt_method "RCPT_METHOD", rcpt.receipt_number "RCPT_NUMBER",
rcpt.stat "RCPT_STATUS", rcpt.receipt_amount "RCPT_AMOUNT",
ROUND (gbp_receipt, 2) "GBP_RECEIPT",
ROUND (CASE
WHEN rcpt.receipt_date >= '01-SEP-2010'
THEN gbp_receipt
ELSE 0
END,
2
) "CURRENT_MONTH_GBP",
rcpt.gbp_remaining "GBP_REMAINING",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 1
AND rcpt.receipt_date > SYSDATE - 31
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_1_30",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 31
AND rcpt.receipt_date > SYSDATE - 61
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_31_60",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 61
AND rcpt.receipt_date > SYSDATE - 91
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_61_90",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 91
AND rcpt.receipt_date > SYSDATE - 181
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_91_180",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 181
AND rcpt.receipt_date > SYSDATE - 361
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_181_360",
ROUND
(CASE
WHEN rcpt.receipt_date < SYSDATE - 361
AND rcpt.receipt_date > SYSDATE - 999999
THEN rcpt.gbp_remaining
ELSE 0
END,
2
) "DAYS_361",
rcpt.reason_code "REASON_CODE", rcpt.narrative "NARRATIVE"
FROM ar_payment_schedules_all aps,
hz_parties hp,
hz_cust_accounts hca,

----------------- collector ---------------------


(SELECT ac.NAME coll_name, acp.credit_hold credit_hold,
acp.cust_account_id cust_id
FROM hz_cust_accounts hca2,
hz_customer_profiles acp,
ar_collectors ac
WHERE acp.cust_account_id = hca2.cust_account_id
AND acp.site_use_id IS NULL
AND acp.collector_id = ac.collector_id(+)) coll,

--------- sub select receipt data -----------


(SELECT aps3.payment_schedule_id pid, aps3.customer_id cust_id,
acr.status stat, acr.receipt_date receipt_date,
acr.creation_date posted_date, acr.currency_code currency,
acr.receipt_number receipt_number, acr.status status,
arm.NAME receipt_method, acr.attribute4 reason_code,
acr.attribute3 narrative, acr.amount receipt_amount,
(CASE
WHEN aps3.CLASS = 'PMT' AND acr.status != 'REV'
THEN DECODE (aps3.invoice_currency_code,
'GBP', (acr.amount),
((acr.amount * acr.exchange_rate)
)
)
ELSE 0
END
) gbp_receipt,
aps3.amount_due_remaining * -1 amt_remaining,
(CASE
WHEN aps3.CLASS = 'PMT' AND aps3.amount_due_remaining <> 0
THEN DECODE (aps3.invoice_currency_code,
'GBP', (aps3.amount_due_remaining * -1),
( ( aps3.amount_due_remaining
* aps3.exchange_rate
)
* -1
)
)
ELSE 0
END
) gbp_remaining
FROM ar_payment_schedules_all aps3,
ar_cash_receipts_all acr,
ar_receipt_methods arm
WHERE aps3.cash_receipt_id = acr.cash_receipt_id
AND acr.receipt_method_id = arm.receipt_method_id
AND aps3.CLASS = 'PMT'
AND aps3.org_id = 210) rcpt,

--------------- sub select group ------------------


(SELECT hcar.cust_account_id GROUP_ID, hcar.status status,
hcar.related_cust_account_id related_id,
hca2.account_number group_acc, hp2.party_name group_name
FROM hz_cust_acct_relate_all hcar,
hz_cust_accounts hca2,
hz_parties hp2
WHERE hp2.party_id = hca2.party_id
AND hcar.cust_account_id = hca2.cust_account_id
AND hcar.status = 'A'
AND hcar.org_id = 210) cons
WHERE aps.org_id = 210
AND hp.party_id(+) = hca.party_id
AND rcpt.pid = aps.payment_schedule_id
AND coll.cust_id(+) = aps.customer_id
AND rcpt.cust_id = hca.cust_account_id(+)
AND cons.related_id(+) = hca.cust_account_id

AND aps.amount_due_remaining <> 0

You might also like