<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: JA India - RG 23 D - draft -->
 <REPORTS_ROW>
  <GUID>82288223F0AC3869E053B46B63588994</GUID>
  <SQL_TEXT>SELECT        &apos;1&apos; query, a.register_id, a.fin_year,a.slno, a.transaction_type,
              a.comm_invoice_no||&apos; &apos;||a.receipt_boe_num||&apos; &apos;||a.comm_invoice_date  COL2,
               SUBSTR(b.vendor_name||&apos; &apos;||c.address_line1||&apos; &apos;||address_line2||&apos; &apos;||address_line3||&apos; &apos;||d.excise_duty_range||&apos;&apos;||d.excise_duty_division||&apos; &apos;||d.excise_duty_comm, 1,255) COL3,
               a.quantity_received QTY,
               a.excise_duty_rate,
               a.rate_per_unit COL6,
               ROUND(a.duty_amount) COL7,
               NULL COL8,
               0 COL11,
               0 COL12,
               0 COL13,
              a.closing_balance_qty,
              a.remarks,
              a.consignee,
              jain_mtl.item_tariff,
              jain_mtl.item_folio,
              mtl.segment1,
              org.organization_name,
              loc.description loc_desc,
              loc.address_line_1,
              loc.address_line_2,
              loc.address_line_3,
              a.organization_id,
              a.Manufacturer_name  ,
              a.Manufacturer_Address ,
              a.Manufacturer_Rate_Amt_per_unit ,
              a.Qty_received_from_Manufacturer,
              a.Tot_amt_paid_to_Manufacturer,
              a.qty_to_adjust receipt_remaining_qty,
              a.reference_line_id, 
	JA_JAIN23D_XMLP_PKG.cf_sob_nameformula(a.organization_id) CF_sob_name, 
	JA_JAIN23D_XMLP_PKG.cf_col9formula(a.register_id, a.transaction_type, SUBSTR ( b.vendor_name || &apos; &apos; || c.address_line1 || &apos; &apos; || address_line2 || &apos; &apos; || address_line3 || &apos; &apos; || d.excise_duty_range || &apos; &apos; || d.excise_duty_division || &apos; &apos; || d.excise_duty_comm , 1 , 255 ), &apos;1&apos;) CF_col9, 
	JA_JAIN23D_XMLP_PKG.cf_col10formula(a.register_id, a.transaction_type, SUBSTR ( b.vendor_name || &apos; &apos; || c.address_line1 || &apos; &apos; || address_line2 || &apos; &apos; || address_line3 || &apos; &apos; || d.excise_duty_range || &apos; &apos; || d.excise_duty_division || &apos; &apos; || d.excise_duty_comm , 1 , 255 )) CF_col10, 
	JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;1&apos;, SUBSTR ( b.vendor_name || &apos; &apos; || c.address_line1 || &apos; &apos; || address_line2 || &apos; &apos; || address_line3 || &apos; &apos; || d.excise_duty_range || &apos; &apos; || d.excise_duty_division || &apos; &apos; || d.excise_duty_comm , 1 , 255 )) CF_2, 
	JA_JAIN23D_XMLP_PKG.cf_matched_shipped_qtyformula(&apos;1&apos;, a.register_id, a.qty_to_adjust, a.transaction_type) CF_Matched_Shipped_qty, 
	JA_JAIN23D_XMLP_PKG.cf_manu_nameformula(a.register_id, JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;1&apos;, SUBSTR ( b.vendor_name || &apos; &apos; || c.address_line1 || &apos; &apos; || address_line2 || &apos; &apos; || address_line3 || &apos; &apos; || d.excise_duty_range || &apos; &apos; || d.excise_duty_division || &apos; &apos; || d.excise_duty_comm , 1 , 255 )), a.quantity_received, a.excise_duty_rate, a.rate_per_unit, ROUND ( a.duty_amount ), a.comm_invoice_no || &apos; &apos; || a.receipt_boe_num || &apos; &apos; || a.comm_invoice_date, a.Manufacturer_Address, a.Qty_received_from_Manufacturer, a.Manufacturer_Rate_Amt_per_unit, a.Tot_amt_paid_to_Manufacturer, a.Manufacturer_name) CF_manu_name, 
	JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id) CF_ISSUE_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id),0) CF_ISSUE_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id) CF_ISSUE_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id),0) CF_ISSUE_SH_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id) CF_RECEIPT_CESS_AMT, 
	nvl(JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id),0) CF_RECEIPT_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id) CF_RECEIPT_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id),0) CF_RECEIPT_SH_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.CP_SUPPLIER_TYPE_p CP_SUPPLIER_TYPE,
	JA_JAIN23D_XMLP_PKG.CP_manu_address_p CP_manu_address,
	JA_JAIN23D_XMLP_PKG.CP_qty_received_from_manu_p CP_qty_received_from_manu,
	JA_JAIN23D_XMLP_PKG.CP_manu_rate_amt_per_unit_p CP_manu_rate_amt_per_unit,
	JA_JAIN23D_XMLP_PKG.CP_tot_amt_paid_to_manu_p CP_tot_amt_paid_to_manu
