Dear All,

There might be a requirement where you need to call standard IDoc’s via custom program .

This can be achieved by MASTER_IDOC_DISTRIBUTE function module but this function module has some limitations and it creates both Inbound as well as Outbound Idoc.

Here i am not using above FM,and create a program with following FM’s in the same sequence –

1. IDOC_CREATE_ON_DATABASE

2. BAPI_IDOC_INPUT1 (Depends upon the message type and function module configuration in WE57)

3. EDI_DOCUMENT_OPEN_FOR_PROCESS

4. EDI_DOCUMENT_STATUS_SET

5. EDI_DOCUMENT_CLOSE_PROCESS

Let us now understand how to use these function modules –

First you need to fill IDOC_DATA table of type- EDIDD .

1. IDOC_CREATE_ON_DATABASE

In this function module you have to pass IDOC_DATA and IDOC_CONTROL

2.BAPI_IDOC_INPUT1

Before using this function module , you have to ensure whether this function module is assigned with the required message type in WE57,If yes then go ahead and if no – You have to call the FM that is assigned in WE57 against your message type .

Here you have to pass –

idoc_contrl        fill the structure with all control parameters

idoc_data          pass as it is fetched from step-1

idoc_status        as blank

return_variables  as blank

serialization_info as blank

3. EDI_DOCUMENT_OPEN_FOR_PROCESS

Here you have to pass –

Document no i.e. IDOC no that is generated from step-2 in IDOC_DATA

En-queue Option as S

DB_Read Option as N

4. EDI_DOCUMENT_STATUS_SET

This Fm sets the status of your IDOC in standard.

Here you have to pass –

Document no i.e. IDOC no that is generated from step-2 in IDOC_DATA

IDOC_STATUS that is fetched from step-2 in IDOC_STATUS


5. EDI_DOCUMENT_CLOSE_PROCESS


here you have to pass document no and background as N.


Thanks and please let me know if there is any query.



To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply