SAP Inbound IDoc Step by Step
SAP Inbound IDoc Step by Step
SAP Inbound IDoc Step by Step
This blog will give complete overview about Inbound IDocs in SAP step by
step. Middleware can be anything like PI, BizTalk and so on. SAP Inbound
IDoc will cover end to end IDoc type, Message type, Process code, Posting
function module and so on. SAP Inbound ALE IDoc step by step.
Posting(MB1A).
1) Before getting into IDoc level we need to understand the source from
external system let us take our external system is BizTalk server. So our
communication will be BizTalk to SAP. First we need map the BizTalk fields
LSMW.
Below the step will give complete step by step in custom inbound IDoc
implementation.
Note : We need to release the custom IDoc type otherwise our external
WE82
Step 5) Registering inbound function module using transaction code
BD51
FUNCTION zfmidocgrn.
*"--------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" EXPORTING
CALLTRANS
*" TABLES
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*"--------------------------------------------------------------------
CASE idoc_data-segnam.
WHEN 'E1BP2017_GM_CODE'.
lwa_gm_code = idoc_data-sdata.
WHEN 'E1BP2017_GM_HEAD_01'.
lwa_gm_header = idoc_data-sdata.
gm_header-PSTNG_DATE = sy-datum.
WHEN 'E1BP2017_GM_ITEM_CREATE'.
lwa_gm_item = idoc_data-sdata.
ENDLOOP.
EXPORTING
goodsmvt_header = gm_header
goodsmvt_code = goodsmvt_code
IMPORTING
goodsmvt_headret = head_ret
TABLES
goodsmvt_item = gt_item
return = return.
IF head_ret IS INITIAL.
ENDLOOP.
EXIT.
ELSE.
lwa_return '53'.
EXPORTING
wait = 'X'.
ENDIF.
ENDFUNCTION.
0 Mass processing
1 Individual input
Step 6) Linking Message type, IDoc type and Posting function module
Step 7) Create Process code and assign the posting function module
We could see now the screen with Control records and data
records(segments)
Click control record section and fill the necessary details
This field defines which system receives the IDoc. RCVPOR is a mandatory
field.
This field contains the partner number of the receiver. The partner
and receiver.
Using this code, the IDoc interface determines the function module which
checks whether the basic data of a partner exists. The check is carried out
This field defines which system has sent the IDoc. SNDPOR is a mandatory
field.
The sending system can be an EDI subsystem or another SAP System (R/2
The field contains the partner number of the sender. The partner number
and receiver.
Using this code, the IDoc interface determines the function module which
checks whether the basic data of a partner exists. The check is carried out
Message Type
fields belong to the key fields in the partner profiles, which are used, for
not maintained (e.g. in the case of a control record from Release 2.1, in
which MESTYP did not exist), the IDoc Interface uses the value from
We could see the IDoc control records, IDoc data records and IDoc status
records.
I hope you all are understood the concept of end to end Inbound IDoc
posting.
idoc-step-by-step/#sthash.UwSNnDqo.dpuf