FROM          JAI_CMN_RG_23D_TRXS a,
               po_vendors b,
               po_vendor_sites_all c,
               JAI_CMN_VENDOR_SITES d,
               mtl_system_items MTL,
               JAI_INV_ITM_SETUPS JAIN_MTL,
               org_organization_definitions org,
              hr_locations loc
WHERE a.vendor_id = b.vendor_id
AND       a.vendor_id = c.vendor_id
AND      a.vendor_site_id =  c.vendor_site_id
AND     a.vendor_id =  d.vendor_id
AND       a.vendor_site_id = d.vendor_site_id
AND       a.organization_id = mtl.organization_id
AND       a.inventory_item_id = mtl.inventory_item_id
AND       NVL(mtl.enabled_flag, &apos;Y&apos;)   = &apos;Y&apos;
AND       a.organization_id = jain_mtl.organization_id
AND       a.inventory_item_id = jain_mtl.inventory_item_id
AND       a.organization_id = org.organization_id
AND       a.location_id = loc.location_id
AND       NVL(org.operating_unit, 0) = NVL(c.org_id, 0)
AND       a.transaction_type IN (&apos;R&apos;, &apos;MR&apos;, &apos;CR&apos;, &apos;MCR&apos;)             
AND       a.inventory_item_id =NVL(:p_inventory_item_id, a.inventory_item_id)
AND       a.organization_id = NVL(:p_organization_id, a.organization_id)
AND       a.location_id = NVL(:p_location_id, a.location_id)
AND       TRUNC(a.creation_date) BETWEEN NVL(TRUNC(:cp_trn_from_date), TRUNC(a.creation_date)) AND NVL(TRUNC(:cp_trn_to_date), TRUNC(a.creation_date))
AND        a.vendor_id &gt; 0
UNION
SELECT DISTINCT &apos;2&apos; query, a.register_id, a.fin_year,a.slno,  a.transaction_type,
              NULL COL2,
              SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255) COL3,
              0 QTY,
              a.excise_duty_rate,
              a.rate_per_unit COL6,
              0 COL7,
              a.comm_invoice_no||&apos; &apos;||a.comm_invoice_date COL8,
              DECODE(a.transaction_type, &apos;MI&apos;, a.quantity_issued,&apos;MCR&apos;,a.oth_receipt_quantity,NULL) COL11,
              DECODE(a.transaction_type, &apos;MI&apos;, a.rate_per_unit, NULL) COL12,
              ROUND(DECODE(a.transaction_type, &apos;I&apos;, nvl(a.duty_amount,a.rate_per_unit * a.QUANTITY_ISSUED), &apos;MI&apos;, a.duty_amount, NULL)) COL13,
              a.closing_balance_qty,
              a.remarks,
              a.consignee,
              jain_mtl.item_tariff,
              jain_mtl.item_folio,
              mtl.segment1,
              org.organization_name,
              loc.description loc_desc,
              loc.address_line_1,
              loc.address_line_2,
              loc.address_line_3,
              a.organization_id,
              a.Manufacturer_name,
              a.Manufacturer_Address ,
              a.Manufacturer_Rate_Amt_per_unit ,
              a.Qty_received_from_Manufacturer,
              a.Tot_amt_paid_to_Manufacturer,
              a.qty_to_adjust receipt_remaining_qty,
              a.reference_line_id, 
	JA_JAIN23D_XMLP_PKG.cf_sob_nameformula(a.organization_id) CF_sob_name, 
	JA_JAIN23D_XMLP_PKG.cf_col9formula(a.register_id, a.transaction_type, SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255), &apos;2&apos;) CF_col9, 
	JA_JAIN23D_XMLP_PKG.cf_col10formula(a.register_id, a.transaction_type,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)) CF_col10, 
	JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;2&apos;,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)) CF_2, 
	JA_JAIN23D_XMLP_PKG.cf_matched_shipped_qtyformula(&apos;2&apos;, a.register_id, a.qty_to_adjust, a.transaction_type) CF_Matched_Shipped_qty, 
    JA_JAIN23D_XMLP_PKG.cf_manu_nameformula(a.register_id, JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;2&apos;,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)), 0, a.excise_duty_rate, a.rate_per_unit, 0,NULL, a.Manufacturer_Address, a.Qty_received_from_Manufacturer, a.Manufacturer_Rate_Amt_per_unit, a.Tot_amt_paid_to_Manufacturer, a.Manufacturer_name) CF_manu_name, 
	JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id) CF_ISSUE_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id),0) CF_ISSUE_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id) CF_ISSUE_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id),0) CF_ISSUE_SH_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id) CF_RECEIPT_CESS_AMT, 
	nvl(JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id),0) CF_RECEIPT_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id) CF_RECEIPT_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id),0) CF_RECEIPT_SH_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.CP_SUPPLIER_TYPE_p CP_SUPPLIER_TYPE,
	JA_JAIN23D_XMLP_PKG.CP_manu_address_p CP_manu_address,
	JA_JAIN23D_XMLP_PKG.CP_qty_received_from_manu_p CP_qty_received_from_manu,
	JA_JAIN23D_XMLP_PKG.CP_manu_rate_amt_per_unit_p CP_manu_rate_amt_per_unit,
	JA_JAIN23D_XMLP_PKG.CP_tot_amt_paid_to_manu_p CP_tot_amt_paid_to_manu
