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.
Showing results for 
Search instead for 
Did you mean: 

How to find Open PO's and Closed PO's

Former Member
0 Kudos


How to find out Open PO's and Closed PO's,Can anyone explain detail?



Active Contributor
0 Kudos

Hi Sai Ganesh

If EKPO-ELIKZ is not initial for all line items for a particular PO then that PO was closed.

Active Contributor
0 Kudos

Hi Sai

As Ramesh told, you can directly read the value of EKPO-ELIKZ (for all the materials of PO).


do as follows: ( Pseudo code)

Loop at all POs ( from EKKO)

Call the BAPI  BAPI_PO_GETDETAIL1 by passing the EBELN.

   It wll return a structure BAPIMEPOHEADER

   In the structure look for the vaieable BAPIMEPOHEADER-STATUS


This how you can find out.



0 Kudos

Hi Venkat,

Actually i am aarchiving MM_EEKO for EKKO And EKPO table ,Here i am getting this issue 'final delivery indicator set NO IR Planned' ,how to solve this issue?


0 Kudos

I think you can set final delivery indicator to Yes by ME22N.

You may have to consult with MM Consultant.

0 Kudos

Hi Sai,

it means delivery is not completed for all items in the  requested purchase order, so your PO is incomplete.

CHECK THE VBUK TABLE and status should be  VBUK-WBSTK = 'C'. other wise you can't archive the Purchase Orders.

Find the detailed explanation below

You never try to archive the unclosed purchasing documents. This is the basic principle should follow to archiving the purchasing documents.

A documents needs to be completed or closed business point of view. If you find any difference or not closed, this document not ready to archived.

I have already explained one of the threads to archiving the Po's and pre conditions.

Check the below information once again before archiving the PO's.

  1. All  PO’s are needs to be set the deletion indicator at Header Level (in EKKO). Unable to archive the PO’s without deletion flag
  2. Need to check the tolerance period for  PO’s. it means need to check the table T161R

         Need to check the residence time 2   : ( 0030 days ).

         Example:  PO creation date is less than the (system date – residence time 2  =                   PO comparison date

IF PO creation date is greater than the PO comparison date we can’t able to archive the PO’s.

Put the break point on the below report and statement you will get the problem RM06EW47

if t161r-bstyp ne ekko-bstyp or
      t161r-bsart ne ekko-bsart or
      t161r-pstyp ne ekpo-pstyp.
*     t161r-tage2 is initial.                                " 1024764
     select single * from t161r where bstyp = ekko-bstyp
                                and   bsart = ekko-bsart
                                and   pstyp = ekpo-pstyp.
     if sy-subrc <> 0.
       call function 'ARCHIVE_PROTOCOL_COLLECT_APPL'
           i_object  = ekko-ebeln
           i_msgtype = '02'
           i_text    = text-011.      
* clear is necessary for correct message in calling program.
       clear t161r.                                          "1024764
       clear p_archive.

Check the Jurgen comments in the below link:

SAP has provided OSS notes for more information.

OSS note 588463 - Importance of residence times during archiving

OSS note 335800 - SARA: Deletion indicator not set, but why?

OSS note 401318 - Archiving: Additional information

Don't forget to check the

Rg, Kiran

0 Kudos

Dear sai,

If about purchase orders -

Just try any t.code me2l, or me2m.

In above t.code just put input parameter as follows,

1) As per - vendor or material (If needed as input)

2) Scope of list - BEST

3) Selection parameters- open GR

4) Document type - type of PO.

Execute and will get open or closed PO according to selection of 3rd point.

With best regards,

Manish K. Bachate

Former Member
0 Kudos


Use Selection Parameter WE101 in T-code ME2M to output purchase orders with open GR.


Naresh K.

Active Contributor
0 Kudos

Hello Sai Ganesha.

     Already many threads are available regarding your query.

     Please search before posting.

open purchase order report | SCN