Creating Inbound IDoc
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.
You can use the FM "IDOC_INBOUND_SINGLE" for the same.
CALL FUNCTION 'IDOC_INBOUND_SINGLE'
PI_IDOC_CONTROL_REC_40 = IDOC_HEADER
PE_IDOC_NUMBER = DOCNUM
PT_IDOC_DATA_RECORDS_40 = IDOC_DATA
IDOC_NOT_SAVED = 1
OTHERS = 2.
You first need to populate the IDOC_DATA & IDOC_HEADER