Custom Idoc Outbound
Custom Idoc Outbound
OUTBOUND process
Powered by Translate
TO Process IDOCS the following TCODES will be used.
►► 2013 (3)
Logical System Names SALE
►► 2012 (15)
Setup RFC destinations SM59 ▼▼ 2011 (36)
►► October (4)
Port Destinations WE21
►► September (2)
In Source system:
►► July (7)
Segment Creation WE31 ▼▼ June (10)
IDOC Step-by-Step. INBOUND
Basic IDOC Type Creation WE30 process
Followers
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 1/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
Followers (28) Next
sanju
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 2/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
Go to TCODE WE21.
ð Go to TCODE SE11.
Go to TCODE WE31.
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 3/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
Go to TCODE WE30
Go to TCODE WE81.
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 4/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
Go to TCODE WE82
Go to TCODE BD64
Specify description of model view and technical name in dialog box and press continue.
Select your model view and click on Edit menu -> Add Message type
In dialog box specify the sender, receiver, message type and click on continue.
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 5/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
Note: Dont create in client 812, because we are using the same
server. It will be automatically created in the client 812. check
bd64 in client 812.
Click on Back button 2 times, it will take back to Distribution Model screen.
Go to TCODE WE20
In displayed screen select the partner system in left side tree under Partner Type LS.
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 6/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
==================================================
==
REPORT ZDEMO_IDOCSEND.
TABLES: zdemo_material.
***START-OF-SELECTION
START-OF-SELECTION.
PERFORM GENERATE_DATA_RECORDS.
PERFORM GENERATE_CONTROL_RECORD.
PERFORM SEND_IDOC.
*&---------------------------------------------------------------
------*
*& Form GENERATE_DATA_RECORDS
*&---------------------------------------------------------------
------*
* text
*----------------------------------------------------------------
------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------
------*
FORM GENERATE_DATA_RECORDS .
SELECT * FROM zdemo_material
INTO TABLE T_zdemo_material
WHERE BUKRS IN S_BUKRS.
IF SY-SUBRC NE 0.
MESSAGE E398(00) WITH 'No Company code Found'.
ENDIF.
PERFORM ARRANGE_DATA_RECORDS.
ENDFORM. " GENERATE_DATA_RECORDS
*&---------------------------------------------------------------
------*
*& Form GENERATE_CONTROL_RECORD
*&---------------------------------------------------------------
------*
* text
*----------------------------------------------------------------
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 7/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------
------*
FORM GENERATE_CONTROL_RECORD .
* S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
S_CTRL_REC-MESTYP = C_MESTYP. "Message type
S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
S_CTRL_REC-RCVPRN = C_LOGSYS. "Partner number of receiver
* S_CTRL_REC-SNDPRT = C_SNDPRT. "Sender Partner type
* S_CTRL_REC-SNDPRN = C_SNDPRN. "Sender Partner Number
ENDFORM. " GENERATE_CONTROL_RECORD
*&---------------------------------------------------------------
------*
*& Form SEND_IDOC
*&---------------------------------------------------------------
------*
* text
*----------------------------------------------------------------
------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------
------*
FORM SEND_IDOC .
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = S_CTRL_REC
* OBJ_TYPE = ''
* CHNUM = ''
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC
MASTER_IDOC_DATA = T_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK.
LOOP AT T_COMM_IDOC.
WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
ENDLOOP.
ENDIF.
ENDFORM. " SEND_IDOC
*&---------------------------------------------------------------
------*
*& Form ARRANGE_DATA_RECORDS
*&---------------------------------------------------------------
------*
* text
*----------------------------------------------------------------
------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------
------*
FORM ARRANGE_DATA_RECORDS .
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 8/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
LOOP AT T_zdemo_material.
S_ZSEGMENT-MANDT = T_zdemo_material-MANDT.
S_ZSEGMENT-BUKRS = T_zdemo_material-BUKRS.
S_ZSEGMENT-BUTXT = T_zdemo_material-BUTXT.
S_ZSEGMENT-ORT01 = T_zdemo_material-ORT01.
s_ZSEGMENT-ADRNR = T_zdemo_material-ADRNR.
T_EDIDD-SEGNAM = C_ZSHSTUSEG.
T_EDIDD-SDATA = S_ZSEGMENT.
APPEND T_EDIDD.
CLEAR T_EDIDD.
ENDLOOP.
ENDFORM. " ARRANGE_DATA_RECORDS
====================================================
Now execute the program, and specify the range of records to transfer
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 9/10
6/30/2019 SAP Sample Programs: IDOC Step-by-Step. OUTBOUND process
====================================================
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.
Publish Preview
sapsamplepro.blogspot.com/2011/06/idoc-step-by-step-outbound-process.html 10/10