FROM          JAI_CMN_RG_23D_TRXS a,
              hz_parties e, hz_cust_accounts hzca,
              JAI_CMN_CUS_ADDRESSES f,
              hz_locations g, hz_party_sites hzps, hz_cust_acct_sites_all hzcas,
              mtl_system_items MTL,
              JAI_INV_ITM_SETUPS JAIN_MTL,
              org_organization_definitions org,
              hr_locations loc,
              hz_cust_site_uses_all h
WHERE     a.customer_id =   hzca.cust_account_id
AND       hzca.party_id =   e.party_id
AND       a.customer_id =   hzcas.cust_account_id
AND       a.customer_id =   f.customer_id
AND       a.organization_id = mtl.organization_id
AND       hzcas.cust_acct_site_id = h.cust_acct_site_id
AND       hzps.party_site_id = hzcas.party_site_id
AND       g.location_id  = hzps.location_id
AND       h.site_use_id =   a.ship_to_site_id
AND       f.address_id = hzcas.cust_acct_site_id
AND       a.inventory_item_id = mtl.inventory_item_id
AND       NVL(mtl.enabled_flag, &apos;Y&apos;)   = &apos;Y&apos;
AND       a.organization_id = jain_mtl.organization_id
AND       a.inventory_item_id = jain_mtl.inventory_item_id
AND       a.organization_id = org.organization_id
AND       a.location_id = loc.location_id
AND       NVL(org.operating_unit, 0) = NVL(hzcas.org_id, 0)
AND       a.transaction_type  = &apos;MI&apos;			
AND       NVL(A.CUSTOMER_ID,0) &gt; 0
AND       a.inventory_item_id = NVL(:p_inventory_item_id, a.inventory_item_id)
AND       a.organization_id = NVL(:p_organization_id, a.organization_id)
AND       a.location_id = NVL(:p_location_id, a.location_id)
AND       TRUNC(a.creation_date) BETWEEN NVL(TRUNC(:cp_trn_from_date), TRUNC(a.creation_date)) AND NVL(TRUNC(:cp_trn_to_date), TRUNC(a.creation_date))
UNION
SELECT DISTINCT &apos;3&apos; query, a.register_id, a.fin_year, a.slno,  a.transaction_type,
              NULL COL2,
              SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255) COL3,
              0 QTY,
              a.excise_duty_rate,
              a.rate_per_unit COL6,
              0 COL7,
              a.comm_invoice_no||&apos; &apos;||a.comm_invoice_date COL8,
              group_line.quantity_issued COL11,
              a.rate_per_unit   COL12,
              ROUND( nvl(group_line.duty_amount, group_line.duty_amt_alternative) ) COL13,
              a.closing_balance_qty,
              a.remarks,
              a.consignee,
              jain_mtl.item_tariff,
              jain_mtl.item_folio,
              mtl.segment1,
              org.organization_name,
              loc.description loc_desc,
              loc.address_line_1,
              loc.address_line_2,
              loc.address_line_3,
              a.organization_id,
              a.Manufacturer_name,
              a.Manufacturer_Address ,
              a.Manufacturer_Rate_Amt_per_unit ,
              a.Qty_received_from_Manufacturer,
              a.Tot_amt_paid_to_Manufacturer,
              a.qty_to_adjust receipt_remaining_qty,
              a.reference_line_id, 
	JA_JAIN23D_XMLP_PKG.cf_sob_nameformula(a.organization_id) CF_sob_name, 
	JA_JAIN23D_XMLP_PKG.cf_col9formula(a.register_id, a.transaction_type,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255), &apos;3&apos;) CF_col9,
	JA_JAIN23D_XMLP_PKG.cf_col10formula(a.register_id, a.transaction_type,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)) CF_col10, 
	JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;3&apos;,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)) CF_2, 
	JA_JAIN23D_XMLP_PKG.cf_matched_shipped_qtyformula(&apos;3&apos;, a.register_id, a.qty_to_adjust, a.transaction_type) CF_Matched_Shipped_qty, 
	JA_JAIN23D_XMLP_PKG.cf_manu_nameformula(a.register_id, JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;3&apos;,SUBSTR(e.party_name||&apos; &apos;||g.address1||&apos; &apos;||g.address2||&apos; &apos;||g.address3||&apos; &apos;||g.address4||&apos; &apos;||g.city||&apos; &apos;||g.province||&apos; &apos;||g.country||&apos; &apos;||f.excise_duty_range||&apos; &apos;||f.excise_duty_division||&apos; &apos;||f.excise_duty_comm,1,255)), 0, a.excise_duty_rate, a.rate_per_unit,0, NULL, a.Manufacturer_Address, a.Qty_received_from_Manufacturer, a.Manufacturer_Rate_Amt_per_unit, a.Tot_amt_paid_to_Manufacturer, a.Manufacturer_name) CF_manu_name, 
	JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id) CF_ISSUE_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id),0) CF_ISSUE_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id) CF_ISSUE_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id),0) CF_ISSUE_SH_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id) CF_RECEIPT_CESS_AMT, 
	nvl(JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id),0) CF_RECEIPT_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id) CF_RECEIPT_SH_CESS_AMT,
	NVL(JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id),0) CF_RECEIPT_SH_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.CP_SUPPLIER_TYPE_p CP_SUPPLIER_TYPE,
	JA_JAIN23D_XMLP_PKG.CP_manu_address_p CP_manu_address,
	JA_JAIN23D_XMLP_PKG.CP_qty_received_from_manu_p CP_qty_received_from_manu,
	JA_JAIN23D_XMLP_PKG.CP_manu_rate_amt_per_unit_p CP_manu_rate_amt_per_unit,
	JA_JAIN23D_XMLP_PKG.CP_tot_amt_paid_to_manu_p CP_tot_amt_paid_to_manu
