gtxyzz

Oracle EBS-SQL (INV-11):检查子库存会计信息.sql

gtxyzz web技术 2023-02-26 1077浏览 0

select
         OOD.ORGANIZATION_CODE                                               库存组织代码,
         OOD.ORGANIZATION_NAME                                               库存组织名称,
         MSV.SECONDARY_INVENTORY_NAME                                          子库存,
         MSV.SUBINVENTORY_TYPE                                                            类型,–1 = 储存 2 = 接收
         MSV.DESCRIPTION                                                                        描述,
         MSV.DISABLE_DATE                                                                无效日期,
         MSV.INVENTORY_ATP_CODE                                               包括在ATP中,
         MSV.AVAILABILITY_TYPE                                                          可净计算,
         MSV.RESERVABLE_TYPE                                                           允许保留,
         MSV.PICKING_ORDER                                                                 挑库单,
         MSV.LOCATOR_TYPE                                                                货位控制,
         MSV.QUANTITY_TRACKED                                                        跟踪数量,
         MSV.ASSET_INVENTORY                                                       资产子库存,
         MSV.SOURCE_TYPE                                                            来源补兖类型,
         MSV.DEPRECIABLE_FLAG                                                         应计折旧,
         MSV.STATUS_CODE                                                                      状态,
         MSV.DEFAULT_LOC_STATUS_CODE                                    默认货位状态,
         MSV.DEFAULT_COST_GROUP_NAME                                      默认成本组,
         MSV.DROPPING_ORDER                                                             卸货单,
         MSV.PLANNING_LEVEL                                                    启用PAR层计划,
         MSV.DEFAULT_COUNT_TYPE_CODE,
         K1.CONCATENATED_SEGMENTS                                                     材料,
         apps.cux_get_gl_code_name(K1.CODE_COMBINATION_ID)        材料描述,
         K2.CONCATENATED_SEGMENTS                                          材料间接费用,
         apps.cux_get_gl_code_name(K2.CODE_COMBINATION_ID) 材料间接费用描述,
         K3.CONCATENATED_SEGMENTS                                                     资源,
         apps.cux_get_gl_code_name(K3.CODE_COMBINATION_ID)        资源描述,
         K4.CONCATENATED_SEGMENTS                                                制造费用,
         apps.cux_get_gl_code_name(K4.CODE_COMBINATION_ID)   制造费用描述,
         K5.CONCATENATED_SEGMENTS                                                外协费用,
         apps.cux_get_gl_code_name(K5.CODE_COMBINATION_ID)   外协费用描述,
         K6.CONCATENATED_SEGMENTS                                                   保留款,
         apps.cux_get_gl_code_name(K6.CODE_COMBINATION_ID)      保留款描述,
         K7.CONCATENATED_SEGMENTS                                                      费用,
         apps.cux_get_gl_code_name(K7.CODE_COMBINATION_ID)         费用描述
from
         apps.GL_CODE_COMBINATIONS_KFV K7, 
         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, 
         ORG_ORGANIZATION_DEFINITIONS OOD,
         MTL_SECONDARY_INVENTORIES_FK_V  MSV
WHERE 
            MSV.ORGANIZATION_ID = X
    AND NVL(MSV.DISABLE_DATE,SYSDATE + 1) > SYSDATE
    AND MSV.ORGANIZATION_ID = OOD.ORGANIZATION_ID
    AND MSV.MATERIAL_ACCOUNT = K1.CODE_COMBINATION_ID(+)
    AND MSV.MATERIAL_OVERHEAD_ACCOUNT = K2.CODE_COMBINATION_ID(+)
    AND MSV.RESOURCE_ACCOUNT = K3.CODE_COMBINATION_ID(+)
    AND MSV.OVERHEAD_ACCOUNT = K4.CODE_COMBINATION_ID(+)
    AND MSV.OUTSIDE_PROCESSING_ACCOUNT = K5.CODE_COMBINATION_ID(+)
    AND MSV.ENCUMBRANCE_ACCOUNT = K6.CODE_COMBINATION_ID(+)
    AND MSV.EXPENSE_ACCOUNT = K7.CODE_COMBINATION_ID(+)
ORDER BY MSV.ORGANIZATION_ID,

           MSV.SECONDARY_INVENTORY_NAME ASC

继续浏览有关 数据库技术文章/教程 的文章
发表评论