如何取消程序以进行以下查询

2020-09-12 20:39发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中) 选择 A.MANDT,A.MA...

         点击此处--->   EasySAP.com群内免费提供SAP练习系统(在群公告中)

加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)


选择 A.MANDT,A.MATKL,T023T.WGBEZ AS GRP_DESCR,A.MATNR AS ITEM_CODE,( SELECT MAKTX FROM SAPABAP1.MAKT WHERE MANDT = A.MANDT AND MATNR = A.MATNR) AS ITEM_DESCR,

总和(A.MENGE)* -1 AS QUANTITY, MAX (A.NET_WT) AS NET_WT,总和(A.WEIGHT)* -1 AS WEIGHT FROM

选择,MATDOC.MANDT,MARA.MATKL,MARA.MATNR,

案例 何时 MATDOC.SHKZG ='H'何时 MATDOC.MENGE * -1 ELSE MATDOC。 MENGE END AS AS MENGE,

MARA.NTGEW AS NET_WT,案例 何时 MATDOC.SHKZG ='H'何时 MATDOC.MENGE * -1 ELSE MATDOC.MENGE END * MARA.NTGEW AS 重量

FROM SAPABAP1.MATDOC,SAPABAP1.MARA 位置

MATDOC.MANDT = MARA.MANDT MATDOC.MATNR = MARA.MATNR AND

MATDOC.BWART IN ('601','602','641','642') AND

MATDOC.MANDT ='500'

AND ((MATDOC.MATNR BETWEEN 'RLTOWT1004WH' AND 'RLTOWT1004WH') OR (MATDOC。 MATNR 喜欢'%RLTOWT1004WH%' OR INSTR('RLTOWT1004WH',MATDOC.MATNR)> 0))

AND (((MARA.MATKL BETWEEN '' AND '') OR (MARA.MATKL < strong>喜欢'%%' INSTR('',MARA.MATKL)> 0))

AND (MATDOC.WERKS 喜欢'%3030%' OR INSTR('3030',MATDOC.WERKS)> 0)

AND MATDOC.BUDAT BETWEEN '20180901' AND '20180927'

)A,SAPABAP1.T023T

位置 A.MANDT = T023T.MANDT AND T023T.SPRAS ='E' AND T023T.MATKL = A.MATKL

BY A.MANDT,A.MATKL,T023T.WGBEZ,A.MATNR;

6条回答
落灬小鱼
2020-09-12 21:25

您好,

最终表结构在下面表示为" AS" +从MATDOC和MARA中选择

MANDT AS MANDT

MATKL AS MATKL

T023T-WGBEZ AS GRP_DESCR

MATNR AS MATNR

(从SAPABAP1.MAKT中的MANDT = A.MANDT和MATNR = A.MATNR中选择MAKTX)作为ITEM_DESCR

SUM(A.MENGE)* -1 AS数量最大(A.NET_WT)AS NET_WT

总和(A.WEIGHT)* -1 AS重量

CASEWHEN MATDOC.SHKZG ='H'THEN MATDOC.MENGE * -1 ELSE MATDOC.MENGE以MENA MARA结尾。

NTGEW AS NET_WT CASEWHEN MATDOC.SHKZG ='H'THEN MATDOC.MENGE * -1 ELSE MATDOC.MENGE END * MARA.NTGEW AS重量

从SAPABAP1.MATDOC,SAPABAP1.MARA

**********条件

MATDOC.MANDT = MARA.MANDT

AND MATDOC.MATNR = MARA.MATNR

AND MATDOC.BWART IN('601','602','641','642')

AND MATDOC.MANDT ='500'

AND((('RLTOWT1004WH'和'RLTOWT1004WH'之间的MATDOC.MATNR')或((MATDOC.MATNR喜欢的'%RLTOWT1004WH%'OR INSTR('RLTOWT1004WH',MATDOC.MATNR)> 0)))

AND(((和AND之间的MARA.MATKL)或(喜欢'%%'OR INSTR('',MARA.MATKL)> 0)的(MARA.MATKL>))

AND(MATDOC.WERKS喜欢'%3030%'OR INSTR('3030',MATDOC.WERKS)> 0)

ANDMATDOC.BUDAT在'20180901'和'20180927'之间)A,SAPABAP1.T023T

A.MANDT = T023T.MANDT

AND T023T.SPRAS ='E'

AND T023T.MATKL = A.MATKL GROUPBY A.MANDT,A.MATKL,T023T.WGBEZ,A.MATNR;

希望您能得到它!!!!!!

一周热门 更多>