FROM     JAI_CMN_RG_23D_TRXS a,
	( select max(register_id) register_id, sum(s.quantity_issued) quantity_issued,
			sum(s.duty_amount) duty_amount, sum(s.rate_per_unit * s.quantity_issued) duty_amt_alternative
		FROM JAI_CMN_RG_23D_TRXS s
		WHERE s.transaction_type = &apos;I&apos;
		AND reference_line_id IS NOT NULL
		GROUP BY s.organization_id, s.location_id, s.inventory_item_id, s.comm_invoice_no, s.fin_year
	)  group_line,
               hz_parties e, hz_cust_accounts hzca,
               JAI_CMN_CUS_ADDRESSES f,
               hz_locations g, hz_party_sites hzps, hz_cust_acct_sites_all hzcas,
               mtl_system_items MTL,
               JAI_INV_ITM_SETUPS JAIN_MTL,
               org_organization_definitions org,
               hr_locations loc,
               hz_cust_site_uses_all h
WHERE     a.register_id = group_line.register_id
AND       a.customer_id = hzca.cust_account_id
AND       hzca.party_id = e.party_id 
AND       a.customer_id = hzcas.cust_account_id
AND       a.customer_id =   f.customer_id
AND       a.organization_id = mtl.organization_id
AND       g.location_id  = hzps.location_id
AND       hzps.party_site_id = hzcas.party_site_id
AND       hzcas.cust_acct_site_id = h.cust_acct_site_id
AND       h.site_use_id =   a.ship_to_site_id
AND       f.address_id = hzcas.cust_acct_site_id
AND       a.inventory_item_id = mtl.inventory_item_id
AND       NVL(mtl.enabled_flag, &apos;Y&apos;)   = &apos;Y&apos;
AND       a.organization_id = jain_mtl.organization_id
AND       a.inventory_item_id = jain_mtl.inventory_item_id
AND       a.organization_id = org.organization_id
AND       a.location_id = loc.location_id
AND       NVL(org.operating_unit, 0) = NVL(hzcas.org_id, 0)
AND       a.transaction_type = &apos;I&apos;
AND       NVL(A.CUSTOMER_ID,0) &gt; 0
AND       a.inventory_item_id = NVL(:p_inventory_item_id, a.inventory_item_id)
AND       a.organization_id = NVL(:p_organization_id, a.organization_id)
AND       a.location_id = NVL(:p_location_id, a.location_id)
AND       TRUNC(a.creation_date) BETWEEN NVL(TRUNC(:cp_trn_from_date), TRUNC(a.creation_date)) AND NVL(TRUNC(:cp_trn_to_date), TRUNC(a.creation_date))
UNION
SELECT &apos;4&apos; query, a.register_id, a.fin_year,  a.slno, a.transaction_type,
               a.comm_invoice_no||&apos; &apos;||a.receipt_boe_num||&apos; &apos;||a.comm_invoice_date COL2,
               null COL3,
              DECODE(a.transaction_type, &apos;R&apos;,nvl(a.quantity_received,a.oth_receipt_quantity), &apos;MR&apos;,  a.quantity_received , &apos;CR&apos;, a.oth_receipt_quantity, &apos;MCR&apos;,  a.oth_receipt_quantity,&apos;I&apos;,decode(a.quantity_issued,null,a.goods_issue_quantity,a.quantity_issued),&apos;MRTV&apos;,a.quantity_received, &apos;RTV&apos;,a.quantity_received, &apos;MI&apos;,a.quantity_issued,NULL) QTY,    
              a.excise_duty_rate,
              a.rate_per_unit COL6,
              round(a.duty_amount) COL7,
              a.comm_invoice_no||&apos; &apos;||a.comm_invoice_date COL8,
              DECODE(a.transaction_type, &apos;I&apos;,abs(nvl(a.quantity_issued,A.GOODS_ISSUE_QUANTITY)), &apos;MI&apos;, a.quantity_issued,&apos;MRTV&apos;,abs(a.QUANTITY_RECEIVED), &apos;RTV&apos;,abs(a.QUANTITY_RECEIVED), NULL) COL11,   
              a.rate_per_unit COL12,
              ROUND(a.duty_amount) COL13,
              a.closing_balance_qty,
              a.remarks,
              a.consignee,
              jain_mtl.item_tariff,
              jain_mtl.item_folio,
              mtl.segment1,
              org.organization_name,
              loc.description loc_desc,
              loc.address_line_1,
              loc.address_line_2,
              loc.address_line_3,
              a.organization_id,
              a.Manufacturer_name,
              a.Manufacturer_Address ,
              a.Manufacturer_Rate_Amt_per_unit ,
              a.Qty_received_from_Manufacturer,
              a.Tot_amt_paid_to_Manufacturer,
              a.qty_to_adjust receipt_remaining_qty,
              a.reference_line_id, 
	JA_JAIN23D_XMLP_PKG.cf_sob_nameformula(a.organization_id) CF_sob_name, 
	JA_JAIN23D_XMLP_PKG.cf_col9formula(a.register_id, a.transaction_type, null, &apos;4&apos;) CF_col9, 
	JA_JAIN23D_XMLP_PKG.cf_col10formula(a.register_id, a.transaction_type, null) CF_col10, 
	JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;4&apos;, null) CF_2, 
	JA_JAIN23D_XMLP_PKG.cf_matched_shipped_qtyformula(&apos;4&apos;, a.register_id, a.qty_to_adjust, a.transaction_type) CF_Matched_Shipped_qty, 
	JA_JAIN23D_XMLP_PKG.cf_manu_nameformula(a.register_id,JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, a.qty_to_adjust, &apos;4&apos;, null),DECODE(a.transaction_type, &apos;R&apos;,nvl(a.quantity_received,a.oth_receipt_quantity), &apos;MR&apos;,  a.quantity_received , &apos;CR&apos;, a.oth_receipt_quantity, &apos;MCR&apos;,  a.oth_receipt_quantity,&apos;I&apos;,decode(a.quantity_issued,null,a.goods_issue_quantity,a.quantity_issued),&apos;MRTV&apos;,a.quantity_received, &apos;RTV&apos;,a.quantity_received, &apos;MI&apos;,a.quantity_issued,NULL) , a.excise_duty_rate, a.rate_per_unit, ROUND ( a.duty_amount ), a.comm_invoice_no||&apos; &apos;||a.receipt_boe_num||&apos; &apos;||a.comm_invoice_date, a.Manufacturer_Address, a.Qty_received_from_Manufacturer, a.Manufacturer_Rate_Amt_per_unit, a.Tot_amt_paid_to_Manufacturer, a.Manufacturer_name) CF_manu_name, 
	JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id) CF_ISSUE_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id),0) CF_ISSUE_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id) CF_ISSUE_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id),0) CF_ISSUE_SH_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id) CF_RECEIPT_CESS_AMT, 
	nvl(JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id),0) CF_RECEIPT_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id) CF_RECEIPT_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id),0) CF_RECEIPT_SH_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.CP_SUPPLIER_TYPE_p CP_SUPPLIER_TYPE,
	JA_JAIN23D_XMLP_PKG.CP_manu_address_p CP_manu_address,
	JA_JAIN23D_XMLP_PKG.CP_qty_received_from_manu_p CP_qty_received_from_manu,
	JA_JAIN23D_XMLP_PKG.CP_manu_rate_amt_per_unit_p CP_manu_rate_amt_per_unit,
	JA_JAIN23D_XMLP_PKG.CP_tot_amt_paid_to_manu_p CP_tot_amt_paid_to_manu
