Hi Preeti,
You can determine whether an order is open order through <b>VBUK</b> table.
Query on VBUK on the field GBSTK as 'A' or 'B' then it will gives you Open order.
SELECT vbeln
FROM vbuk
INTO TABLE it_vbuk
WHERE vbeln IN s_vbeln
AND gbstk IN ('A','B').
Thanks,
Vinay
Thanks,
Vinay
FM QPBU_LOT_INSERT is not seeing MY implementation of the SAP BADI
Regards,
Amit
Reward all helpful replies.
HI Priti,
EKPO-ELIKZ "Delivery completed" indicator, This tell if the given PO line items has any open quantity or not.
Logic to find out if a given PO has Open Quantity or not is do the following:
" select the PO Qunatity.
SELECT SINGLE MENGE FROM EKPO INTO PO_QTY WHERE
EBELN = ITAB_PO_LN-EBELN AND
EBELP = ITAB_PO_LN-EBELP.
" select the GR qunatity which has been received.
SELECT SUM( MENGE ) FROM EKBE INTO GR_QTY WHERE
EBELN = ITAB_PO_LN-EBELN AND
EBELP = ITAB_PO_LN-EBELP AND
BWART = '101'.
" select GR Quantity which has been reversed.
SELECT SUM( MENGE ) FROM EKBE INTO GR_REV_QTY WHERE
EBELN = ITAB_PO_LN-EBELN AND
EBELP = ITAB_PO_LN-EBELP AND
BWART = '102'.
POSTED_QTY = GR_QTY - GR_REV_QTY .
OPEN_QTY = PO_QTY - POSTED_QTY.
Regards,
-Venkat.
Add a comment