select
msn.FROM_ORGANIZATION_CODE
开始库存组织,
msn.FROM_ORGANIZATION_NAME 开始库存名称,
msn.TO_ORGANIZATION_CODE
结束库存组织,
msn.TO_ORGANIZATION_NAME
结束库存名称,
decode(msn.INTRANSIT_TYPE,1,‘直接‘,2,‘在途‘,‘未知‘)
转换类型,
k1.CONCATENATED_SEGMENTS
转帐贷项,
apps.cux_get_gl_code_name(msn.INTERORG_TRANSFER_CR_ACCOUNT)
转帐贷项描述,
k2.CONCATENATED_SEGMENTS
采购价格差异,
apps.cux_get_gl_code_name(msn.INTERORG_PRICE_VAR_ACCOUNT)
采购价格差异描述,
k3.CONCATENATED_SEGMENTS
组织间应收款,
apps.cux_get_gl_code_name(msn.INTERORG_RECEIVABLES_ACCOUNT)
组织间应收款描述,
k4.CONCATENATED_SEGMENTS
组织间应付款,
apps.cux_get_gl_code_name(msn.INTERORG_PAYABLES_ACCOUNT)
组织间应付款描述,
k5.CONCATENATED_SEGMENTS
在途库存,
apps.cux_get_gl_code_name(msn.INTRANSIT_INV_ACCOUNT)
在途库存描述,
k6.CONCATENATED_SEGMENTS
在途利润,
apps.cux_get_gl_code_name(msn.PROFIT_IN_INV_ACCOUNT) 在途利润描述
from
apps.GL_CODE_COMBINATIONS_KFV
K6,
apps.GL_CODE_COMBINATIONS_KFV
K5,
apps.GL_CODE_COMBINATIONS_KFV
K4,
apps.GL_CODE_COMBINATIONS_KFV
K3,
apps.GL_CODE_COMBINATIONS_KFV
K2,
apps.GL_CODE_COMBINATIONS_KFV
K1,
MTL_SHIPPING_NETWORK_VIEW
msn
where msn.INTERORG_TRANSFER_CR_ACCOUNT =
k1.CODE_COMBINATION_ID(+)
and msn.INTERORG_PRICE_VAR_ACCOUNT =
k2.CODE_COMBINATION_ID(+)
and msn.INTERORG_RECEIVABLES_ACCOUNT =
k3.CODE_COMBINATION_ID(+)
and msn.INTERORG_PAYABLES_ACCOUNT =
k4.CODE_COMBINATION_ID(+)
and msn.INTRANSIT_INV_ACCOUNT =
k5.CODE_COMBINATION_ID(+)
and msn.PROFIT_IN_INV_ACCOUNT =
k6.CODE_COMBINATION_ID(+)
-- and (msn.FROM_ORGANIZATION_CODE like ‘W%‘ or
msn.TO_ORGANIZATION_CODE like ‘W%‘)
order by
msn.FROM_ORGANIZATION_CODE
Oracle EBS-SQL (OM-4):检查发运网络.sql,布布扣,bubuko.com