FROM     JAI_CMN_RG_23D_TRXS a,
               mtl_system_items MTL,
               JAI_INV_ITM_SETUPS JAIN_MTL,
               org_organization_definitions org,
              hr_locations loc
WHERE     a.organization_id = mtl.organization_id
AND       a.inventory_item_id = mtl.inventory_item_id
AND       NVL(mtl.enabled_flag, &apos;Y&apos;)   = &apos;Y&apos;
AND       a.organization_id = jain_mtl.organization_id
AND       a.inventory_item_id = jain_mtl.inventory_item_id
AND       a.organization_id = org.organization_id
AND       a.location_id = loc.location_id
AND       (
           (a.transaction_type = &apos;MR&apos; and (NVL(a.vendor_id, 0) = 0 OR a.vendor_id &lt; 0 ))
           OR (a.transaction_type = &apos;R&apos; and oth_receipt_id_ref IS NOT NULL)
           OR (a.transaction_type = &apos;R&apos; AND a.vendor_id IS NULL
                 AND EXISTS (SELECT 1 FROM rcv_transactions
                    WHERE transaction_id = a.receipt_ref
                    AND requisition_line_id IS NULL AND source_document_code &lt;&gt; &apos;REQ&apos;)
            )
           OR (a.transaction_type IN (&apos;RTV&apos;, &apos;MRTV&apos; ))                           
           OR (a.transaction_type = &apos;I&apos; AND NVL(A.CUSTOMER_ID, 0) = 0)
           OR (a.transaction_type IN (&apos;MI&apos;,&apos;MCR&apos;))
          )
