Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HOW WE FIND OUT OPEN PURCHASE ORDER AND CLOSED PURCHASE IN THE TABLE?

Former Member
0 Kudos

HI,

PLZZ HELP ME.

what are fields names for open purchase order and closed purchase order

thanks

3 REPLIES 3

RoySayak
Active Participant
0 Kudos

Before posting pls search SDN..

Best Regards,

Sayak..

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

go through this link

Rewards if usefull.