Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Creating Inbound IDoc

Hi All,

I want to know how to create an Inbound IDoc within the same sap system? I want to create it using my own program, no external system.

Message type is wminve and basic type is wmivid01. This is for inventory count purpose.

Will 'idoc_inbound_write_to_db' help? But this is 'Not Released'.

What is the other way? Your help will be highly appreciated.

Thanks,

Sagar

Tags:
replied

Hi,

You can use the FM "IDOC_INBOUND_SINGLE" for the same.

For eg:

CALL FUNCTION 'IDOC_INBOUND_SINGLE'

EXPORTING

PI_IDOC_CONTROL_REC_40 = IDOC_HEADER

IMPORTING

PE_IDOC_NUMBER = DOCNUM

TABLES

PT_IDOC_DATA_RECORDS_40 = IDOC_DATA

EXCEPTIONS

IDOC_NOT_SAVED = 1

OTHERS = 2.

You first need to populate the IDOC_DATA & IDOC_HEADER

Thanks,

ajay

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question