zoukankan      html  css  js  c++  java
  • 2021工厂增加2322仓位需求,参与FP分析

    在以下语句取消2322工厂即可

    INSERT INTO STG.SAP_MARD(MATNR, WERKS, LGORT, LABST, UMLME, INSME, EINME, SPEME, LGOBE, RETME, MEINS, KLABS, KINSM, KEINM, KSPEM)
    select distinct
    TRIM(mard.MATNR) AS MATNR,
    TRIM(mard.WERKS) AS WERKS,
    TRIM(mard.LGORT) AS LGORT,
    mard.LABST,
    mard.UMLME,
    mard.INSME,
    mard.EINME,
    mard.SPEME,
    UNISTR(ASCIISTR(t001l.LGOBE)) LGOBE,
    mard.RETME,
    MARA.MEINS,
    mard.KLABS,
    mard.KINSM,
    mard.KEINM,
    mard.KSPEM
    from SAPSR3.mard@SAP_SEP mard JOIN SAPSR3.MARA@SAP_SEP MARA ON MARD.MANDT = MARA.MANDT AND MARD.MATNR = MARA.MATNR
    left join SAPSR3.t001l@SAP_SEP t001l on mard.mandt = t001l.mandt and mard.werks = t001l.werks and mard.lgort = t001l.lgort
    where --mard.werks in ('2061')
    --mard.werks in ('2211')
    mard.werks in (SELECT WERKS FROM SAPSR3.ZFM_FP_WERKS@SAP_SEP SZ WHERE SZ.ID IN (3))
    and mard.mandt = '800' 
    and mard.labst+mard.KLABS+mard.insme+mard.speme>0
    and trim(mard.lgort) not in 
    ('2120','2121','2220','2321','2320','2314','2510')
    --ADD BY ZHANGGUIPENG ON 20170712 材料入库质检工单参与FP计算
    UNION ALL
    
    select distinct
    TRIM(mard.MATNR) AS MATNR,
    TRIM(mard.WERKS) AS WERKS,
    TRIM(mard.LGORT) AS LGORT,
    mard.LABST,
    mard.UMLME,
    mard.INSME,
    mard.EINME,
    mard.SPEME,
    UNISTR(ASCIISTR(t001l.LGOBE)) LGOBE,
    mard.RETME,
    MARA.MEINS,
    mard.KLABS,
    mard.KINSM,
    mard.KEINM,
    mard.KSPEM
    from SAPSR3.ztmard@SAP_SEP mard JOIN SAPSR3.MARA@SAP_SEP MARA ON MARD.MANDT = MARA.MANDT AND MARD.MATNR = MARA.MATNR
    left join SAPSR3.t001l@SAP_SEP t001l on mard.mandt = t001l.mandt and mard.werks = t001l.werks and mard.lgort = t001l.lgort
    where 
    mard.werks in (SELECT WERKS FROM SAPSR3.ZFM_FP_WERKS@SAP_SEP SZ WHERE SZ.ID IN (3))
    and mard.mandt = '800' 
    and mard.labst+mard.KLABS+mard.insme+mard.speme>0
    and trim(mard.lgort) not in 
    ('2120','2121','2220','2321','2320','2314','2510')
  • 相关阅读:
    SyncNavigator V8.6.2数据库同步工具安装与卸载
    数据库同步软件|SyncNavigator数据库同步软件 V8.6.2官网下载地址
    sql server两个数据库同步
    怎么实现数据库异地同步备份
    两台服务器数据库同步
    如何实现数据实时同步
    数据库同步软件|SyncNavigator数据库同步软件 V8.6.2
    syncnavigator使用说明
    go 编译
    Go语言实现FastDFS分布式存储系统WebAPI网关
  • 原文地址:https://www.cnblogs.com/Snowfun/p/8604391.html
Copyright © 2011-2022 走看看