|
Creating and Sending an IDoc |
|
|
|
|
Written by Kevin Wilson
|
|
Tuesday, 13 February 2007 |
|
Step by step guide through the code....
*** STEP 1 - Create IDoc internal table entries
*** STEP 2 - Call the function to distribute the IDoc CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' EXPORTING master_idoc_control = s_edidc obj_type = 'BUS2032' TABLES communication_idoc_control = itab_edidc master_idoc_data = itab_edidd EXCEPTIONS error_in_idoc_control = 1 error_writing_idoc_status = 2 error_in_idoc_data = 3 sending_logical_system_unknown = 4 OTHERS = 5.
*** STEP 3 - Update IDoc status - If you wish to send additional status messages through REFRESH: itab_edids. itab_edids-status = c_idoc_status_ok. itab_edids-msgty = c_info_msg. itab_edids-msgid = c_msgid. itab_edids-msgno = c_msgno. itab_edids-msgv1 = itab_edidc-docnum. itab_edids-msgv2 = s_edidc-sndprn.
Related Items:
|