SAPTechnical Idoc & Ale
SAPTechnical Idoc & Ale
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
On both sides:
Logical System Names SALE
Setup RFC destinations SM59
Port Destinations WE21
In Source system:
Segment Creation WE31
Basic IDOC Type Creation WE30
Message Type Creation WE81
Assign Message Type To Basic IDOC Type
WE82
Distribution Model BD64
Writing Report Program SE38
Partner Profile WE20
Message control NACE
Check IDOCs WE02, WE05
In Destination System:
Creating FM SE37
Assign FM to Logical Message WE57
Define I/P method for Inbound FM BD51
Create Process Code WE42
Generate Partner Profile BD64
IDOC processing in the same instance
of R/3 Clients.
For example two clients in the same R/3
instance.
Client 900.
Client 800.
To transfer the data between two clients
the table structures and their data types
should be match.
In this example, Client 900 is Source
system, and Client 800 is destination
system.
In Client 900 I have created a customized
table and inserted some records.
In Client 800 I have created only table.
Common Steps in Both Clients:
Creating the Logical System Names and
Assigning to Clients:
Go to TCODE SALE.
IMG path IDoc Interface / Application Link
Enabling (ALE) -> Basic Settings ->
Logical Systems -> Define Logical System
ABAP
Adobe Forms
ABAP-HR
TM
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
Click on Back
Click on Remote Logon Button
Click on Save.
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
TM
TM
Others
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
...Previous
Assign Message Type to Basic IDOC Type:
Go to TCODE WE82
Click on Display / Change Button
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
Click on Back.
Note:
Here the Release version you can find in this way
Creating Model View and Distributing and
Generating Partner profile:
Go to TCODE BD64
Click on Display/ Change button
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
TM
BSP
Business Objects
Business Workflow
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
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 SYMSGV3 SY-MSGV4.
ELSE.
COMMIT WORK.
LOOP AT T_COMM_IDOC.
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
TM
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
*"
SERIALIZATION_INFO STRUCTURE
BDI_SER
*" EXCEPTIONS
*"
WRONG_FUNCTION_CALLED
*"------------------------------------------------------------------* Include File containing ALE constants
INCLUDE MBDCONWF.
TABLES : ZSTUDENTS.
DATA : W_ZSHSTUSEG LIKE ZSHSTUSEG.
DATA : T_ZSTUDENTS LIKE ZSTUDENTS
OCCURS 0 WITH HEADER LINE.
WORKFLOW_RESULT = C_WF_RESULT_OK.
LOOP AT IDOC_CONTRL.
IF IDOC_CONTRL-MESTYP NE
'ZSHSTUDMT'.
RAISE WRONG_FUNCTION_CALLED.
ENDIF.
* Before reading a new entry, clear application
buffer
LOOP AT IDOC_DATA WHERE DOCNUM EQ
IDOC_CONTRL-DOCNUM.
W_ZSHSTUSEG = IDOC_DATA-SDATA.
MOVE-CORRESPONDING
W_ZSHSTUSEG TO T_ZSTUDENTS.
INSERT INTO ZSTUDENTS VALUES
T_ZSTUDENTS.
ENDLOOP.
UPDATE ZSTUDENTS FROM
T_ZSTUDENTS.
IF SY-SUBRC EQ 0.
IDOC_STATUS-DOCNUM =
IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-MSGTY = 'I'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '004'.
IDOC_STATUS-MSGV1 = T_ZSTUDENTSZSTUID.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
ELSE.
IDOC_STATUS-DOCNUM =
IDOC_CONTRL-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = 'YM'.
IDOC_STATUS-MSGNO = '005'.
IDOC_STATUS-MSGV1 = T_ZSTUDENTSZSTUID.
APPEND IDOC_STATUS.
CLEAR IDOC_STATUS.
WORKFLOW_RESULT =
C_WF_RESULT_ERROR.
RETURN_VARIABLES-WF_PARAM =
'Error_Idocs'.
RETURN_VARIABLES-DOC_NUMBER =
IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
CLEAR RETURN_VARIABLES.
ENDIF.
ENDLOOP.
ENDFUNCTION.
Click on Save and Activate.
Assign FM to Logical Message:
Go to TCODE WE57
Click on Display / Change button.
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
TM
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe
ABAP
Adobe Forms
ABAP-HR
ALE & IDocs
ALV
BAPI
BASIS
BSP
Business Objects
Business Workflow
CRM NEW
LSMW
SAP Script/Smart Forms
BI/BW
eXchange Infrastructure (XI)
Enterprise Portals (EP)
eCATT
Object Oriented Programming
SAP Query
Userexits/BADIs
WebDynpro for Java/ABAP
Others
TM
TM
What's New?
Contribute?
Sample Specs
What's Hot?
Web Dynpro for ABAP Tutorials
Join the Mailing List
Enter name and email address below:
Name:
Email:
Subscribe Unsubscribe