Former Member

# Open Purchase Orders and Open Sales Orders

Hi,

Please let me know the table names for open purchase orders and sales orders.

Regards,

Prii

10|10000 characters needed characters exceeded

### Related questions

Former Member
Posted on Mar 02, 2007 at 08:36 PM

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

10|10000 characters needed characters exceeded
• Posted on Mar 02, 2007 at 08:44 PM

FM QPBU_LOT_INSERT is not seeing MY implementation of the SAP BADI

Regards,

Amit

10|10000 characters needed characters exceeded
• Former Member
Posted on Mar 02, 2007 at 08:51 PM

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.