cancel
Showing results for 
Search instead for 
Did you mean: 

Howto get List of idocs from SAP R3 (ERP)

Former Member
0 Kudos

I know the standard usecase of IDOc communication to MII is by pushing them via IDOC Listener to MII side.

In my case i have to process the iDocs "by hand" inside MII. so MII has to get them one-by-one and process them and tell SAP that they are done.

So I need to fullfill the following szenario:

.) MII has to retreive latest iDoc from the SAP ERP

.) MII processes payload of iDoc

.) MII sets the IDOC in SAP R3 to 'OK'

Is there any RFC function for LIST all Outound IDOCs and one for setting the idoc state?

Thanking you very much in advance for helping me

best regards

Thomas Lustig

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member331989
Participant
0 Kudos

Hi,

You can get IDOC records from EDIDC table.

You must create an RFC to get idoc list.

Inside RFC after getting IDOC list you must call another function to get data inside idocs one by one like below.

Regards.


  loop at internalTable.
 
     CALL FUNCTION 'IDOC_READ_COMPLETELY'
      EXPORTING
        DOCUMENT_NUMBER = internalTable-IDOCNUM
      TABLES
        INT_EDIDS       = INT_EDIDS
        INT_EDIDD       = INT_EDIDD.