on 2022 Mar 09 7:06 AM
Dear all,
User have created direct AP Invoice (GST Debit memo type) into SAP with 2 different batches.
Batch1 named ABC : 46200
Batch2 named XYZ : 47300.
Total quantity into AP Invoice (46200 + 47300) = 93500.
Need to update into below query and need to display batch wise quantity bifurcation. Where we can store AP Invoice batch quantity details?
SAP Business One HANA
SELECT DISTINCT T0."DocEntry",T0."DocNum",
IFNULL(SB1."Quantity",0) AS "BATCH QTY" ,
T1."Quantity"
--T99."Quantity"
,IFNULL(SB1."U_UNE_MRP",0) AS "BATCH MRP"
FROM
OPCH T0
LEFT JOIN PCH1 T1 ON T0."DocEntry"=T1."DocEntry"
LEFT OUTER JOIN PDN1 D1 ON T1."BaseEntry"=D1."DocEntry" AND T1."BaseLine"=D1."LineNum"
LEFT JOIN OPDN D2 ON D1."DocEntry"=D2."DocEntry"
--LEFT JOIN IBT1 SFGI On D1."DocEntry" = SFGI."BaseEntry" and D1."LineNum" = SFGI."BaseLinNum" AND D1."ItemCode"=SFGI."ItemCode" AND SFGI."BaseType"=D1."ObjType" AND SFGI."WhsCode" =D1."WhsCode"
LEFT JOIN IBT1 SFGI On T1."DocEntry" = SFGI."BaseEntry" and T1."LineNum" = SFGI."BaseLinNum"
--AND T1."ItemCode"=SFGI."ItemCode" AND SFGI."BaseType"=T1."ObjType" AND SFGI."WhsCode" =T1."WhsCode"
--left JOIN OIBT T99 ON T99."ItemCode" = SFGI."BatchNum"
LEFT JOIN OBTN SB1 On SFGI."ItemCode"=SB1."ItemCode" AND SB1."DistNumber"=SFGI."BatchNum"
WHERE T0."DocNum" = '210400002';
Regards,
Nikunj
User | Count |
---|---|
109 | |
8 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.