必须指定要从错误中选择的表(适用于MSSM,但不适用于SAP B1)

2020-09-20 01:03发布

点击此处---> 群内免费提供SAP练习系统(在群公告中)加入QQ群:457200227(SAP S4 HANA技术交流) 群内免费提供SAP练习系统(在群公告中)大家好,下面是我设法在MSSM中...

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

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


大家好,下面是我设法在MSSM中执行但未在SQL中执行的查询。 一旦我执行了查询,它说必须指定表以选择

选择day(T2.DocDate)作为[day],CASE MONTH(T2.DocDate)当1 THEN'一月'时2 THEN'February'当3 THEN'MARCH'当WHEN 4 THEN'April'当5 THEN' 5月6日,6月,6月7日,7月,7月8日,8月​​,8月,9月,9月,10月,10月,10月11日,11月,12月,12月,12月 Year(T2.DocDate)为[Year],T2.DocDate,T0.DocNum,T3.U_BaseRef作为PO_No,(从OPOR中选择DocDueDate,其中DocNum = T3.U_BaseRef),T0.CardName,T3.U_mill,T2.ItemCode, T4.U_commodity,T4.U_spec,T4.U_thichness,T4.U_width,T1.Dscription,T2.BatchNum,t3.u_coilno作为CoilID,T2.Quantity作为重量,T3.U_quantity,T3.U_UoM,ROUND(T3.U_price, 2)AS成本核算,(金额为(T2.Quantity * T3.U_price),T3.U_ActualWgt,T3.U_customer,T3.U_GRADE,T3.Located,T1.WhsCode,T5.DocEntry为ReturnedRef,T6.Quantity为ReturnedQty,str (T2.Quantity-T6.Quantity,12,5)作为RecQtyAfterReturned,(T2.Quantity-T6.Quantity)* T3.U_price作为ActAmount from OPDN T0内联接PDN1 T1开启T0.DocEntry = T1.Doc 条目INNER JOIN IBT1 T2 ON T2.WhsCode = T1.WhsCode和T2.ItemCode = T1.ItemCode和T2.DocDate = T0.DocDate和T2.BaseNum = T0.DocNum内部联接OIBT T3 ON T2.BatchNum = T3.BatchNum和 T3.ItemCode = T2.ItemCode和T3.WhsCode = T2.WhsCode内联接OITM T4上T4.ItemCode = T3.ItemCode左联接RPD1 T5上T5.BaseRef = T0.Docnum和T5.BaseLine = T1.LineNum左联接IBT1 T6在T6.BaseEntry = T5.DocEntry和T6.BatchNum = T2.BatchNum和T6.BaseLinNum = T5.LineNum和T6.BaseType = 21上-在T7.Docentry = t1.BaseEntry WHERE T2.BsDocType =上左加入OPOR T7 '22'和(T0.DocNum> = [%0]和T0.DocNum <= [%1]或[%0] =''和[%1] ='')和(T0.DocDate> = [% 2]和T0.DocDate <= [%3]或[%2] =''和[%3] ='')和(T3.BatchNum = [%11]或[%11] ='')和( T3.U_mill = [%4]或[%4] ='')和(T4.U_commodity = [%5]或[%5] ='')和(T4.U_spec = [%6]或[%6 ] ='')和(T4.U_thichness = [%8]或[%8] ='0')和(T4.U_width = [%7]或[%7] ='0')和(T4.U_length = [%9]或[%9] ='0')和(T3.Located = [%10] o r [%10] ='')和(T1.WhsCode = [%12]或[%12] ='')和(T3.U_GRADE = [%13]或[%13] ='')和T0。 注释不像'%Cancel%'GROUP BY T2.ItemCode,T4.U_commodity,T4.U_spec,T4.U_thichness,T4.U_width,T2.BatchNum,T2.Quantity,T1.Dscription,T3.U_quantity,T0.DocNum, T3.U_UoM,T0.DocNum,T0.DocDate,T2.DocDate,T3.U_ActualWgt,T0.CardName,T3.U_Mill,T3.U_GRADE,T3.U_customer,T3.U_BaseRef,T3.Located,T1.WhsCode,T3。 U_price,T5.DocEntry,T6.Quantity,t3.u_coilno

有人知道错误吗? 还是子查询的SAP B1限制?

1条回答

你好

这是B1的局限性,分别声明变量并将其传递给查询。

谢谢。

一周热门 更多>