AND       a.inventory_item_id =NVL(:p_inventory_item_id, a.inventory_item_id)
AND       a.organization_id = NVL(:p_organization_id, a.organization_id)
AND       a.location_id = NVL(:p_location_id, a.location_id)
AND       TRUNC(a.creation_date) BETWEEN NVL(TRUNC(:cp_trn_from_date), TRUNC(a.creation_date)) AND NVL(TRUNC(:cp_trn_to_date), TRUNC(a.creation_date))
union
SELECT &apos;ISO&apos; query, a.register_id, a.fin_year, a.slno, a.transaction_type,
               a.comm_invoice_no||&apos; &apos;||a.receipt_boe_num||&apos; &apos;||a.comm_invoice_date COL2,
               null COL3,
              nvl(group_line.quantity_received, group_line.oth_receipt_quantity) QTY,
              a.excise_duty_rate,
              a.rate_per_unit COL6,
              round(group_line.duty_amount) COL7,
              a.comm_invoice_no||&apos; &apos;||a.comm_invoice_date COL8,
              0 COL11,
              a.rate_per_unit COL12,
              ROUND(group_line.duty_amount) COL13,
              a.closing_balance_qty,
              a.remarks,
              a.consignee,
              jain_mtl.item_tariff,
              jain_mtl.item_folio,
              mtl.segment1,
              org.organization_name,
              loc.description loc_desc,
              loc.address_line_1,
              loc.address_line_2,
              loc.address_line_3,
              a.organization_id,
              a.Manufacturer_name,
              a.Manufacturer_Address ,
              a.Manufacturer_Rate_Amt_per_unit ,
              a.Qty_received_from_Manufacturer,
              a.Tot_amt_paid_to_Manufacturer,
              group_line.qty_to_adjust receipt_remaining_qty,
              a.reference_line_id, 
	JA_JAIN23D_XMLP_PKG.cf_sob_nameformula(a.organization_id) CF_sob_name, 
	JA_JAIN23D_XMLP_PKG.cf_col9formula(a.register_id, a.transaction_type, null, &apos;ISO&apos;) CF_col9, 
	JA_JAIN23D_XMLP_PKG.cf_col10formula(a.register_id, a.transaction_type, null) CF_col10, 
	JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, group_line.qty_to_adjust, &apos;ISO&apos;,null) CF_2, 
	JA_JAIN23D_XMLP_PKG.cf_matched_shipped_qtyformula(&apos;ISO&apos;, a.register_id, group_line.qty_to_adjust, a.transaction_type) CF_Matched_Shipped_qty, 
	JA_JAIN23D_XMLP_PKG.cf_manu_nameformula(a.register_id, JA_JAIN23D_XMLP_PKG.cf_2formula(a.transaction_type, a.register_id, group_line.qty_to_adjust, &apos;ISO&apos;,null),nvl(group_line.quantity_received, group_line.oth_receipt_quantity), a.excise_duty_rate, a.rate_per_unit, round(group_line.duty_amount),  a.comm_invoice_no||&apos; &apos;||a.receipt_boe_num||&apos; &apos;||a.comm_invoice_date, a.Manufacturer_Address, a.Qty_received_from_Manufacturer, a.Manufacturer_Rate_Amt_per_unit, a.Tot_amt_paid_to_Manufacturer, a.Manufacturer_name) CF_manu_name, 
	JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id) CF_ISSUE_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_cess_amtformula(a.register_id),0) CF_ISSUE_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id) CF_ISSUE_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_issue_sh_cess_amtformula(a.register_id),0) CF_ISSUE_SH_CESS_AMT1,
	JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id) CF_RECEIPT_CESS_AMT, 
	nvl(JA_JAIN23D_XMLP_PKG.cf_receipt_cess_amtformula(a.register_id),0) CF_RECEIPT_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id) CF_RECEIPT_SH_CESS_AMT, 
	NVL(JA_JAIN23D_XMLP_PKG.cf_receipt_sh_cess_amtformula(a.register_id),0) CF_RECEIPT_SH_CESS_AMT1, 
	JA_JAIN23D_XMLP_PKG.CP_SUPPLIER_TYPE_p CP_SUPPLIER_TYPE,
	JA_JAIN23D_XMLP_PKG.CP_manu_address_p CP_manu_address,
	JA_JAIN23D_XMLP_PKG.CP_qty_received_from_manu_p CP_qty_received_from_manu,
	JA_JAIN23D_XMLP_PKG.CP_manu_rate_amt_per_unit_p CP_manu_rate_amt_per_unit,
	JA_JAIN23D_XMLP_PKG.CP_tot_amt_paid_to_manu_p CP_tot_amt_paid_to_manu
