Professional Documents
Culture Documents
GL Entries With AP Payments Query in Oracle Apps
GL Entries With AP Payments Query in Oracle Apps
SELECT glp.start_date,
gjh.je_header_id,
gjh.doc_sequence_value voucher_no,
gjh.je_source,
gjh.je_category,
entity_code,
gjh.period_name,
gjh.status,
gjh.actual_flag,
gjh.default_effective_date,
gjl.je_line_num,
gjl.code_combination_id,
gjl.description voucher_desc,
xal.accounted_dr debit,
xal.accounted_cr credit,
gcc.segment1
|| '-'
|| gcc.segment2
|| '-'
|| gcc.segment3
|| '-'
|| gcc.segment4
|| '-'
|| gcc.segment5
|| '-'
|| gcc.segment6
|| '-'
|| gcc.segment7
account_code,
TO_CHAR (aca.check_number) trx_num,
aca.check_date trx_date
FROM gl.gl_je_headers gjh,
gl.gl_je_lines gjl,
gl.gl_code_combinations gcc,
gl.gl_periods glp,
gl.gl_import_references imp,
xla.xla_ae_lines xal,
xla.xla_ae_headers xah,
xla.xla_events xe,
xla.xla_transaction_entities xte,
ap.ap_checks_all aca
WHERE 1 = 1
AND gjh.je_header_id = gjl.je_header_id
AND gjl.status || '' = 'P'
AND gjl.code_combination_id = gcc.code_combination_id
AND gjh.period_name = glp.period_name
AND glp.period_set_name = :p_period_set_name
AND glp.adjustment_period_flag <> 'Y'
AND gjh.je_source = 'Payables'
AND gjl.je_header_id = imp.je_header_id
AND gjl.je_line_num = imp.je_line_num
AND imp.gl_sl_link_id = xal.gl_sl_link_id
AND imp.gl_sl_link_table = xal.gl_sl_link_table
AND xal.application_id = xah.application_id
AND xal.ae_header_id = xah.ae_header_id
AND xah.application_id = xe.application_id
AND xah.event_id = xe.event_id
AND xe.application_id = xte.application_id
AND xte.application_id = 200
AND xe.entity_id = xte.entity_id
AND xte.entity_code = 'AP_PAYMENTS'
AND xte.source_id_int_1 = aca.check_id
AND gjh.default_effective_date BETWEEN :p_period_from_start_date
AND :p_period_to_end_date
AND (gjh.actual_flag = :p_actual_flag OR :p_actual_flag IS NULL)
GL Entries with the AR Transaction (Invoices) Query in oracle apps
SELECT glp.start_date, gjh.je_header_id, gjh.doc_sequence_value voucher_no,
gjh.je_source, gjh.je_category, entity_code, gjh.period_name,
gjh.status, gjh.actual_flag, gjh.default_effective_date,
gjl.je_line_num, gjl.code_combination_id,
gjl.description voucher_desc, xal.accounted_dr debit,
xal.accounted_cr credit,
gcc.segment1
|| '-'
|| gcc.segment2
|| '-'
|| gcc.segment3
|| '-'
|| gcc.segment4
|| '-'
|| gcc.segment5
|| '-'
|| gcc.segment6
|| '-'
|| gcc.segment7 account_code,
TO_CHAR (rct.trx_number) trx_num, rct.trx_date trx_date
FROM gl.gl_je_headers gjh,
gl.gl_je_lines gjl,
gl.gl_code_combinations gcc,
gl.gl_periods glp,
gl.gl_import_references imp,
xla.xla_ae_lines xal,
xla.xla_ae_headers xah,
xla.xla_events xe,
xla.xla_transaction_entities xte,
ra_customer_trx_all rct
WHERE 1 = 1
AND gjh.je_header_id = gjl.je_header_id
AND gjl.status || '' = 'P'
AND gjl.code_combination_id = gcc.code_combination_id
AND gjh.period_name = glp.period_name
AND glp.period_set_name = :p_period_set_name
AND glp.adjustment_period_flag <> 'Y'
AND gjh.je_source = 'Receivables'
AND gjl.je_header_id = imp.je_header_id
AND gjl.je_line_num = imp.je_line_num
AND imp.gl_sl_link_id = xal.gl_sl_link_id
AND imp.gl_sl_link_table = xal.gl_sl_link_table
AND xal.application_id = xah.application_id
AND xal.ae_header_id = xah.ae_header_id
AND xah.application_id = xe.application_id
AND xah.event_id = xe.event_id
AND xe.application_id = xte.application_id
AND xte.application_id = 222
AND xe.entity_id = xte.entity_id
AND xte.entity_code = 'TRANSACTIONS'
AND xte.source_id_int_1 = rct.customer_trx_id
AND gjh.default_effective_date BETWEEN :p_period_from_start_date
AND :p_period_to_end_date
AND (gjh.actual_flag = :p_actual_flag OR :p_actual_flag IS NULL)
Link between Order Management and Account Receivables (OM Link AR)
SELECT ooha.order_number
, oola.line_number so_line_number
, oola.ordered_item
, oola.ordered_quantity * oola.unit_selling_price so_extended_price
, rcta.trx_number invoice_number
, rcta.trx_date
, rctla.line_number inv_line_number
, rctla.unit_selling_price inv_unit_selling_price
FROM oe_order_headers_all ooha
, oe_order_lines_all oola
, ra_customer_trx_all rcta
, ra_customer_trx_lines_all rctla
WHERE ooha.header_id = oola.header_id
AND rcta.customer_trx_id = rctla.customer_trx_id
AND rctla.interface_line_attribute6 = TO_CHAR (oola.line_id)
AND rctla.interface_line_attribute1 = TO_CHAR (ooha.order_number)
AND order_number = :p_order_number
SELECT hp1.party_name,
hp1.party_id,
hca.account_number,
hcpc.name,
hcsua.site_use_code,
hl.country
|| ' '
|| hl.address1
|| ' '
|| hl.city
|| ' '
|| hl.state
|| ' '
|| hl.postal_code
"Address"
FROM hz_parties hp1,
hz_cust_accounts hca,
hz_party_sites hps,
hz_cust_profile_classes hcpc,
hz_customer_profiles hcp,
hz_locations hl,
hz_cust_acct_sites_all hcasa,
hz_cust_site_uses_all hcsua
WHERE 1 = 1
AND hca.account_number = 3896
AND hcp.profile_class_id = hcpc.profile_class_id(+)
AND hca.cust_account_id = hcp.cust_account_id
AND hp1.party_id = hca.party_id
--and hca.cust_account_id=hcasa.cust_account_id
AND hps.party_site_id = hcasa.party_site_id
AND hcasa.cust_acct_site_id = hcsua.cust_acct_site_id
AND hp1.party_id = hps.party_id
AND hl.location_id = hps.location_id
AND hcsua.primary_flag = 'Y'
AND hcp.site_use_id IS NULL
AND hcasa.org_id = 204;
SELECT hca.account_number,
hp.party_name,
rcta.trx_date,
(SELECT SUM (rctla.extended_amount)
FROM ra_customer_trx_lines_all rctla
WHERE rcta.customer_trx_id = rctla.customer_trx_id)
"INVOICE AMOUNT",
hcpa.overall_credit_limit,
apsa.amount_due_remaining,
acra.amount
FROM hz_parties hp,
hz_cust_accounts hca,
hz_customer_profiles hcp,
hz_cust_profile_amts hcpa,
ra_customer_trx_all rcta--, ra_customer_trx_lines_all rctla
,
ar_cash_receipts_all acra,
ar_receivable_applications_all araa,
ar_payment_schedules_all apsa
WHERE 1 = 1
AND hp.party_id = hca.party_id
AND hca.cust_account_id = hcp.cust_account_id
AND hcp.site_use_id IS NULL
AND hcpa.cust_account_profile_id = hcp.cust_account_profile_id
AND hcpa.currency_code = 'USD'
AND rcta.sold_to_customer_id = hca.cust_account_id
AND rcta.org_id = 204
--and rcta.customer_trx_id = rctla.customer_trx_id
AND rcta.customer_trx_id = apsa.customer_trx_id
AND araa.applied_customer_trx_id = apsa.customer_trx_id
AND acra.cash_receipt_id = araa.cash_receipt_id
AND rcta.trx_number = '11792'
AND acra.cash_receipt_id =
(SELECT MAX (cash_receipt_id)
FROM ar_receivable_applications_all araa_2
WHERE araa_2.applied_customer_trx_id = apsa.customer_trx_id)
;
3)to list all the invoices whicha r pending to b paid for more than 60 days from sysdate
SELECT hca.account_number,
hp.party_name,
rcta.trx_number,
rcta.trx_date,
SUM (rctla.extended_amount),
CASE
WHEN TRUNC (SYSDATE - rcta.trx_date) BETWEEN 30 AND 60
THEN
rcta.trx_number
END
"Pending for 30 - 60 days",
CASE
WHEN TRUNC (SYSDATE - rcta.trx_date) BETWEEN 60 AND 120
THEN
rcta.trx_number
END
"Pending for 60 - 120 days",
CASE
WHEN TRUNC (SYSDATE - rcta.trx_date) > 120 THEN rcta.trx_number
END
"Pending for more than 120 days"
FROM hz_parties hp,
hz_cust_accounts hca,
ra_customer_trx_all rcta,
ra_customer_trx_lines_all rctla
WHERE hp.party_id = hca.party_id
AND rcta.org_id = 204
AND hca.cust_account_id = rcta.sold_to_customer_id
AND rcta.customer_trx_id = rctla.customer_trx_id
AND hca.account_number = 3896
GROUP BY hca.account_number, hp.party_name, rcta.trx_number, rcta.trx_date;
SELECT hca.account_number,
hp.party_name,
rcta.trx_number,
acra.receipt_number,
rcta.trx_date,
acra.creation_date,
acra.amount
FROM hz_parties hp,
hz_cust_accounts hca,
ra_customer_trx_all rcta--, ra_customer_trx_lines_all rctla
,
ar_cash_receipts_all acra,
ar_payment_schedules_all apsa,
ar_receivable_applications_all araa,
ar_lookups al
WHERE 1 = 1
AND hp.party_id = hca.party_id
AND rcta.sold_to_customer_id = hca.cust_account_id
AND rcta.org_id = 204
--and rcta.customer_trx_id = rctla.customer_trx_id
AND rcta.customer_trx_id = apsa.customer_trx_id
AND araa.applied_customer_trx_id = apsa.customer_trx_id
AND acra.cash_receipt_id = araa.cash_receipt_id
AND acra.status = al.lookup_code
AND al.lookup_type = 'PAYMENT_TYPE'
AND rcta.trx_number = '11792'
AND TRUNC (MONTHS_BETWEEN (SYSDATE, araa.creation_date)) <= 6;
AR to HZ Table Link
SELECT HP.PARTY_NAME CUSTOMER_NAME
FROM HZ_PARTIES HP,
RA_CUSTOMER_TRX_ALL RCTA,
HZ_CUST_ACCOUNTS_ALL HCAA
WHERE HP.PARTY_ID = HCAA.PARTY_ID
AND HCAA.CUST_ACCOUNT_ID = RCTA.BILL_TO_CUSTOMER_ID
AND RCTA.TRX_NUMBER = '500875'
AND RCTA.ORG_ID = 204
=======================================
SELECT ACRA.RECEIPT_NUMBER
FROM RA_CUSTOMER_TRX_ALL RCTA,
AR_CASH_RECEIPTS_ALL ACRA,
AR_RECEIVABLE_APPLICATIONS_ALL ARAA
WHERE RCTA.CUSTOMER_TRX_ID = ARAA.APPLIED_CUSTOMER_TRX_ID
AND ACRA.CASH_RECEIPT_ID = ARAA.CASH_RECEIPT_ID
AND RCTA.TRX_NUMBER = '500875'
AND RCTA.ORG_ID = 204
===============================
SELECT RCTTA.NAME
FROM RA_CUST_TRX_TYPES_ALL RCTTA,
RA_CUSTOMER_TRX_ALL RCTA
WHERE RCTTA.CUST_TRX_TYPE_ID = RCTA.CUST_TRX_TYPE_ID
AND RCTA.TRX_NUMBER = '500875'
AND RCTA.ORG_ID = RCTTA.ORG_ID
AND RCTA.ORG_ID = 204
=============================================
SELECT HP.PARTY_NAME,
HCAA.ACCOUNT_NUMBER,
HL.ADDRESS1,
HL.ADDRESS2,
HL.ADDRESS3,
HL.ADDRESS4,
HL.CITY,
HL.STATE,
HL.COUNTRY
FROM HZ_LOCATIONS HL,
HZ_PARTIES HP,
HZ_PARTY_SITES HPS,
HZ_CUST_ACCOUNTS_ALL HCAA,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA,
RA_CUSTOMER_TRX_ALL RCTA
WHERE HP.PARTY_ID = HPS.PARTY_ID
AND HPS.LOCATION_ID = HL.LOCATION_ID
AND HP.PARTY_ID = HCAA.PARTY_ID
AND HCAA.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
AND HCSUA.SITE_USE_ID = RCTA.SHIP_TO_SITE_USE_ID
AND HCASA.PARTY_SITE_ID = HPS.PARTY_SITE_ID
AND HCAA.CUST_ACCOUNT_ID = RCTA.BILL_TO_CUSTOMER_ID
AND HCSUA.SITE_USE_CODE = 'SHIP_TO'
AND RCTA.TRX_NUMBER = '500875'
=============================================
SELECT HP.PARTY_NAME,
HCAA.ACCOUNT_NUMBER,
HL.ADDRESS1,
HL.ADDRESS2,
HL.ADDRESS3,
HL.ADDRESS4,
HL.CITY,
HL.STATE,
HL.COUNTRY
FROM HZ_LOCATIONS HL,
HZ_PARTIES HP,
HZ_PARTY_SITES HPS,
HZ_CUST_ACCOUNTS_ALL HCAA,
HZ_CUST_ACCT_SITES_ALL HCASA,
HZ_CUST_SITE_USES_ALL HCSUA,
RA_CUSTOMER_TRX_ALL RCTA
WHERE HP.PARTY_ID = HPS.PARTY_ID
AND HPS.LOCATION_ID = HL.LOCATION_ID
AND HP.PARTY_ID = HCAA.PARTY_ID
AND HCAA.CUST_ACCOUNT_ID = HCASA.CUST_ACCOUNT_ID
AND HCASA.CUST_ACCT_SITE_ID = HCSUA.CUST_ACCT_SITE_ID
AND HCSUA.SITE_USE_ID = RCTA.BILL_TO_SITE_USE_ID
AND HCASA.PARTY_SITE_ID = HPS.PARTY_SITE_ID
AND HCAA.CUST_ACCOUNT_ID = RCTA.BILL_TO_CUSTOMER_ID
AND RCTA.ORG_ID = 204
AND HCSUA.SITE_USE_CODE = 'BILL_TO'
AND RCTA.TRX_NUMBER = '500875' ;
/*List of Standing Orders along with Credit Card Details on the first open line*/
SELECT OOHA.HEADER_ID,oola.line_number,oola.line_id,op.line_id,
OOHA.ORDER_NUMBER,
(SELECT hca.account_number
FROM hz_cust_accounts hca
WHERE hca.cust_account_id=ooha.sold_to_org_id
) CustomerNumber,
OOHA.FLOW_STATUS_CODE "OrderStatus",
OOHA.PAYMENT_TYPE_CODE,
ooha.credit_card_number,
OOLA.ORDERED_ITEM,
OOLA.ORDERED_QUANTITY,
OOLA.SHIPPED_QUANTITY,
oola.invoiced_quantity,
OOLA.TAX_VALUE,
(OOLA.UNIT_SELLING_PRICE * OOLA.ORDERED_QUANTITY) ITEMTOTALAMOUNT,
OOLA.FLOW_STATUS_CODE "LineStatus",
IFTE.TRXN_EXTENSION_ID ,
ic.ccnumber,
ic.chname,
ic.card_owner_id,
ic.masked_cc_number,
ic.card_issuer_code,
ic.expirydate,
ic.inactive_date
FROM OE_ORDER_HEADERS_ALL OOHA,
OE_ORDER_LINES_ALL OOLA,
OE_PAYMENTS OP,
IBY_FNDCPT_TX_EXTENSIONS IFTE,
IBY_PMT_INSTR_USES_ALL IPUA,
IBY_CREDITCARD IC
WHERE OOHA.HEADER_ID=OOLA.HEADER_ID
--AND OOHA.PAYMENT_TYPE_CODE LIKE 'CREDIT_CARD'
AND OP.line_ID(+) =OOla.line_ID
AND OP.TRXN_EXTENSION_ID=IFTE.TRXN_EXTENSION_ID(+)
--AND IFTE.TRXN_EXTENSION_ID=ITSA.INITIATOR_EXTENSION_ID
AND IFTE.INSTR_ASSIGNMENT_ID=IPUA.INSTRUMENT_PAYMENT_USE_ID(+)
AND IPUA.INSTRUMENT_ID =IC.INSTRID(+)
AND ooha.flow_status_code != 'CLOSED'
and ooha.PAYMENT_TERM_ID in ( 1021 ,1143)
and ooha.order_type_id=1010
and oola.line_id = (select min(l.line_id) from oe_order_lines_all l where
l.header_id=ooha.header_id
and l.flow_status_code not in ('CLOSED','CANCELLED'));
/List of Standing Orders for which credit card details are populated at header
level/
XXXXXXXXXXXX0481
/**List of Standng order lines for with credit card details are shown******/
Receipts tables
Customer Tables
Setup tables
This table stores information about each transaction type for all
RA_CUST_TRX_TYPES_ALL classes of transactions, for example, invoices, commitments, and
credit memos.
AR_RECEIPT_CLASSES This table stores the different receipt classes that you define.
AR to GL link in R12
SELECT ooha.order_number,
oola.line_number,
wdd.source_header_type_name,
wnd.name,
rcta.trx_number,
xlate.transaction_number,
b.name batch_name,
b.description batch_description,
h.je_category,
h.je_source,
h.period_name je_period_name,
h.name journal_name,
h.status journal_status,
h.description je_description
FROM -- Create Sales Order --
oe_order_headers_all ooha,
oe_order_lines_all oola,
-- Book the Sales Order --
wsh_delivery_details wdd,
wsh_delivery_assignments wda,
wsh_new_deliveries wnd,
-- Enter Invoices in Receivables --
ra_customer_trx_all rcta,
-- Sub ledger accounting --
xla.xla_transaction_entities xlate,
xla_events xlae,
xla_ae_headers xlah,
xla_ae_lines xlal,
-- GL --
gl_import_references gir,
gl_code_combinations_kfv glcc,
gl_je_lines l,
gl_je_headers h,
gl_je_batches b
WHERE 1 = 1
-- Create Sales Order --
AND ORDER_NUMBER = '601694' -- (OR) AND trx_number = '1715'
AND ooha.header_id = oola.header_id
-- Book the Sales Order --
AND oola.line_id = wdd.source_line_id
AND wdd.delivery_detail_id = wda.delivery_detail_id
AND wda.delivery_id = wnd.delivery_id
-- Enter Invoices in Receivables --
AND TO_CHAR (ooha.order_number) = rcta.interface_header_attribute1
-- Sub ledger accounting --
AND rcta.trx_number = xlate.transaction_number
AND xlae.application_id = xlate.application_id
AND xlae.entity_id = xlate.entity_id
AND xlah.event_id = xlae.event_id
AND xlal.ae_header_id = xlah.ae_header_id
-- GL --
--Like Between Sub Ledger to GL --
AND gir.gl_sl_link_table = xlal.gl_sl_link_table
AND gir.gl_sl_link_id = xlal.gl_sl_link_id
AND xlal.code_combination_id = glcc.code_combination_id
--Like Between Sub Ledger to GL --
AND l.je_header_id = gir.je_header_id
AND l.je_line_num = gir.je_line_num
AND h.je_header_id = l.je_header_id
AND b.je_batch_id = h.je_batch_id
AND h.je_source = 'Receivables'
AND h.period_name = '12-07'
ORDER BY line_number
select distinct
arc.receipt_number
,arc.receipt_date
,gjl.entered_cr
,gjl.entered_dr
,gjl.accounted_cr
,gjl.accounted_dr
,gjh.name journal_name
,gjh.creation_date journal_creation_date
,glc.segment1
from ar_cash_receipt_history_all arh
,ar_distributions_all ard
,ar_cash_receipts_all arc
,ar_batches_all arb
,gl_code_combinations glc
,xla.xla_transaction_entities te
,xla_ae_headers xah
,xla_ae_lines xal
,xla_distribution_links xdl
,gl_import_references gir
,gl_je_headers gjh
,gl_je_lines gjl
where arh.cash_receipt_history_id = ard.source_id
and arc.cash_receipt_id = arh.cash_receipt_id
and arh.batch_id = arb.batch_id (+)
and ard.source_table = 'CRH'
and arc.type = 'CASH'
and arh.posting_control_id <> -3
and nvl (te.source_id_int_1, -99) = arc.cash_receipt_id
and te.application_id = 222
and te.entity_code = 'RECEIPTS'
and xah.entity_id = te.entity_id
and xah.event_id = arh.event_id
and xah.ae_header_id = xal.ae_header_id
and xal.code_combination_id = ard.code_combination_id
and xdl.ae_header_id = xah.ae_header_id
and xdl.ae_header_id = xal.ae_header_id
and xdl.event_id = xah.event_id
and gir.gl_sl_link_id = xal.gl_sl_link_id
and gjh.je_header_id = gir.je_header_id
and xdl.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
and gjh.je_source = 'Receivables'
and gjh.je_category = 'Receipts'
and xah.event_type_code <> 'MANUAL'
and xal.gl_sl_link_table = 'XLAJEL'
and gir.je_line_num = gjl.je_line_num
and gjl.code_combination_id = glc.code_combination_id
and gjl.je_header_id = gjh.je_header_id
--and arc.receipt_number = 'MH1206201210' ;
AR (Misc Receipt)
select distinct
acr.receipt_number
,gjl.entered_cr
,gjl.entered_dr
,gjl.accounted_cr
,gjl.accounted_dr
,gjh.name journal_name
,gjh.creation_date journal_creation_date
,gcc.segment1
from gl_code_combinations gcc
,gl_je_lines gjl
,gl_je_headers gjh
,gl_je_batches glb
,gl_import_references gir
,xla_ae_lines xal
,xla_ae_headers xah
,xla_distribution_links xdl
,ar_misc_cash_distributions_all msd
,ar_distributions_all dist
,ar_cash_receipts_all acr
,ar_receivables_trx_all art
where gcc.code_combination_id = gjl.code_combination_id
and gjh.je_header_id = gjl.je_header_id
and glb.je_batch_id = gjh.je_batch_id
and gjl.status = 'P'
and gjh.actual_flag = 'A'
and gir.je_header_id = gjh.je_header_id
and gir.gl_sl_link_id = xal.gl_sl_link_id
and xah.ae_header_id = xal.ae_header_id
and xdl.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
and gjh.je_source = 'Receivables'
and gjh.je_category = 'Misc Receipts'
and xdl.event_id = xah.event_id
and xah.ae_header_id = xdl.ae_header_id
and msd.event_id = xah.event_id
and msd.posting_control_id <> -3
and msd.misc_cash_distribution_id = dist.source_id
and dist.source_type = 'MISCCASH'
and dist.code_combination_id = gjl.code_combination_id
and acr.cash_receipt_id = msd.cash_receipt_id
and acr.type = 'MISC'
and art.receivables_trx_id = acr.receivables_trx_id
--and acr.receipt_number = '100009 IONA GEDDES'
union
select distinct
acr.receipt_number
,gjl.entered_cr
,gjl.entered_dr
,gjl.accounted_cr
,gjl.accounted_dr
,gjh.name journal_name
,gjh.creation_date journal_creation_date
,gcc.segment1
from gl_code_combinations gcc
,gl_je_lines gjl
,gl_je_headers gjh
,gl_je_batches glb
,gl_import_references gir
,xla_ae_lines xal
,xla_ae_headers xah
,xla_distribution_links xdl
,ar_cash_receipt_history_all arh
,ar_distributions_all dist
,ar_cash_receipts_all acr
,ar_receivables_trx_all art
where gcc.code_combination_id = gjl.code_combination_id
and gjh.je_header_id = gjl.je_header_id
and glb.je_batch_id = gjh.je_batch_id
and gjl.status = 'P'
and gjh.actual_flag = 'A'
and gir.je_header_id = gjh.je_header_id
and gir.gl_sl_link_id = xal.gl_sl_link_id
and xah.ae_header_id = xal.ae_header_id
and xdl.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
and gjh.je_source = 'Receivables'
and gjh.je_category = 'Misc Receipts'
and xdl.event_id = xah.event_id
and xah.ae_header_id = xdl.ae_header_id
and arh.event_id = xah.event_id
and arh.posting_control_id <> -3
and arh.cash_receipt_history_id = dist.source_id
and dist.code_combination_id = gjl.code_combination_id
and dist.line_id = xdl.source_distribution_id_num_1
and acr.cash_receipt_id = arh.cash_receipt_id
and acr.type = 'MISC'
and art.receivables_trx_id = acr.receivables_trx_id
--and acr.receipt_number = 'AG308260712NY';
AR (Invoice)
select distinct
rat.trx_number
,rat.trx_date transaction_date
,gjl.entered_cr
,gjl.entered_dr
,gjl.accounted_cr
,gjl.accounted_dr
,gjh.name journal_name
,gjh.creation_date journal_creation_date
,glc.segment1,gjh.je_category
from ra_cust_trx_line_gl_dist_all rac
,ra_customer_trx_all rat
,ra_batches_all rab
,ra_customer_trx_lines_all ral
,gl_code_combinations glc
,xla_distribution_links xdl
,xla_ae_headers xah
,xla_ae_lines xal
,gl_import_references gir
,gl_je_lines gjl
,gl_je_headers gjh
where rat.customer_trx_id = rac.customer_trx_id
and rac.customer_trx_line_id = ral.customer_trx_line_id (+)
and rab.batch_id (+) = rat.batch_id
and rac.posting_control_id <> -3
and xdl.source_distribution_id_num_1 = rac.cust_trx_line_gl_dist_id
and xdl.source_distribution_type = 'RA_CUST_TRX_LINE_GL_DIST_ALL'
and gjh.je_source = 'Receivables'
and gjh.je_category = 'Sales Invoices'
and xah.event_type_code <> ' MANUAL'
and xah.ae_header_id = xdl.ae_header_id
and xal.ae_header_id = xah.ae_header_id
and xal.ae_line_num = xdl.ae_line_num
and gir.gl_sl_link_id = xal.gl_sl_link_id
and gjl.je_header_id = gir.je_header_id
and gir.je_line_num = gjl.je_line_num
and gjh.je_header_id = gjl.je_header_id
and glc.code_combination_id = gjl.code_combination_id
and rac.code_combination_id = gjl.code_combination_id
and gjh.je_header_id = gir.je_header_id
--and rat.trx_number = 'I0069600';
AR (Invoice Adjustment)
select distinct
rat.trx_number
,rat.trx_date
,gjl.entered_cr
,gjl.entered_dr
,gjl.accounted_cr
,gjl.accounted_dr
,gjh.name journal_name
,gjh.creation_date journal_creation_date
,glc.segment1
from ar_adjustments_all ara
,ar_distributions_all ard
,ra_customer_trx_all rat
,ar_receivables_trx_all art
,gl_code_combinations_kfv glc
,xla_distribution_links xdl
,xla_ae_headers xah
,xla_ae_lines xal
,xla.xla_transaction_entities te
,gl_import_references gir
,gl_je_headers gjh
,gl_je_lines gjl
where glc.code_combination_id = ard.code_combination_id
and ara.adjustment_id = ard.source_id
and rat.customer_trx_id = ara.customer_trx_id
and ara.receivables_trx_id = art.receivables_trx_id
and ard.source_table = 'ADJ'
and ara.posting_control_id <> -3
and xdl.source_distribution_id_num_1 = ard.line_id
and xdl.source_distribution_type = 'AR_DISTRIBUTIONS_ALL'
and gjh.je_source = 'Receivables'
and gjh.je_category = 'Adjustment'
and xdl.event_id = xah.event_id
and xah.ae_header_id = xdl.ae_header_id
and xah.ae_header_id = xal.ae_header_id
and xal.code_combination_id = ard.code_combination_id
and xah.entity_id = te.entity_id
and te.application_id = 222
and te.entity_code = 'ADJUSTMENTS'
and nvl (te.source_id_int_1, (-99)) = ara.adjustment_id
and gir.gl_sl_link_id = xal.gl_sl_link_id
and gjh.je_header_id = gir.je_header_id
and gjh.je_header_id = gjl.je_header_id
and xal.code_combination_id = gjl.code_combination_id
--and rat.trx_number = 'A0005418';
AR_RECEIPT_API_PUB is the main package that has several procedures to perform different
actions.
1] AR_RECEIPT_API_PUB.CREATE_CASH
Use this procedure to create a single cash receipt for payment received in the form of a check
or cash.
Use these procedures to apply the cash receipts from a customer to an invoice, debit memo, or
other debit item.
3] AR_RECEIPT_API_PUB.UNAPPLY
Use this procedure to unapply a cash receipt application against a specified installment of a
debit item or payment schedule ID.
4] AR_RECEIPT_API_PUB.CREATE_AND_APPLY
Use this procedure to create a cash receipt and apply it to a specified installment of a debit
item.
5] AR_RECEIPT_API_PUB.REVERSE
6] AR_RECEIPT_API_PUB.APPLY_ON_ACCOUNT
7] AR_RECEIPT_API_PUB.UNAPPLY_ON_ACCOUNT
8] AR_RECEIPT_API_PUB.ACTIVITY_APPLICATION
Use this procedure to create an activity application on a cash receipt, including Short
Term Debit (STD) and Receipt Write-off applications.
9] AR_RECEIPT_API_PUB. ACTIVITY_UNAPPLICATION
Use this procedure to create a reversal of an activity application on a cash receipt including
Short Term Debt and Receipt write-off.
10] AR_RECEIPT_API_PUB.CREATE_MISC
11] AR_RECEIPT_API_PUB.APPLY_OPEN_RECEIPT
Use this procedure to apply a cash receipt to another open receipt. Open receipts include
unapplied cash, on-account cash, and claim investigation applications.
12] AR_RECEIPT_API_PUB.UNAPPLY_OPEN_RECEIPT
Mandatory Attributes:
AGREEMENT_ID
COMMENTS
CONS_BILLING_NUMBER
CONVERSION_DATE
CONVERSION_RATE
CONVERSION_TYPE
CREDIT_METHOD_FOR_ACCT_RULE
CREDIT_METHOD_FOR_INSTALLMENTS
CURRENCY_CODE
CUSTOMER_BANK_ACCOUNT_ID
CUST_TRX_TYPE_ID
DOCUMENT_NUMBER
DOCUMENT_NUMBER_SEQUENCE_ID
GL_DATE
HEADER_ATTRIBUTE1-15
HEADER_ATTRIBUTE_CATEGORY
HEADER_GDF_ATTRIBUTE1-30
INITIAL_CUSTOMER_TRX_ID
INTERNAL_NOTES
INVOICING_RULE_ID
ORIG_SYSTEM_BILL_ADDRESS_ID
ORIG_SYSTEM_BILL_CONTACT_ID
ORIG_SYSTEM_BILL_CUSTOMER_ID
ORIG_SYSTEM_SOLD_CUSTOMER_ID
ORIG_SYSTEM_BATCH_NAME
PAYMENT_SERVER_ORDER_ID
PAYMENT_SET_ID
PREVIOUS_CUSTOMER_TRX_ID
PRIMARY_SALESREP_ID
PRINTING_OPTION
PURCHASE_ORDER
PURCHASE_ORDER_DATE
PURCHASE_ORDER_REVISION
REASON_CODE
RECEIPT_METHOD_ID
RELATED_CUSTOMER_TRX_ID
SET_OF_BOOKS_ID
TERM_ID
TERRITORY_ID
TRX_DATE
TRX_NUMBER
Optional Attributes:
ACCOUNTING_RULE_DURATION
ACCOUNTING_RULE_ID
ATTRIBUTE1-15
ATTRIBUTE_CATEGORY
INTERFACE_LINE_ATTRIBUTE1-15
INTERFACE_LINE_CONTEXT
INVENTORY_ITEM_ID
REFERENCE_LINE_ID
RULE_START_DATE
SALES_ORDER
SALES_ORDER_DATE
SALES_ORDER_LINE
SALES_ORDER_REVISION
SALES_ORDER_SOURCE
TAX_CODE
TAX_RATE
The following Ship-To fields were mandatory grouping attributes in release 11i, but are optional
in release 12ORIG_SYSTEM_SHIP_CUSTOMER_ID
ORIG_SYSTEM_SHIP_ADDRESS_ID
ORIG_SYSTEM_SHIP_CONTACT_IDThis is because ship to information is now stored at the line
level in R12. Therefore a single invoice could have different ship to information for each line.
Autoinvoice program matches all the mandatory parameters and group the transactions into
invoices. If all the mandatory parameters are matched for two or more similar transactions, they
will fall in a same invoice. If we define any optional attribute, Autoinvoice program matches
optional attributes in addition to the mandatory attributes to group the transactions.
For Example: SALES_ORDER is the optional attribute assigned to a grouping rule, there
Autoinvoice program matches all mandatory attributes + Sales Order for the transactions. For
any two or more transactions, if all the mandatory attributes and Sales Order(optional attribute)
are matching, only one invoice will be created for those transactions.
If your Grouping rule doesn't include Sales Order and Ship To fields in Optional attributes,
similar sales orders with different ship-to addresses but same bill to will be grouped into one
invoice and AR transaction form will not show any value in Ship-To address as it can not
determine which ship-to value to be picked from multiple sales orders.
If we want to assign optional attributes for all invoices, credit memos and debit memos, First
assign optional characteristics for invoice class and the place the cursor on Class Invoices ad
use Down Arrow to define attributes for other classes(Credit Memo and Debit Memo) as well.
Let us see how Autoinvoice program derives Transaction date based on Derive Date option for
Transaction source and populted columns from RA_INTERFACE_LINES_ALL such as
GL_DATE, SHIP_DATE_ACTUAL and SALES_ORDER_DATE.
Case 1: If the Derive Date option is enabled for Transaction Source, Autoinvoice program uses
the following order to create Transaction Date.
1. GL_DATE
2. SHIP_DATE_ACTUAL
3. SALES_ORDER_DATE
4. DEFAULT_DATE (Provided in parameters of Autoinvoice program, which is mandatory)
Case2: If the Derive Date check box is disabled for Transaction Source, Autoinvoice program
uses following order to populated Transaction Date.
1. GL_DATE
2. DEFAULT_DATE (Provided in parameters of Autoinvoice program, which is mandatory)
'Override Terms' check box should be enabled Under 'Account Profile' Tab.
'Override Terms' check box should be enabled Under 'Profile' Tab.By checking the
Override Terms check box, you are saying that when a user creates an invoice for
this customer, he is allowed to change the Payment Term that defaults in. This
feature allows you to create
non-balance forward transactions within a BFB-enabled site.
2. If you have Override Terms check box checked, you still cannot override the
payment term if the following conditions are true:
-- The customer you are interfacing data for is a Balance Forward Billing (BFB)
enabled customer
-- The payment term you are providing in the interface tables is a BFB term that is
different from the default payment term you have set up at the Account or Site profile
That means for a BFB enabled customer, we can not override the Default Payment
Term with BFB enabled Payment Term.
If you try to override the default payment term with Non-BFB Payment Term, it will
work.
For example:
How to Debug the error 'Please complete your tax accounting flexfield'
This post explains the process to debug the error 'Please complete your tax
accounting flexfield' which appears in Auto Invoicing process.This approach
helps you when the Receivables Auto Accounting rules derive the Tax
account segments from E Business Tax setups and you have not much idea
on EB Tax setups.
Step 1: Get the Customer details from Auto Invoice Import program output or
from Sales Order.
Notice that the Account segment which is missing in the error has source as 'Taxes'.
It means this segment gets derived from EB Tax.Generally Receivables uses Tax
accounts which can be defined at any of the 3 levels shown below.
1. Tax
2. Tax Jurisdiction
3. Tax Rate
Note the distribution amount. Close this window and click on Tax button to open
Tax window.
Based on the Distribution amount noted from Invoice Distributions window, find out
the tax details in Tax window.
Step 4: Check whether the tax accounts are defined and/or active currently in
EB Tax.
Responsibility: Tax Manager or any Tax responsibility which has access to setups.
Query the form with Tax Jurisdiction code noted from step 3.
Click on Tax Accounts button which is on top right. Check whether Tax accounts are
defined and/or active.
Click on Tax Accounts button and check whether Tax accounts are defined and/or
active.
Make sure the tax accounts are defined and are active, then re run Auto Invoice
program to process errored records.
Posted by Elangovan Ragavan at 09:26 1 comment:
, hca.cust_account_id cust_id
, hp.party_number party_no
, hp.party_name
, rila.INTERFACE_LINE_ATTRIBUTE4
, rila.interface_line_attribute2 crris
, rila.trx_number
, rila.trx_date
, rila.interface_line_id int_line_id
, rila.org_id
, rila.batch_source_name batch
, rila.interface_line_id line_id
, rila.interface_line_attribute1 attrib1
, gl.NAME sob
, rila.amount
, rila.line_number
, rila.quantity
, rila.unit_selling_price
, rila.memo_line_name
, rila.last_update_date
, rila.description
, rila.*
, '---> ERRORS'
, riea.interface_line_id
, riea.MESSAGE_TEXT
, riea.invalid_value
, ar.ar_receipt_methods arm
, gl.gl_ledgers gl
, apps.hz_cust_accounts hca
, apps.hz_parties hp
, ar.ra_interface_errors_all riea
AND 1 = 1;
Posted by Elangovan Ragavan at 09:58 1 comment:
Labels: AR_Query
, rila.org_id
, COUNT(*) lines
, ar.ar_receipt_methods arm
, gl.gl_ledgers gl
, apps.hz_cust_accounts hca
, apps.hz_parties hp
, ar.ra_interface_errors_all riea
GROUP BY rila.batch_source_name
, rila.org_id;
Labels: AR_Query
, ar.ra_batch_sources_all rbsa
AND 1 = 1
GROUP BY rbsa.name
ORDER BY rbsa.name;
Labels: AR_Query
, rcta.customer_trx_id
, rba.name batch
, rcta.creation_date
, rctta.name tx_type
, hp.party_number party
, hca.account_number act_no
, hp.party_name
, hps.party_site_number site_num
, rbsa.name source
, rbsa.description
, rcta.trx_date
, rctla.description line_descr
, rctla.unit_selling_price
, rctla.line_type
, rctla.interface_line_context
, rctla.tax_rate
, ar.ra_customer_trx_lines_all rctla
, ar.ra_cust_trx_line_gl_dist_all rctlgda
, ar.ra_batches_all rba
, ar.ra_cust_trx_types_all rctta
, apps.hz_cust_accounts hca
, apps.hz_parties hp
, ar.hz_party_sites hps
, apps.hz_cust_acct_sites_all hcasa
, apps.hz_cust_site_uses_all hcsua
, ar.hz_locations hl
, applsys.fnd_user fu1
, applsys.fnd_user fu2
, ar.ra_batch_sources_all rbsa
, gl.gl_code_combinations gcc
AND 1 = 1;
Labels: AR_Query
SELECT rcta.trx_number
, rcta.complete_flag complete
, rcta.request_id
, fu1.description created_by
, rbsa.name source_name
, rbsa.description
, fu2.description updated_by
, hp.party_name
, hca.account_number act_no
, hps.party_site_number site_num
, rcta.org_id
, rcta.trx_date
, rcta.creation_date
, rcta.last_update_date
, rcta.printing_original_date print_first
, rcta.printing_last_printed print_last
, hcsua.location
, hl.address1
, hl.address2
, hl.address3
, hl.address4
, hl.city
, hl.state
, hl.postal_code
, hl.country
, apps.hz_cust_accounts hca
, apps.hz_parties hp
, ar.hz_party_sites hps
, apps.hz_cust_acct_sites_all hcasa
, apps.hz_cust_site_uses_all hcsua
, ar.hz_locations hl
, applsys.fnd_user fu1
, applsys.fnd_user fu2
, ar.ra_batch_sources_all rbsa
AND 1 = 1;
Labels: AR_Query
SELECT hp.party_name
, hca.account_number act_no
, hca.cust_account_id
, hca.party_id
, '##'
, hca.creation_date hdr_creation_date
, fu_header.description hdr_created_by
, hca.last_update_date hdr_updated
, fu_hdr_upd.description hdr_updated_by
, '###'
, hcsua.org_id
, hps.party_site_number site_num
, hcsua.cust_acct_site_id
, hcsua.location
, hcsua.site_use_code
, hcsua.primary_flag
, '####'
, hcsua.creation_date site_creation_date
, fu_site.description site_created_by
, hcsua.last_update_date site_updated
, fu_site_upd.description site_updated_by
, '#####'
, hl.address1
, hl.address2
, hl.address3
, hl.address4
, hl.city
, hl.state
, hl.postal_code
FROM apps.hz_parties hp
, ar.hz_party_sites hps
, ar.hz_locations hl
, apps.hz_cust_accounts hca
, apps.hz_cust_acct_sites_all hcasa
, apps.hz_cust_site_uses_all hcsua
, applsys.fnd_user fu_header
, applsys.fnd_user fu_hdr_upd
, applsys.fnd_user fu_site
, applsys.fnd_user fu_site_upd
ORDER BY hcsua.org_id
, hp.party_name;
HZ_PARTY_SITES: The HZ_PARTY_SITES table links a party (see HZ_PARTIES) and a location
(see HZ_LOCATIONS) and stores location-specific party information. One party can optionally
have one or more party sites. One location can optionally be used by one or more parties.
This party site can then be used for multiple customer accounts within the same party.
HZ_CUST_ACCT_SITES_ALL
HZ_CUST_SITE_USES_ALL
HZ_CUST_CONTACT_POINTS etc.
2. What are Base Tables or Interface Tables for Customer Conversions, Autolockbox, Auto
Invoice?
A) Customer Conversion:
Interface Tables : RA_CUSTOMERS_INTERFACE_ALL, RA_CUSTOMER_PROFILES_INT_ALL,
RA_CONTACT_PHONES_INT_ALL,
RA_CUSTOMER_BANKS_INT_ALL,
RA_CUST_PAY_METHOD_INT_ALL
Base Tables : RA_CUSTOMERS, RA_ADDRESSES, RA_SITE_USES_ALL,
RA_CUSTOMER_PROFILES_ALL, RA_PHONES etc
B) Auto Invoice:
Interface Tables : RA_INTERFACE_LINES_ALL, RA_INTERFACE_DISTRIBUTIONS_ALL
RA_INTERFACE_SALESCREDITS_ALL, RA_INTERFACE_ERRORS_ALL
Base Tables : RA_CUSTOMER_TRX_ALL, RA_CUSTOMER_TRX_LINES_ALL,
RA_CUST_TRX_LINE_GL_DIST_ALL, RA_CUST_TRX_LINE_SALESREPS_ALL,
RA_CUST_TRX_TYPES_ALL
C) AutoLockBox:
Interface Tables : AR_PAYMENTS_INTERFACE_ALL (POPULATED BY IMPORT PROCESS)
Interim tables : AR_INTERIM_CASH_RECEIPTS_ALL (All Populated by Submit Validation)
: AR_INTERIM_CASH_RCPT_LINES_ALL,
AR_INTERIM_POSTING
Base Tables : AR_CASH_RECEIPTS_ALL, AR_RECEIVABLE_APPLICATIONS_ALL,
AR_PAYMENT_SCHEDULES_ALL ( All Populated by post quick cash)
8. What is Autolockbox?
A) Auto lockbox is a service that commercial banks offer corporate customers to enable them
to out source their account receivable payment processing. Auto lockbox can also be used to
transfer receivables from previous accounting systems into current receivables. It eliminates
manual data entry by automatically processing receipts that are sent directly to banks. It
involves three steps
1 Import (Formats data from bank file and populates the Interface Table),
2 Validation(Validates the data and then Populates data into Interim Tables),
3 Post Quick Cash(Applies Receipts and updates Balances in BaseTables).
12. What are the Set up required for Custom Conversion, Autolockbox and Auto Invoice?
A) Autoinvoice program Needs AutoAccounting to be defined prior to its execution.
14. What are Autocash rules?A) Autocash rules are used to determine how to apply the
receipts to the customers outstanding debit items. Autocash Rule Sets are used to determine
the sequence of Autocash rules that Post Quickcash uses to update the customers account
balances.
15. What are Grouping Rules? (Used by Autoinvoice)
A) Grouping rules specify the attributes that must be identical for lines to appear on the same
transaction. After the grouping rules are defined autoinvoice uses them to group revenues and
credit transactions into invoices debit memos, and credit memos.
16. What are Line Ordering Rules? (Used by Autoinvoice)A) Line ordering rules are used to
order transaction lines when grouping the transactions into invoices, debit memos and credit
memos by autoinvoice program. For instance if transactions are being imported from oracle
order management , and an invoice line ordering rule for sales_order _line is created then the
invoice lists the lines in the same order of lines in sales order.
17. In which table you can see the amount due of a customer?
A) AR_PAYMENT_SCHEDULES_ALL
19. What are the available Key Flex Fields in Oracle Receivables?A) Sales Tax Location Flex
field, It’s used for sales tax calculations.
Territory Flex field is used for capturing address information.
AR TO GL LINK IN R12
AR TO GL LINK IN R12( THROUGH XLA) or ( WITH XLA )
AR TO GL LINK IN R12
AR TO GL LINK IN R12( THROUGH XLA) or ( WITH XLA )
AR to GL Query
Provide Set of book id, Period name, AR invoice/Transaction to the following query. It will give
all GL Batch Name, GL Header and Line details along with the Posted status at the line level.
Query:
SELECT gjl.reference_4 AR_Transaction,
gjb.je_batch_id,
gjb.name batch_name,
gjh.je_header_id,
gjh.name Journal_Header_Name,
DECODE (gjh.ACTUAL_FLAG,
'A', 'Actual',
'B', 'Budget',
'E', 'Encumbrance')
Balance_Type,
gjl.subledger_doc_sequence_value Doc_Seq_Value,
gjl.effective_date GL_Date,
gjl.code_combination_id,
gjl.accounted_dr,
gjl.accounted_cr,
gjl.description Description,
DECODE (gjl.status, 'P', 'Posted', 'U',
'Unposted', gjl.status)
Journal_Line_Status
FROM gl_je_headers gjh, gl_je_lines gjl, gl_je_batches gjb
WHERE gjh.je_source = 'Receivables'
AND gjh.je_header_id = gjl.je_header_id
AND gjh.JE_BATCH_ID = gjb.JE_BATCH_ID
AND gjh.JE_HEADER_ID = gjl.JE_HEADER_ID
AND gjh.period_name = gjb.default_period_name
AND gjh.set_of_books_id = &sob_id
AND gjh.period_name = '&Period_Name'
AND gjl.reference_4 = '&AR_trx_number';
Posted by Elangovan Ragavan at 18:09 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query, gl
SELECT rc.customer_number,
rc.CUSTOMER_NAME,
hp.party_id,
hp.party_type,
rc.TAX_REFERENCE,
hca.cust_account_id,
hca.PAYMENT_TERM_ID,
hps.location_id,
hcsu.location,
hcsu.site_use_code,
hcsa.bill_to_flag,
hcsu.GL_ID_REC Receiving_acc_ccid,
hl.address1,
hl.address2,
hl.address3,
hl.city,
hl.state,
hl.country,
hl.postal_code
FROM ra_customers rc,
hz_parties hp,
hz_party_sites hps,
hz_locations hl,
hz_cust_accounts_all hca,
hz_cust_acct_sites_all hcsa,
hz_cust_site_uses_all hcsu
WHERE rc.party_id = hp.party_id
AND hp.party_id = hps.party_id
AND hps.location_id = hl.location_id
AND hp.party_id = hca.party_id
AND hcsa.party_site_id = hps.party_site_id
AND hcsu.cust_acct_site_id = hcsa.cust_acct_site_id
AND hca.cust_account_id = hcsa.cust_account_id
AND rc.customer_number = '&Customer_Number';
Posted by Elangovan Ragavan at 18:07 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
Note:
1. You might miss your invoice document sequence
2. Check with your company policies whether you can delete or not.
=> If the Invoice in 'complete' status, create a Credit Memo against this invoice and nullify the
transaction.
Posted by Elangovan Ragavan at 14:51 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
Oracle R12 Internal Requisition and Internal Sales Order Process Flow.
In this blog I will explain the Process flow and Setup required to create Oracle Order
Management Internal Sales order (ISO) from Internal requisition (IR)
Oracle Purchasing uses Order Import to transfer requisitions for internally sourced
products to Order Management. Once imported, the internal sales orders are processed
similar to regular sales orders.
Note: You can create requisitions (with same number) in two different operating units.
You can partially or fully cancel the line quantities on internal sales orders.
You can make the following attribute changes after an internal sales order has been generated:
Update Scheduled Shipment Date
Decrement order line quantity
Note: If you cancel an internal sales order, order line, or backordered order line that is linked to
an internal requisition, manually cancel the internal requisition. The order cancelProcessing
issues a reminder.
Test Case –
Item – IR Item004
Assign to Inventory Org M1 and M2
Create Requisition with Destination Org M1 and Source Org M2.Create Internal Sales Order in
M2
1# Create Item IR Item4 , with “Purchased Item” as template , in Oracle Inventory Management.
Labels: AR_Query
SELECT RCTLG.AMOUNT,
AC.CUSTOMER_NUMBER,
AC.CUSTOMER_NAME,
RCX.TRX_NUMBER
FROM ra_customer_trx_all rcx,
ar_customers ac,
ra_cust_trx_line_gl_dist_all rctlg,
xla.xla_ae_headers xah,
xla.xla_ae_lines xal,
xla_distribution_links xdl,
gl_code_combinations gcc,
xla.xla_transaction_entities xte,
gl_import_references gir,
gl_je_headers gjh,
gl_je_lines gjl
WHERE rcx.bill_to_customer_id = ac.customer_id(+)
AND rcx.customer_trx_id = rctlg.customer_trx_id
AND xah.ae_header_id = xal.ae_header_id(+)
AND gcc.code_combination_id(+) = xal.code_combination_id
AND rctlg.code_combination_id = xal.code_combination_id
AND xdl.ae_header_id = xah.ae_header_id
AND xdl.ae_line_num = xal.ae_line_num
AND xdl.source_distribution_id_num_1 = rctlg.cust_trx_line_gl_dist_id
AND xte.source_id_int_1 = rcx.customer_trx_id
AND xte.entity_code = 'TRANSACTIONS'
AND rctlg.account_class = 'REV'
AND xte.entity_id = xah.entity_id
and xal.gl_sl_link_id = gir.gl_sl_link_id
and gir.je_header_id = gjl.je_header_id
and gir.je_line_num = gjl.je_line_num
AND GIR.JE_HEADER_ID = GJH.JE_HEADER_ID
AND GJL.JE_HEADER_ID = GJH.JE_HEADER_ID
Labels: AR_Query
AR to GL Link r12
SELECT-----------------------------------------------------------------------
-------------------------------------------------------
-->> SQL1 : je_category =
INV/CM/DM/CB
-----------------------------------------------------------------------------
--------------------------------------------------
-- SL
Fields
gle.NAME ledger_name,
gle.currency_code ledger_currency_code,
gcc.concatenated_segments sla_gl_account,
gcc1.concatenated_segments gl_account,
gps.period_name period_name,
party.party_name party_name,
party.party_number party_number,
cust.account_name account_name,
cust.account_number customer_number,
rct.trx_number,
rct.trx_date,
ctt.NAME trx_type,
DECODE (ctt.TYPE,
'INV', 'Invoices',
NULL)
trx_class,
rct.complete_flag,
rct.invoice_currency_code,
rctgd.amount dist_AMT,
rctgd.acctd_amount dist_ACCTD_AMOUNT,
rctgd.gl_date ar_gl_date,
Rctgd.Gl_Posted_Date Ar_Gl_Posted_Date,
rctgd.account_class ar_line_account_class,
ael.entered_dr sla_line_entered_dr,
ael.entered_cr sla_line_entered_cr,
sla_line_accounted_net,
ael.accounted_dr sla_line_accounted_dr,
ael.accounted_cr sla_line_accounted_cr,
xdl.unrounded_entered_dr sla_dist_entered_dr,
xdl.unrounded_entered_cr sla_dist_entered_cr,
xdl.unrounded_accounted_dr sla_dist_accounted_dr,
xdl.unrounded_accounted_cr sla_dist_accounted_cr,
NVL (xdl.unrounded_accounted_dr, 0)
- NVL (xdl.unrounded_accounted_cr, 0)
sla_dist_accounted_net,
DECODE (rctgd.posting_control_id, -3, 'N', 'Y')
gl_transfer_status -- GL Fields --
Amounts
jl.entered_dr gl_entered_dr,
jl.entered_cr gl_entered_cr,
jl.accounted_dr gl_accounted_dr,
jl.accounted_cr gl_accounted_cr,
gl_net_entered_amt,
gl_net_accounted_amt -- Journal
Info.
jb.NAME je_batch_name,
jb.description je_batch_description,
jh.NAME je_name,
jh.description je_description,
jh.posted_date je_posted_date,
DECODE (
jh.status,
'P',
'Posted',
'U',
'Unposted',
'F',
'K',
'Error10 - Showing unbalanced intercompany journal entry',
'Z',
'Unknown'
je_status,
DECODE (jh.actual_flag,
'A',
'Actual',
'B',
'Budget',
'E',
'Encumbrance')
DECODE (
rctgd.posting_control_id,
-3,
'Not-Transferred-To-SLA',
DECODE (aeh.gl_transfer_status_code,
'Y', 'Transferred-to-GL',
'Not Transferred-to-GL')
reconcile_status,
xdl.accounting_line_code,
xdl.event_class_code,
xdl.event_type_code,
aeh.accounting_date,
aeh.gl_transfer_date,
hou.NAME operating_unit,
--Primary Keys
rct.customer_trx_id,
rctgd.cust_trx_line_gl_dist_id,
ctt.cust_trx_type_id,
gle.ledger_id,
gcc.code_combination_id sla_code_combination_id,
gcc1.code_combination_id gl_code_combination_id,
party.party_id,
cust.cust_account_id,
aeh.ae_header_id,
ael.ae_line_num,
jl.je_line_num,
jh.je_header_id,
jb.je_batch_id,
jes.je_source_name,
xdl.event_id,
jec.je_category_name,
gps.start_date,
gps.end_date,
hou.organization_id org_id,
--Primary Keys
gcc1.code_combination_id,
aeh.application_id,
xdl.temp_line_num,
xdl.ref_ae_header_id,
gps.set_of_books_id,
hou.organization_id,
GCC.SEGMENT2 GCC#50353#ACCOUNT,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT2,
'MAS_GL_COA_ACCOUNT')
GCC#50353#ACCOUNT#DESCR,
GCC.SEGMENT1 GCC#50353#COMPANY,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT1,
'MAS_GL_COA_COMPANY')
GCC#50353#COMPANY#DESCR,
GCC.SEGMENT6 GCC#50353#DEPARTMENT,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT6,
'MAS_GL_COA_DEPARTMENT')
GCC#50353#DEPARTMENT#DESCR,
GCC.SEGMENT8 GCC#50353#FUTURE,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT8,
'MAS_GL_COA_FUTURE')
GCC#50353#FUTURE#DESCR,
GCC.SEGMENT7 GCC#50353#IC,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT7,
'MAS_GL_COA_COMPANY')
GCC#50353#IC#DESCR,
GCC.SEGMENT4 GCC#50353#LOB,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT4,
'MAS_GL_COA_LOB')
GCC#50353#LOB#DESCR,
GCC.SEGMENT5 GCC#50353#LOCATIONS,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT5,
'MAS_GL_COA_LOCATION')
GCC#50353#LOCATIONS#DESCR,
GCC.SEGMENT3 GCC#50353#QUALIFIER,
xxeis.eis_rs_fin_utility.decode_vset (GCC.SEGMENT3,
'MAS_GL_COA_ACCT_QUAL')
GCC#50353#QUALIFIER#DESCR
ra_cust_trx_line_gl_dist rctgd,
ra_cust_trx_types ctt,
gl_ledgers gle,
gl_code_combinations_kfv gcc,
gl_code_combinations_kfv gcc1,
hz_parties party,
hz_cust_accounts cust,
xla_ae_headers aeh,
xla_ae_lines ael,
xla_distribution_links xdl,
gl_import_references jir,
gl_je_batches jb,
gl_je_headers jh,
gl_je_lines jl,
gl_je_sources jes,
gl_je_categories jec,
gl_period_statuses gps,
hr_operating_units hou
AND rctgd.cust_trx_line_gl_dist_id =
xdl.source_distribution_id_num_1(+)
AND xdl.source_distribution_type(+) =
'RA_CUST_TRX_LINE_GL_DIST_ALL'
-- Gl Joins
AR to GL link
Chargeback – This is used for an arrangement with the customer for regoniation of
payment terms
Freight Account – When you have freight line, system will pick this account
Clearing Account –
Unbilled Receivable Account –
Unearned Revenue Account – This is used when you had booked your revenue in
advance.
ACCOUNTING RULES -
N > Receivables > Setup > Accounting Rules
This is used to distribute your revenue in different periods. This is used for recognizing
your revenue.
AUTO ACCOIUNTING –
N > Receivables > Setup > Transactions > AutoAccounting
This is used to control your accounting code combination to br derived based on
transaction type, sales person, memo line, Customer Site
It is mandetory to setup AuAccounting for Receivables and Revenue
PAYMENT TERM –
N > Receivables > Setup > Transactions > Payment Term
TRANSACTION SOURCE –
N > Receivables > Setup > Transactions > Sources
This is the source from which transactions are coming into the Oracel Receivables
SYSTEM OPTIPONS -
N > Receivables > Setup > System > System Options
Day per posting cycle???
Allow payment of unrelated transactions??
Sptil Amount?
MEMO LINE –
N > Receivables > Setup > Transactions > Memo Lines
GROUPING RULES -
N > Receivables > Setup > Transactions > AutoIndoice > Grouping Rules
TRANSACTIONS –
N > Receivables > Transactions > Transactions
COPY TRANSACTION –
N > Receivables > Transactions > Transactions
Query the existing transaction, goto Actions > Copy To
CREATING CM –
Option 1
Option 2
N > Receivables > Transactions > Credit Transactions
APPLYING CM TO INVOICE
N > Receivables > Transactions > Transactions
Create a CM. Complete it. Goto Actions > Applications
and select the Invoice against with you want to apply CM.
PROFILE CLASSES –
N > Receivables > Customers > Profile Classes
CUSTOMER –
N > Receivables > Customers > Customers
Posted by Elangovan Ragavan at 12:11 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
Setup: -
View Accounting: -
Receivable Activities: -
It shows all details of discount given by customer
1. Earned Discount
2. Unearned Discount
Earned Discount: -
Nav: – Setup – Receipts – Receivable Activity
Table Name: AR_RECEIVABLES_TRX
Unearned Discount: -
Nav: - Setup – Receipts – Receivable Activity
Table Name: AR_RECEIVABLES_TRX
Invoice Rules: -
Invoicing rule determined the period in which the receivable will be recognized.
These are two types
Bills in Advance
Bills in Arrears
Accounting Rules: -
Accounting Rule determine the period in which revenue will be recognized.
These are two types
Fixed
Variable
Bills in Advance: -
Nav - Setup – Transactions – Accounting Rules
Table Name: RA_RULE_SCHEDULES
Transaction for Bills in Advance: -
Nav: – Transactions – Transactions
After Complete: -
View Accounts: -
For these transactions we run a program for to view the accounting
Nav: – Control – Requests – Run
Tools – View Account
Table Name: XLA_AEL_SL_V
Bills in Arrears: -
Nav: – Setup – Transactions – Accounting Rules
Table Name: RA_RULE_SCHEDULES
Transaction for Bills in Arrears: -
Nav: – Transactions – Transactions
Before save these line item open periods in Control – Accounting – open close
Tools – View Account
Credit Memo: -
Setup: -
1. Create Credit Memo Transaction Type
Nav: - Setup – Transactions – Transaction Type
1. Enter Invoice
Nav: – Transactions – Transactions
1. Enter Credit Memo Transaction
Nav: – Transactions – Transactions Summary
Debit Memo: -
1.Create Debit Memo Transaction Type
Nav: - Setup – Transactions – Transaction Type
2.Create Debit Memo Transaction Source
Nav: – Setup – Transactions – Source
3.Enter Invoice
Nav: - Transactions – Transactions
4.Enter Debit Memo
Nav: - Transactions – Transactions
View Debit Memo: -
Nav: - Collections – Customer Accounts
Deposit and Guarantee: -
Deposit and Guarantee are called commitment Transactions. For these two we can’t
adjust freight and Tax
Setup: -
1. Create Transaction Type
Nav: - Setup – Transactions – Transaction Type
1. Create Transaction Source
Nav: – Setup – Transactions – Source
1. Enter Deposit Transactions
Nav: – Transactions – Transactions
1. Enter Invoice
Nav: – Transactions – Transactions
Receipt Work Bench: -
Setup: -
1. Setup Receivable Activities for earned and unearned Accounts.
2. Setup Bank
3. Setup Receipt Class
4. Setup Receipt Source
Receipts are two types
1.Income from Operations
2. Other Income (Miscellaneous Receipts)
We can create Receipts in two ways
1.Manual
2. Automatic
Bank: -
Setup: -
SELECT hp.party_name
, hp.party_number
, hca.account_number
, hca.cust_account_id
, hp.party_id
, hps.party_site_id
, hps.location_id
, hl.address1
, hl.address2
, hl.address3
, hl.city
, hl.state
, hl.country
, hl.postal_code
, hcsu.site_use_code
, hcsu.site_use_id
, hcsa.bill_to_flag
FROM hz_parties hp
, hz_party_sites hps
, hz_locations hl
, hz_cust_accounts_all hca
, hz_cust_acct_sites_all hcsa
, hz_cust_site_uses_all hcsu
WHERE hp.party_id = hps.party_id
AND hps.location_id = hl.location_id
AND hp.party_id = hca.party_id
AND hcsa.party_site_id = hps.party_site_id
AND hcsu.cust_acct_site_id = hcsa.cust_acct_site_id
AND hca.cust_account_id = hcsa.cust_account_id
AND hca.account_number = '';
Note:
1. You might miss your invoice document sequence
2. Check with your company policies whether you can delete or not.
=> If the Invoice in 'complete' status, create a Credit Memo against this invoice and nullify the
transaction.
Posted by Elangovan Ragavan at 20:22 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
TUESDAY, 8 MAY 2012
Query to fetch the detail info about a particular customer’s open invoices
SELECT hp.party_name
,hc.cust_account_id
,hc.account_number customer_number
,amount_due_remaining amount_due_remaining
,aps.amount_due_original amount_due_original
,ra.trx_number
FROM ra_customer_trx_all ra,
ra_customer_trx_lines_all rl,
ar_payment_schedules_all aps,
ra_cust_trx_types_all rt,
hz_cust_accounts hc,
hz_parties hp,
hz_cust_acct_sites_all hcasa_bill,
hz_cust_site_uses_all hcsua_bill,
hz_party_sites hps_bill,
ra_cust_trx_line_gl_dist_all rct
WHERE ra.customer_trx_id = rl.customer_trx_id
AND ra.customer_trx_id = aps.customer_trx_id
AND ra.org_id = aps.org_id
AND rct.customer_trx_id = aps.customer_trx_id
AND rct.customer_trx_id = ra.customer_trx_id
AND rct.customer_trx_id = rl.customer_trx_id
AND rct.customer_trx_line_id = rl.customer_trx_line_id
AND ra.complete_flag = 'Y'
AND rl.line_type IN ('FREIGHT', 'LINE')
AND ra.cust_trx_type_id = rt.cust_trx_type_id
AND ra.bill_to_customer_id = hc.cust_account_id
AND hc.status = 'A'
AND hp.party_id = hc.party_id
AND hcasa_bill.cust_account_id = ra.bill_to_customer_id
AND hcasa_bill.cust_acct_site_id = hcsua_bill.cust_acct_site_id
AND hcsua_bill.site_use_code = 'BILL_TO'
AND hcsua_bill.site_use_id = ra.bill_to_site_use_id
AND hps_bill.party_site_id = hcasa_bill.party_site_id
AND hcasa_bill.status = 'A'
AND hcsua_bill.status = 'A'
AND aps.amount_due_remaining <> 0
AND aps.status = 'OP'
AND hc.cust_account_id =?;
Posted by Elangovan Ragavan at 16:59 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
AR Salce Invoice
Sales invoice
Receipt
SELECT ACR.RECEIPT_NUMBER
,ARM.NAME RECEIPT_METHOD
,ACR.RECEIPT_DATE
,ACRH.GL_DATE
,ABB.BANK_NAME
,ABA.BANK_ACCOUNT_NUM
,HP.PARTY_NAME CUSTOMER_NAME
FROM AR_RECEIPT_METHODS ARM
,AR_CASH_RECEIPTS_ALL ACR
,AR_CASH_RECEIPT_HISTORY_ALL ACRH
,AP_BANK_ACCOUNTS ABA
,AP_BANK_BRANCHES ABB
,HZ_PARTIES HP
,HZ_CUST_ACCOUNTS HCA
WHERE ARM.RECEIPT_METHOD_ID=ACR.RECEIPT_METHOD_ID
AND ACR.CASH_RECEIPT_ID=ACRH.CASH_RECEIPT_ID
AND ACR.REMITTANCE_BANK_ACCOUNT_ID=ABA.BANK_ACCOUNT_ID(+)
AND ABA.BANK_ACCOUNT_ID=ABB.BANK_BRANCH_ID(+)
AND ACR.PAY_FROM_CUSTOMER=HCA.CUST_ACCOUNT_ID
AND HCA.PARTY_ID=HP.PARTY_ID
AR INVOICE
AR INVOICE QUERY
exec mo_global.init('AR');
/* Formatted on 2011/12/26 23:23 (Formatter Plus v4.8.8) */
SELECT rct.org_id, hou.NAME ou_name, rct.customer_trx_id, rct.trx_number,
rct.old_trx_number, TRUNC (rct.trx_date) trx_date, ctl.line_number,
ctl.customer_trx_line_id, lgd.amount, lgd.account_class,
lgd.acctd_amount, al_class.meaning, lgd.al_class_meaning, gcc.concatenated_segments,
ffv.description acct_desc, rctt.TYPE, rctt.NAME trx_type_name,
rctt.description, rctt.post_to_gl, rctt.accounting_affect_flag,
lgd.gl_date, rct.complete_flag, rctt.status, gcc.segment3 account_no,
ffv.description account_des, rctt.end_date
FROM ra_cust_trx_line_gl_dist_v lgd,
gl_code_combinations_kfv gcc,
fnd_flex_values_vl ffv,
ra_customer_trx_all rct,
apps.ra_cust_trx_types_all rctt,
hr_operating_units hou,
ra_customer_trx_lines_all ctl,
ra_customer_trx_lines_all ctl_line,
ar_lookups al_class
WHERE lgd.code_combination_id = gcc.code_combination_id
AND ffv.flex_value = gcc.segment3
AND rct.customer_trx_id = lgd.customer_trx_id
AND rctt.cust_trx_type_id(+) = rct.cust_trx_type_id
AND hou.organization_id(+) = rct.org_id
AND lgd.customer_trx_line_id = ctl.customer_trx_line_id(+)
AND ctl.link_to_cust_trx_line_id = ctl_line.customer_trx_line_id(+)
AND al_class.lookup_type = 'AUTOGL_TYPE'
AND al_class.lookup_code = lgd.account_class
AND TRUNC (rct.trx_date) BETWEEN :p_from_date AND :p_to_date
--AND rct.customer_trx_id = 1082
order by rct.org_id, hou.NAME , rct.customer_trx_ID
R12 Customer
/* Formatted on 18-08-2011 20:52:09 (QP5 v5.115.810.9015) */
SELECT hp.party_name,
hp.party_number,
hca.account_number,
hca.cust_account_id,
hp.party_id,
hps.party_site_id,
hps.location_id,
hl.address1,
hl.address2,
hl.address3,
hl.city,
hl.state,
hl.country,
hl.postal_code,
hcsu.site_use_code,
hcsu.site_use_id,
hcsa.bill_to_flag
FROM hz_parties hp,
hz_party_sites hps,
hz_locations hl,
hz_cust_accounts_all hca,
hz_cust_acct_sites_all hcsa,
hz_cust_site_uses_all hcsu
WHERE Qhp.party_id = hps.party_id
AND hps.location_id = hl.location_id
AND hp.party_id = hca.party_id
AND hcsa.party_site_id = hps.party_site_id
AND hcsu.cust_acct_site_id = hcsa.cust_acct_site_id
AND hca.cust_account_id = hcsa.cust_account_id
Posted by Elangovan Ragavan at 16:13 1 comment:
Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest
Labels: AR_Query
AR Invoice Tax
/* Formatted on 09-08-2011 16:32:56 (QP5 v5.115.810.9015) */
SELECT DISTINCT
(SELECT name
FROM hr_operating_units
WHERE organization_id = rctl.org_id AND set_of_books_id = 5)
Operating_unit,
jai.customer_trx_id T_TAX_HEADER_ID,
jai.CUSTOMER_TRX_ID,
jai.trx_number T_TRX_NUMBER,
jline.line_number T_LINE_NUMBER,
taxline.tax_line_no T_TAX_LINE_NO,
tax.tax_name T_TAX_NAME,
tax.TAX_TYPE ,
taxline.PRECEDENCE_1,
taxline.PRECEDENCE_2,
taxline.PRECEDENCE_3,
taxline.PRECEDENCE_4,
taxline.PRECEDENCE_5,
taxline.tax_amount T_AMOUNT
FROM ra_customer_trx_lines_all rctl,
ra_cust_trx_line_gl_dist_all rct,
ra_customer_trx_all rcta,
ja_in_ra_customer_trx jai,
ja_in_ra_customer_trx_lines jline,
ja_in_ra_cust_trx_tax_lines taxline,
ja_in_tax_codes tax
WHERE rctl.customer_trx_line_id = rct.customer_trx_line_id
AND rct.customer_trx_id = rcta.customer_trx_id
AND rcta.customer_trx_id = jai.customer_trx_id(+)
AND jai.customer_trx_id = jline.customer_trx_id
AND taxline.link_to_cust_trx_line_id = rctl.customer_trx_line_id
AND taxline.tax_id = tax.tax_id
AND TRUNC (rcta.TRX_DATE) BETWEEN '01-AUG-2011' AND '13-AUG-2011'
--AND rctl.LINE_TYPE = 'TAX'
AND rcta.SET_OF_BOOKS_ID = 5