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')
  • 相关阅读:
    C#调用Halcon
    C#跨窗体程序调用方法的具体操作
    C#调用DLL报错:试图加载格式不正确的程序
    C#窗体程序设置禁用关闭按钮
    C#窗体程序设置禁用关闭按钮
    C#在字符串中查询指定字符串是否存在
    poj1654
    poj1873
    poj2451
    poj1113
  • 原文地址:https://www.cnblogs.com/Snowfun/p/8604391.html
Copyright © 2011-2022 走看看