FROM     JAI_CMN_RG_23D_TRXS a,
	( select max(register_id) register_id, sum(a.quantity_received) quantity_received, sum(a.qty_to_adjust) qty_to_adjust,
			sum(a.oth_receipt_quantity) oth_receipt_quantity, sum(a.duty_amount) duty_amount
		FROM JAI_CMN_RG_23D_TRXS a, rcv_transactions b
		WHERE a.receipt_ref= b.transaction_id
		AND a.transaction_type = &apos;R&apos;
		AND b.source_document_code = &apos;REQ&apos;
		AND b.transaction_type = &apos;RECEIVE&apos;
		AND b.requisition_line_id IS NOT NULL
		GROUP BY a.organization_id, a.location_id, a.inventory_item_id, a.comm_invoice_no, a.fin_year
	)  group_line,
               mtl_system_items MTL,
               JAI_INV_ITM_SETUPS JAIN_MTL,
               org_organization_definitions org,
              hr_locations loc
WHERE    a.register_id = group_line.register_id
AND       a.organization_id = mtl.organization_id
AND       a.inventory_item_id = mtl.inventory_item_id
AND       NVL(mtl.enabled_flag, &apos;Y&apos;)   = &apos;Y&apos;
AND       a.organization_id = jain_mtl.organization_id
AND       a.inventory_item_id = jain_mtl.inventory_item_id
AND       a.organization_id = org.organization_id
AND       a.location_id = loc.location_id
AND       a.transaction_type = &apos;R&apos;
 and   ( NVL(a.vendor_id,0) = 0 OR a.vendor_id &lt;0 )
AND       a.inventory_item_id =NVL(:p_inventory_item_id, a.inventory_item_id)
AND       a.organization_id = NVL(:p_organization_id, a.organization_id)
AND       a.location_id = NVL(:p_location_id, a.location_id)
AND       TRUNC(a.creation_date) BETWEEN NVL(TRUNC(:cp_trn_from_date), TRUNC(a.creation_date)) AND NVL(TRUNC(:cp_trn_to_date), TRUNC(a.creation_date))
ORDER BY  22 ASC,23 ASC,24 ASC,25 ASC,26 ASC,21 ASC,27 ASC,20 ASC,19 ASC ,3,4
</SQL_TEXT>
  <DISABLED>Y</DISABLED>
  <XDO_APPLICATION_SHORT_NAME>JA</XDO_APPLICATION_SHORT_NAME>
  <XDO_DATA_SOURCE_CODE>JAIN23D_XML</XDO_DATA_SOURCE_CODE>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>JA India - RG 23 D - draft</REPORT_NAME>
    <DESCRIPTION>Application: Asia/Pacific Localizations
