CST Historical Intransit Standard Cost Adjustment

Description
Categories: BI Publisher, Financials, Manufacturing
Application: Bills of Material
Source: Historical Intransit Standard Cost Adjustment Report (XML)
Short Name: CSTCUSTA_XML
DB package: BOM_CSTRUSTA_XMLP_PKG
SELECT  C.ORGANIZATION_ID ORGANIZATION_ID
,       OFROM.ORGANIZATION_CODE FROM_ORG_CODE
,       OFROM.ORGANIZATION_NAME FROM_ORG_NAME
,       OTO.ORGANIZATION_CODE TO_ORG_CODE
,       OTO.ORGANIZATION_NAME TO_ORG_NAME
,       null ITEM_NUMBER
,       MSI.DESCRIPTION ITEM_DESC
,       MSI.PRIMARY_UOM_CODE UOM_CODE
,       null INTRANSIT_ACCT
,       null ADJUSTMENT_ACCT
,       ROUND(C.ADJUSTMENT_QUANTITY,:P_qty_precision) ADJUSTMENT_QUANTITY, 
        C.OLD_UNIT_COST
,       C.NEW_UNIT_COST
,       ROUND(C.OLD_UNIT_COST * C.ADJUSTMENT_QUANTITY / :ROUND_UNIT) *
              :ROUND_UNIT OLD_EXTENDED_COST
,       ROUND(C.NEW_UNIT_COST * C.ADJUSTMENT_QUANTITY / :ROUND_UNIT) *
              :ROUND_UNIT NEW_EXTENDED_COST
,       (ROUND(C.NEW_UNIT_COST * C.ADJUSTMENT_QUANTITY / :ROUND_UNIT) -
         ROUND(C.OLD_UNIT_COST * C.ADJUSTMENT_QUANTITY / :ROUND_UNIT)) *
         :ROUND_UNIT ADJUSTMENT, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('intransit_acct_pseg', 'SQLGL', 'GL#', CC1.CHART_OF_ACCOUNTS_ID, NULL, CC1.CODE_COMBINATION_ID, 'ALL', 'Y', 'PADDED_VALUE') INTRANSIT_ACCT_PSEG, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('intransit_acct_seg', 'SQLGL', 'GL#', CC1.CHART_OF_ACCOUNTS_ID, NULL, CC1.CODE_COMBINATION_ID, 'ALL', 'Y', 'VALUE') INTRANSIT_ACCT_SEG, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('intransit_acct_desc', 'SQLGL', 'GL#', CC1.CHART_OF_ACCOUNTS_ID, NULL, CC1.CODE_COMBINATION_ID, 'ALL', 'Y', 'DESCRIPTION') INTRANSIT_ACCT_DESC, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('adjustment_acct_seg', 'SQLGL', 'GL#', CC2.CHART_OF_ACCOUNTS_ID, NULL, CC2.CODE_COMBINATION_ID, 'ALL', 'Y', 'VALUE') ADJUSTMENT_ACCT_SEG, 
	BOM_CSTRUSTA_XMLP_PKG.acc_adjustmentformula(:ACCOUNT_TOTAL) ACC_ADJUSTMENT, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('item_pseg', 'INV', 'MSTK', 101, MSI.ORGANIZATION_ID, MSI.INVENTORY_ITEM_ID, 'ALL', 'Y', 'PADDED_VALUE') ITEM_PSEG, 
	fnd_flex_xml_publisher_apis.process_kff_combination_1('item_segment', 'INV', 'MSTK', 101, MSI.ORGANIZATION_ID, MSI.INVENTORY_ITEM_ID, 'ALL', 'Y', 'VALUE') ITEM_SEGMENT
FROM    MTL_SYSTEM_ITEMS_VL MSI
,       ORG_ORGANIZATION_DEFINITIONS OFROM
,       ORG_ORGANIZATION_DEFINITIONS OTO
,       GL_CODE_COMBINATIONS CC1
,       GL_CODE_COMBINATIONS CC2
,        CST_STD_COST_ADJ_VALUES C
WHERE   C.COST_UPDATE_ID = :P_UPDATE_ID
AND     C.TRANSACTION_TYPE = 2
AND     OFROM.ORGANIZATION_ID = C.FROM_ORGANIZATION_ID
AND     OTO.ORGANIZATION_ID = C.TO_ORGANIZATION_ID
AND     C.ORGANIZATION_ID = MSI.ORGANIZATION_ID
AND     C.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID
AND     CC1.CODE_COMBINATION_ID = C.INTRANSIT_INV_ACCOUNT
AND     CC2.CODE_COMBINATION_ID = NVL(:P_ADJ_ACCOUNT, C.INTRANSIT_INV_ACCOUNT) 
 and C.ORGANIZATION_ID=:OWNING_ORG_ID
 order by fnd_flex_xml_publisher_apis.process_kff_combination_1('intransit_acct_pseg', 'SQLGL', 'GL#', CC1.CHART_OF_ACCOUNTS_ID, NULL, CC1.CODE_COMBINATION_ID, 'ALL', 'Y', 'PADDED_VALUE'),OFROM.ORGANIZATION_CODE,OTO.ORGANIZATION_CODE,fnd_flex_xml_publisher_apis.process_kff_combination_1('item_pseg', 'INV', 'MSTK', 101, MSI.ORGANIZATION_ID, MSI.INVENTORY_ITEM_ID, 'ALL', 'Y', 'PADDED_VALUE')
Parameter NameSQL textValidation
Del Snapshot
 
Number
Report only
 
Number
Description
 
Item Range
 
Cost Type
 
Date
 
LOV Oracle
CST_SRS_NUMERIC_OPTION
 
Number