invoices to payment

4 05 2017

SELECT aca.check_number “Document Number”,
asa.segment1 “Supplier Number”,
asa.vendor_name “Supplier Name”,
aca.STATUS_LOOKUP_CODE “Payment Reconcilation Status”,
aca.CLEARED_AMOUNT “Payment Amount”,
aca.CURRENCY_CODE “Currency”,
aca.CLEARED_DATE “Payment Date”,
aia.invoice_num,
aia.invoice_amount,
AP_INVOICES_PKG.GET_APPROVAL_STATUS (aia.INVOICE_ID,
aia.INVOICE_AMOUNT,
aia.PAYMENT_STATUS_FLAG,
aia.INVOICE_TYPE_LOOKUP_CODE)
“Invoice Acct Status”,batch_id
FROM ap_checks_all aca,
ap_invoice_payments_all aipa,
ap_invoices_all aia,
ap_suppliers asa
WHERE aca.check_id = aipa.check_id
AND aipa.invoice_id = aia.invoice_id
AND aia.vendor_id = asa.vendor_id
AND aipa.ACCRUAL_POSTED_FLAG = ‘N’
AND POSTED_FLAG = ‘N’
— and aca.check_number =’7221646′
AND TRUNC (aca.CLEARED_DATE) BETWEEN ’01-JAN-2017′ AND ’30-APR-2017′
ORDER BY check_number;





:$PROFILES$.XLA_APPL_ID:NULL,:$PROFILES$.RESP_APPL_ID

5 04 2017

You can see that the “Application” is a parameter this is obtained via this SQL statement (from the Default Value field) “SELECT APPLICATION_NAME FROM FND_APPLICATION_VL WHERE APPLICATION_ID= nvl(:$PROFILES$.XLA_APPL_ID:NULL,:$PROFILES$.RESP_APPL_ID)”. The application is derived from the Application defined on the Responsibility.

 

Oracle introduced a new profile option called “SLA: Alternate Application Id”

you will need to set the profile option “SLA: Alternate Application Id” for each of your responsibilities at the Responsibility level . The patch number that you may need to apply in order to load the “SLA: Alternate Application Id” is Patch 8332032. Find out more at My Oracle Support using notes 833986.1 or 1233453.1.





FND_PROFILE and FND_GLOBAL values

5 04 2017

Following are the FND_PROFILE values that can be used in the PL/SQL code:

fnd_profile.value(‘PROFILEOPTION’);

fnd_profile.value(‘MFG_ORGANIZATION_ID’);

fnd_profile.value(‘ORG_ID’);

fnd_profile.value(‘LOGIN_ID’);

fnd_profile.value(‘USER_ID’);

fnd_profile.value(‘USERNAME’);

fnd_profile.value(‘CONCURRENT_REQUEST_ID’);

fnd_profile.value(‘GL_SET_OF_BKS_ID’);

fnd_profile.value(‘SO_ORGANIZATION_ID’);

fnd_profile.value(‘APPL_SHRT_NAME’);

fnd_profile.value(‘RESP_NAME’);

fnd_profile.value(‘RESP_ID’);
Following are the FND_GLOBAL values that can be used in the PL/SQL code:

FND_GLOBAL.USER_ID;

FND_GLOBAL.APPS_INTIALIZE;

FND_GLOBAL.LOGIN_ID;

FND_GLOBAL.CONC_LOGIN_ID;

FND_GLOBAL.PROG_APPL_ID;

FND_GLOBAL.CONC_PROGRAM_ID;

FND_GLOBAL.CONC_REQUEST_ID;
For example, I almost always use the following global variable assignments in my package specification to use throughout the entire package body:

g_user_id      PLS_INTEGER  :=  fnd_global.user_id;

g_login_id     PLS_INTEGER  :=  fnd_global.login_id;

g_conc_req_id  PLS_INTEGER  :=  fnd_global.conc_request_id;

g_org_id       PLS_INTEGER  :=  fnd_profile.value(‘ORG_ID’);

g_sob_id       PLS_INTEGER  :=  fnd_profile.value(‘GL_SET_OF_BKS_ID’);
And initialize the application environment as follows:

v_resp_appl_id  := fnd_global.resp_appl_id;

v_resp_id       := fnd_global.resp_id;

v_user_id       := fnd_global.user_id;

 

FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id, v_resp_appl_id);