Source: India - RG 23 D Report (XML) - Not Supported: Reserved For Future Use
Short Name: JAIN23D_XML
DB package: JA_JAIN23D_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>JA 印度 - RG 23 D 报表- 不支持：已保留供将来使用</REPORT_NAME>
    <DESCRIPTION>Application: 亚太地区本地化
Source: 印度 - RG 23 D 报表 (XML) - 不支持：已保留供将来使用
Short Name: JAIN23D_XML
DB package: JA_JAIN23D_XMLP_PKG</DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>BI Publisher</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>:cp_manu_address</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_manu_rate_amt_per_unit</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_qty_received_from_manu</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_supplier_type</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_tot_amt_paid_to_manu</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_trn_from_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:cp_trn_to_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:last_page</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_conc_request_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_inventory_item_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_location_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_organization_id</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_trn_from_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:p_trn_to_date</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:prev_page</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:v_last_page</ANCHOR>
   </ANCHORS_ROW>
   <ANCHORS_ROW>
    <ANCHOR>:validation_flag</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
   <PARAMETERS_ROW>
    <SORT_ORDER>1</SORT_ORDER>
    <DISPLAY_SEQUENCE>10</DISPLAY_SEQUENCE>
    <ANCHOR>:p_organization_id</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>JA_IN_TRD_ORGANIZATION_NAME</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hru.organization_id id,
hru.name value,
null description
from
hr_all_organization_units hru
where exists
(
select &apos;1&apos; from
jai_cmn_inventory_orgs jhru
where jhru.organization_id=hru.organization_id
and nvl(jhru.trading,&apos;N&apos;)=&apos;Y&apos;)
order by hru.name
</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Organization</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>组织</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>2</SORT_ORDER>
    <DISPLAY_SEQUENCE>20</DISPLAY_SEQUENCE>
    <ANCHOR>:p_location_id</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>JA_IN_TRD_LOCATION_NAME</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
hrl.location_id id,
hrl.description value,
null description
from
hr_locations hrl
where exists
(
select &apos;1&apos; from
jai_cmn_inventory_orgs jhru
where
jhru.organization_id=:$flex$.ja_in_trd_organization_name
and jhru.location_id=hrl.location_id
and nvl(jhru.trading,&apos;N&apos;)=&apos;Y&apos;
)
order by hrl.description</LOV_QUERY_DSP>
    <REQUIRED>Y</REQUIRED>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Location</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>地点</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>3</SORT_ORDER>
    <DISPLAY_SEQUENCE>30</DISPLAY_SEQUENCE>
    <ANCHOR>:p_trn_from_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>From Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>自日期</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>4</SORT_ORDER>
    <DISPLAY_SEQUENCE>40</DISPLAY_SEQUENCE>
    <ANCHOR>:p_trn_to_date</ANCHOR>
    <PARAMETER_TYPE_DSP>Date</PARAMETER_TYPE_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>To Date</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>至日期</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
   <PARAMETERS_ROW>
    <SORT_ORDER>5</SORT_ORDER>
    <DISPLAY_SEQUENCE>50</DISPLAY_SEQUENCE>
    <ANCHOR>:p_inventory_item_id</ANCHOR>
    <PARAMETER_TYPE_DSP>LOV Oracle</PARAMETER_TYPE_DSP>
    <LOV_NAME>JA_IN_TRD_INV_ITEM</LOV_NAME>
    <VALIDATE_FROM_LIST_DSP>Y</VALIDATE_FROM_LIST_DSP>
    <LOV_QUERY_DSP>select
msik.inventory_item_id id,
msik.concatenated_segments value,
null description
from
mtl_system_items_kfv msik
where exists
(
select &apos;1&apos; from jai_inv_itm_setups jmsi
where
jmsi.organization_id=:$flex$.ja_in_trd_organization_name
and jmsi.organization_id=msik.organization_id
and jmsi.inventory_item_id=msik.inventory_item_id
)
order by concatenated_segments
</LOV_QUERY_DSP>
    <PARAMETER_TRANSLATIONS>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>US</LANGUAGE>
      <PARAMETER_NAME>Inventory Item</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
     <PARAMETER_TRANSLATIONS_ROW>
      <LANGUAGE>ZHS</LANGUAGE>
      <PARAMETER_NAME>库存项目</PARAMETER_NAME>
     </PARAMETER_TRANSLATIONS_ROW>
    </PARAMETER_TRANSLATIONS>
   </PARAMETERS_ROW>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
