08-03-2008 9:00 AM
HI,
PLZZ HELP ME.
what are fields names for open purchase order and closed purchase order
thanks
08-03-2008 10:03 AM
08-03-2008 10:03 AM
Hi param,
Go to mseg table, pass the purchase order number and purchase order item. if the mseg-menge = ekpo-menge for the corresponding purchase order then consider the purchase order is close, else it is still open. even check if the entries are not there for corresponding purchase order in mseg table then also it is open.
select mblnr zeile matnr menge from mseg into it_mseg where ebeln = it_ekko-ebeln
and ebelp = it_ekpo-ebeln.
if sy-subrc <> 0.
then consider the purchase order is open.
This is the first case.
even u can consider like this
if sy-subrc = 0.
if it_ekpo-menge > it_mseg-menge.
then also the purchase order is open.
Regards,
Santosh Kumar M.
Award points if it is useful.
08-03-2008 10:14 AM