select a.ITEM_DESCRIPTION,a.*
from ap_invoice_lines_all a
select * from mtl_system_items_b
where description like '%MILK%'
AND ORGANIZATION_ID=103
AND INVENTORY_ITEM_ID =2135
2135 -- MILK (COW)
---------------------PO---------------------------------------------------------
SELECT * FROM PO_HEADERS_ALL
WHERE PO_HEADER_ID=2017
SELECT *FROM PO_LINES_ALL
WHERE ITEM_ID IN ( select INVENTORY_ITEM_ID from mtl_system_items_b
where description like '%MILK%'
AND ORGANIZATION_ID=103)
AND ITEM_ID=2135
AND PO_HEADER_ID=2017
-------------------Receipts-----------------------------------------------------
SELECT * FROM RCV_SHIPMENT_LINES R
WHERE 1=1--ORGANIZATION_ID=103
AND ITEM_ID=2135
AND PO_HEADER_ID=2017
AND PO_LINE_ID=2034
SELECT TRANSACTION_ID,a.* FROM RCV_TRANSACTIONS a
WHERE ORGANIZATION_ID=103
--AND ITEM_ID=2135
AND PO_HEADER_ID=2017
AND SHIPMENT_LINE_ID = 5046;
--------------------MTL ACCOUNTING----------------------------------------------
select TRANSACTION_ID,a.* from mtl_material_transactions a
where a.RCV_TRANSACTION_ID in (2060,2062,2063);
select * from mtl_transaction_accounts
where TRANSACTION_ID =89463
--------------AP INV------------------------------------------------------------
select * from ap_invoices_all
where invoice_id = 35029
select * from ap_invoice_distributions_all aid
where (invoice_id ,aid.INVOICE_LINE_NUMBER) in (
select invoice_id ,ail.LINE_NUMBER from ap_invoice_lines_all ail
where po_header_id=2017
AND PO_LINE_ID=2034)
--------------Sub Ledger Inv ---------------------------------------------------
select *from xla.XLA_TRANSACTION_ENTITIES xte
where 1=1
AND xte.entity_code = 'AP_INVOICES'
and SOURCE_ID_INT_1=35029 --invoice id--
select * from xla_ae_headers
where entity_id=60015
select * from xla_ae_lines
where ae_header_id=71836
-----------------------INV GL---------------------------------------------------
select * from gl_import_references
where gl_sl_link_id in (
select gl_sl_link_id from xla_ae_lines
where ae_header_id=71836 )
select (select gl_flexfields_pkg.get_description_sql (:char_of_account_id, 5, gcc.segment5) FROM gl_code_combinations gcc
where gcc.CODE_COMBINATION_ID =gil.CODE_COMBINATION_ID ) acc_desc
,gil.* from gl_je_lines gil
where je_header_id in (54034)
-------------------AP Pay------------------
select * from ap_invoice_payments_all
where invoice_id=35029
select * from ap_checks_all
where check_id = 33542
--------------Sub Ledger Pay ---------------------------------------------------
select *from xla.XLA_TRANSACTION_ENTITIES xte
where 1=1
AND xte.entity_code = 'AP_PAYMENTS'
and SOURCE_ID_INT_1=33542 --check id--
select * from xla_ae_headers
where entity_id=60079
select gl_sl_link_id,a.* from xla_ae_lines a
where ae_header_id=71837
-----------------------Payments GL---------------------------------------------------
select * from gl_import_references
where gl_sl_link_id in (
select gl_sl_link_id from xla_ae_lines
where ae_header_id in (71837 ,71836))
select (select gl_flexfields_pkg.get_description_sql (:char_of_account_id, 5, gcc.segment5) FROM gl_code_combinations gcc
where gcc.CODE_COMBINATION_ID =gil.CODE_COMBINATION_ID ) acc_desc
,gil.* from gl_je_lines gil
where je_header_id in (54036)
--------------------------------------------------------------------------------
select * from gl_code_combinations_kfv
where code_combination_id in (2012,3001)
select * from ap_suppliers
where vendor_id=2231
1)PO
2)Receipt
a) MTL transaction--->
Inventory Valuation dr
Receiving Inspection cr
3)AP INV DIST(standard Invoice)---
INVENTORY AP ACCRUAL
a) subledger accounting-->
1) Accural A/C Dr
To Liability A/C Cr
4) GL Lines --->
liability ac Dr
Cash Clearing Cr