0% found this document useful (0 votes)
3 views57 pages

Volume IV - Cross Application PDF

The document provides an overview of Cross Application concepts in SAP, detailing integration tools like RFC, Idoc, and ALE for data exchange between SAP and non-SAP systems. It includes practical guidance on creating logical systems, RFC connections, and Idoc types, along with examples of synchronous and asynchronous function calls. The author, Irfan, is an experienced ABAP consultant who also offers training in ABAP on S/4 HANA.

Uploaded by

syedengr12
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views57 pages

Volume IV - Cross Application PDF

The document provides an overview of Cross Application concepts in SAP, detailing integration tools like RFC, Idoc, and ALE for data exchange between SAP and non-SAP systems. It includes practical guidance on creating logical systems, RFC connections, and Idoc types, along with examples of synchronous and asynchronous function calls. The author, Irfan, is an experienced ABAP consultant who also offers training in ABAP on S/4 HANA.

Uploaded by

syedengr12
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Volume - IV

CROSS APPLICATION

By Irfan
CROSS APPLICATION

About the Author

Irfan is a professional certified ABAP consultant. Having 18+ years of


experience in the ABAP/Workflow/ABAP HR/ABAP on HANA and Migration,
throughout India all critical and production stoppage issues were handled by
him.

Irfan worked in number of MNC’s such as IBM, NTTDATA, WIPRO. The


industries he worked for are Oil and Gas, Petroleum, Automobiles, Textiles,
Pharma, Telecommunications, Retail, Chemical Industries, Electrical, etc. He was
Principal Consultant worked as SME (Subject Matter Expert) or COE (Centre of
Excellence) in an MNC.

Considering his experience in this field, he has turned his interest into
training young candidates. He has trained thousands of students by enlightening
them by his knowledge and experience. He is currently offering excellent
training services in Abap on S/4 Hana. This training provides complete course on
Abap core concepts, RICEF, Abap Oops, Cross Application, Abap new features,
Abap on Hana and Migration (ECC to S/4 Hana), Real-time Projects and complete
preparation for the interview until a person gets selected in his dream job.

P a g e 1 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

INDEX
Sl no. Concepts Page no.

1 Cross Application Concepts 3

2 RFC (Remote Function Call) 3

3 Idoc (Intermediate Document) 9

4 ALE (Application Link and Enabling) 13

5 Extension Idoc 43

P a g e 2 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Cross Application: It is an integration tool which is used to exchange (transfer)


an application data (business data) from SAP to SAP systems or SAP to Non-SAP
system which are remotely located.
Different Cross-application components are:
1) RFC.
2) Idoc.
3) ALE.
4) EDI.
5) BAPI.
6) Workflow.

1) RFC (Remote Function call): It is SAP protocol based on CPIC (Common


Programming Interface Communication) which helps the user to call and
execute the remote function of remote system to the current system.
There are different RFC’s:
i) Synchronous RFC.
ii) Asynchronous RFC.
i) Synchronous RFC: It is the process in which the calling program (main thread)
calls the remote function of the remote system and will wait for the
acknowledgement(result) to come from the remote system (child thread) then
only it executes the remaining statements of the calling program (main thread).
Logical system: It is a logical name which uniquely identifies the system in the
network.
Steps to create Logical system:
Step-1: Define Logical system: Tcode: Sale.
Step-2: Assign Logical system to client: Tcode: Sale.
Step-3: Create RFC connection: Tcode: Sale or SM59.

Navigation steps to create Logical system:


➢ Tcode: Sale.
➢ Expand Basic Setting.
➢ Expand Logical system.
➢ Click on ‘Define Logical system’ and ‘Enter’.
➢ Click on ‘New entries’ button from application toolbar and provide the
details as below:

P a g e 3 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save to your package.


➢ Go back 2 times.
➢ Click on ‘Assign Logical system to Client’.
➢ Enter.
➢ Double click on client-800.
➢ Logical system: LOGSYS800 and enter.
➢ Save (Ctrl+S).
➢ Go back 2 times.
➢ Expand communication.
➢ Click on ‘Create RFC connections’.
➢ Select ‘Abap connection’.
➢ Click on Create button and provide the details as below:

➢ Click on ‘Logon & security’ tab button.


o Client: 810
o User: Irfan
o Password: india123
P a g e 4 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Save it (ctrl+S).
➢ Click on ‘connection test’ button to check remote system connectivity
details are correct without errors.
➢ Back (f3).
➢ Click on ‘remote logon’ button to check the connectivity.

Login with Remote system (China system) and create Remote Function
module
➢ Tcode: SE37.
➢ Function module: zrfm1 and click on ‘create’ button.
➢ Function group: ZFGROUP1 (it should be already created).
➢ Short text: Remote Function module.
➢ Click ‘save’ button and enter.
➢ Click on ‘attributes’ tab button.

➢ Click on ‘import’ tab button.

➢ Click on ‘export’ tab button.

P a g e 5 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Click on ‘Exceptions’ tab button.

➢ Click on ‘Source code’ tab button.


if n2 IS INITIAL.
**Raise error
raise div_zero.
else.
r1 = n1 / n2.
ENDIF.
➢ Save (Ctrl+S) and Activate (Ctrl+F3).

Note:
o If Function group is not active, go to main program and activate it (Ctrl+f3)
then activate function module.
o Reference parameters (address parameters) are not allowed in Remote
function module; therefore, you need to make only pass by value.

Now login with current system (India) and create an executable program
where you call Remote Function of Remote system.
➢ Tcode: SE38.
REPORT ZPRG_ZRFM1.
*Example to call Remote Function synchronously

*to create varibles


data:a1 type i, a2 type i,res type i.
a1 = 10.
P a g e 6 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

a2 = 5.

*to call Remote function synchronously(RFM) with ‘Destination’ option


CALL FUNCTION 'ZRFM1' DESTINATION 'LOGSYS800'
EXPORTING
N1 = a1
N2 = a2
IMPORTING
R1 = res
EXCEPTIONS
DIV_ZERO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
message 'Division is Zero' type 'I'.
else.
write:/ 'Result=',res.
ENDIF.

ii) Asynchronous RFC: It is the process in which the calling program (main
thread) calls the remote function (child thread) of remote system and will not
wait for acknowledgement (result) to come from remote system instead it
executes the remaining statements of the calling program.
To work with Asynchronous RFC, we need to consider the following points:
1) Starting New task <task_name>: This statement is used along with call
function statement (main thread) in order to make the calling program
independent of child thread execution as the new task will take the
responsibility of monitoring child process.
2) Receive results from function: This option is used within the definition of
subroutine (form and endform) in order to receive the result from remote
function (child thread) and this subroutine is automatically called by the calling
program (main thread) when child thread execution gets completed.
3) Performing <subr> on end of task: This statement is used along with call
function statement which helps the calling program to automatically call the
subroutine once child process (remote function) gets ended.
4) Wait until <condition>: Main thread execution is very faster than child thread
execution therefore there is a possibility that all the remaining statements of
the calling program (main thread) gets executed and you may not get result from

P a g e 7 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

child thread (remote function). Therefore, to avoid this you need to explicitly
use the statement ‘wait until <condition>’.
REPORT ZPRG_ASYNCHRONOUS_RFC.
*Example to call Remote Function Asynchronously

*to create varibles


data:a1 type i, a2 type i,res type i,flag type i.
a1 = 10.
a2 = 5.

*to call Remote function Asynchronously(RFM)


CALL FUNCTION 'ZRFM1' DESTINATION 'LOGSYS800'
STARTING NEW TASK 'task1'
PERFORMING sub1 on END OF TASK
EXPORTING
N1 = a1
N2 = a2.
****Remaining statements of calling program gets executed as Asynchronous
call will not wait for result(acknowledgement)
WRITE:/ 'Hi world1'.
write:/ 'statement2'.
write:/ 'statement3'.
wait UNTIL flag = 3.
write:/ 'Result=',res.
**This subroutine(sub1) is automatically called and executed once child process
is ended.
form sub1 using task1.
RECEIVE RESULTS FROM FUNCTION 'ZRFM1'
IMPORTING
R1 = res
EXCEPTIONS
DIV_ZERO = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
message 'Division is Zero' type 'I'.
else.
write:/ 'Result=',res.

P a g e 8 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

ENDIF.
FLAG = 3.
ENDFORM.

Assignment: Create a custom database table in 810 client with mandt field as
first field and get that 810 client data of custom database table to 800 client with
RFC’s.

Idoc (Intermediate Document):


o It is a carrier of application data (business data) which is exchanged or
transferred between two SAP R/3 remote systems.
o Technically Idoc is an instance of idoc type where idoc type describes the
behaviour of idoc during runtime.
o Note: Idoc is a physical component whereas idoc type is a data type of idoc.

Structure of Idoc type: It contains two components:


1) Segment
2) Data element.

1) Segment:
o It contains group of fields.
o Standard segments begins with ‘E1’ whereas custom segment begins with ‘Z’
or ‘Y’.
o Tcode to create Segment: WE31.
2) Data element:
o It describes the technical properties of segment field such as data type and
length.
o Tcode to create Idoc type: WE30.

Structure of Idoc: It has 3 records.


1) Control record
2) Data record
3) Status record
1) Control record: It contains control information such as sender and receiver
addresses. It also contains idoc number, idoc type, message type, etc. There is
only one control record for an idoc and is stored in database table ‘EDIDC’.

P a g e 9 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

2) Data record: It contains actual application data (business data) which is


exchanged between two SAP R/2 systems. There will be multiple data records
for an idoc and is stored in database table ‘EDID4’ or ‘EDIDD’.
3) Status record: It contains the status of an Idoc. i,e acknowledgement (success
or failure). There will be multiple status records for an idoc and is stored in
database table ‘EDIDS’.

Note: Idoc is a collect of records or segments and each segment has different
structure (group of fields).

To view structure of Idoc type:


➢ Tcode: WE30.
➢ Provide the details as below:

➢ Click on ‘diplay’ (F7) from application toolbar.

Logical Message type or Message type: It identifies and interprets the idoc type
with which system generates an idoc and is transferred to receiving system.
Built-in Message types:
P a g e 10 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

1) Matmas: Material master data


2) Debmas: Customer Master data
3) Cremas: Vendor Master data
4) Cosmas: Cost center Master data.
Tcode to view Message types: WE81

The Link between Message type and Idoc type: Tcode: WE82
Message type Basic type (Idoc type) Release
MATMAS MATMAS05 740
DEBMAS DEBMAS07 604
CREMAS CREMAS06 617
COSMAS COSMAS01 30A

Navigation steps to create an Idoc type:


1) Steps to create Segment: Tcode: WE31
➢ Segment type: zseg1 and click on ‘create’ button.
➢ Short Description: group of fields.
➢ Provide the fields as below:

➢ Enter.
➢ Save to your package (ctrl+S).

2) Steps to create Idoc type: Tcode: WE30


➢ Obj. Name: zidocty1.

➢ Click on ‘Create’ button.


P a g e 11 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Provide the details as below:

➢ Enter.
➢ Select ‘ZIDOCTY1’ and click on ‘create’ button.
➢ Provide the details as below:

➢ Enter.
➢ Save (ctrl+S) to your package.

Steps to Create Custom Message type:


➢ Tcode: WE81.
➢ Click on ‘Change’ button from application toolbar and ‘Enter’.
➢ Click on ‘New entries’ button.
➢ Provide the details as below:

P a g e 12 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save it to your package (Ctrl+S).

Steps to Link Custom Message type to Custom Idoc type:


➢ Tcode: WE82.
➢ Click on ‘Change’ button from application toolbar and ‘Enter’.
➢ Click on ‘New entries’ button.
➢ Provide the details as below:

➢ Save it to your package (Ctrl+S).

ALE (Application Link and Enabling): It is a communication methodology which


is used to exchange the data from SAP to SAP and SAP to Non-SAP systems which
are remotely located.
ALE Architecture: contains two processes
1) Outbound Process (Sender)
2) Inbound Process (Receiver)
1) Outbound Process (Sending system): It is the process in which an application
data (message) is transferred from sending system to receiving system with the
help of following steps:
1) The application document (message) to be transferred is prepared and stored
in database tables.
2) An application document (message) is converted to master idoc with the help
of ALE outbound program.
3) Master idoc is then placed in ALE service layer which generates
communication Idoc’s for the respective receiving systems.

P a g e 13 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Note: Customer distribution model (CDM): It is used to identify the computer


systems (Sender and Receiver) and message (application data) exchanged
between them.

Note: Master_idco_distribute: This function module takes an input as master


idoc and control information (sender and receiver addresses) then generates
communication idocs.
4) Communication idocs are then placed in a communication layer which
generates a port or medium which carries communication idoc to receiving
systems.

P a g e 14 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Note:
o Port is a medium or channel through which communication idoc are
transferred to receivers.
o ALE Architecture uses TRFC port (Transactional Remote Function call).
o TRFC is an asynchronous process that means the sending system sends an
application data to the receiving system and will not wait for
acknowledgment (success/failure), instead it keeps on sending the message
to the receiving systems.

Inbound Process (Receiving system): It is the process in which the


communication idoc’s are received and posted to database of receiving system
with the help of following steps:
1)Communication idocs are received at the receiving system and undergoes
varies checks for data validation.
2)Communication idoc’s are placed in ALE service layer which with the help of
process code converts communication idoc to master idoc.
3)Master idoc is then converted to application document with the help of ALE
inbound program.
4)An application document is then posted to database tables from where the
user can view the data.
Note: In Inbound service layer, you have process code to which an inbound
function module is attached which receives communication idoc’s and converts
it to master idoc which is then converted to application document and posted
to database tables.

P a g e 15 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

ALE Architecture has different Scenarios:


1) To send whole application data from sending system to receiving system using
executable program.
Steps are:
Login with Sending system.
To configure Outbound Process for message type -MATMAS
P a g e 16 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

1) To configure communication settings:


a) To define Logical system: Tcode: Sale.
b) To assign Logical system to client: Tcode: Sale.
Login with Receiving system
To configure Outbound Process for message type -MATMAS
1)To configure communication settings:
a) To define Logical system: Tcode: Sale.
b) To assign Logical system to client: Tcode: Sale.
c)To create RFC connection: Tcode: Sale/SM59.
Login with Sending system
1) (c) To create RFC connection: Tcode: Sale/SM59.
2)To create customer distribution model: BD64.
3)To create port (medium): Tcode: WE21.
4)To generate outbound partner profile for message type-Matmas: Tcode:
WE20.
Login with Receiving system
2) To generate inbound partner profile for message type-Matmas: Tcode: WE20.
Login with Sending system:
Create Material: Tcode:MM01
5) To send Material: Tcode: BD10.
6) To check Idoc status in Sending system: Tcode: WE02/WE05.
Login with Receiving system
3) To check Idoc status in Receiving system: Tcode: WE02/WE05.
4) To check the data in database tables or to view application data through
Tcode: MM03.

1) To send whole application data from sending system to receiving system


using executable program.
Login with Sending system
Step-1: To configure communication settings:
i) Define Logical systems: Tcode: Sale.
➢ Expand Basic settings.
➢ Expand Logical systems.
➢ Click on ‘Define Logical system’ and enter.
➢ Click on ‘new entries ‘ button.

P a g e 17 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save (Ctrl+S).
➢ Go back 2 times.
➢ Click on ii) ‘Assign Logical system to client’ and enter.
➢ Double click on ‘800’ client.
➢ Logical system: SEND_LS.
➢ Save (Ctrl+S).

Login with Receiving system


Step-1: To configure communication settings:
i) Define Logical systems: Tcode: Sale.
➢ Expand Basic settings.
➢ Expand Logical systems.
➢ Click on ‘Define Logical system’ and enter.
➢ Click on ‘new entries’ button.

➢ Save (Ctrl+S).
➢ Go back 2 times.
➢ Click on ‘Assign Logical system to client’ and enter.
➢ Double click on ‘810’ client.
➢ Logical system: REC_LS.
➢ Save (Ctrl+S).
➢ Go back 2 times.
➢ Expand communication.
➢ Click on ‘Create RFC connections’.
➢ Select ‘ABAP Connections’.
➢ Click on ‘create button’ icon.
o RFC Destination: SEND_LS.
o Connection Type: 3.
o Description 1: ALE CONFIG.

P a g e 18 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Click on ‘Technical settings’ tab button.


o Target Host: [Link] Instance No: 50
➢ Click on ‘logon and security’ tab button.
o Client: 800
o User: Irfan
o Password: world123
➢ Save it.
➢ Note: To check connectivity click on ‘connection test’ and ‘remote logon’
buttons and check it.

Login with Sending system


1 (iii) To create RFC connection:
➢ Tcode: Sale/SM59.
➢ Click on ‘Create RFC connections’.
➢ Select ‘ABAP Connections’.
➢ Click on ‘create button’ icon.
o RFC Destination: REC_LS.
o Connection Type: 3.
o Description 1: ALE CONFIG.
➢ Click on ‘Technical settings’ tab button.
o Target Host: [Link] Instance No: 50
➢ Click on ‘logon and security’ tab button.
o Client: 810
o User: v01
o Password: india123
➢ Save it.
➢ Note: To check connectivity click on ‘connection test’ and ‘remote logon’
buttons and check it.

Step-2: To create CDM (customer distribution model).


➢ Tcode: BD64.
➢ Click on ‘change button’.
➢ Click on ‘create model view’ button from application toolbar.
➢ Opens a screen and provide the following details:

P a g e 19 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Select your Model view-CDM7.
➢ Click on ‘Add message type’ button from application toolbar.
➢ Opens a screen and provide the following details:

➢ Enter and Save (Ctrl+S).

Step-3: To create Port(medium)


➢ Tcode: WE21.
➢ Select Transactional RFC.
➢ Click on ‘create’ button.

➢ Enter.
P a g e 20 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Provide the details as below:

➢ Save it (ctrl+S).

Step-4: To generate Outbound partner profile for message type-MATMAS.


➢ Tcode: WE20.
➢ Select partner type-LS.
➢ Click on ‘create’ button from application toolbar.
o Partner No.: REC_LS.
o [Link]: LS.
➢ Save (Ctrl+S).

➢ In ‘Outbound parmtrs’ click on ‘ ’ icon (create outbound parameter).


➢ Provide the following details:

P a g e 21 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save it (Ctrl+S).

Now Login with Receiving system

Step-2: To generate Inbound partner profile for message type-MATMAS


➢ Tcode: WE20.
➢ Select partner type-LS.
➢ Click on ‘create’ button from application toolbar.
o Partner No.: SEND_LS.
o [Link]: LS.
➢ Save (Ctrl+S).

➢ In ‘Inbound parmtrs’ click on ‘ ’ icon (create inbound parameter).


➢ Provide the following details:

P a g e 22 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save (Ctrl+S).

Login with Sending system


➢ To Create Material: Tcode: MM01.

➢ Enter.
➢ Select ‘basic data’ and enter.

➢ Save it (Ctrl+S).

P a g e 23 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

To Send Material
➢ Tcode: BD10.
➢ Provide the following details:

➢ Click on ‘execute’ button (F8).

➢ Enter.

➢ Enter.

To check the status of Idoc in Sending system


➢ Tcode: WE02/WE05.
➢ Click on ‘execute’ button.

P a g e 24 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Now login with Receiving system to check the Idoc status


➢ Tcode: WE02/WE05.
➢ Click on ‘execute’ button.

Now check the material master data (Mat_ale1) in database tables: mara and
makt and also with Tcode: MM03
➢ Tcode: MM03.
➢ Material: MAT_ALE1 and enter.

P a g e 25 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Similarly check in Database tables: Mara and Makt.

To create custom idoc’s and transfer the data through custom idoc from
Sending system to Receiving system
Sending System Receiving System
1) Create Custom Database table: 1) Create Custom Database table:
SE11. SE11.
2) Create Custom Idoc. 2)Create Custom Idoc
2(a) Create Custom Segment: WE31. 2(a) Create Custom Segment: WE31.
2(b) Create Custom Idoc type: WE30. 2(b) Create Custom Idoc type: WE30.
3Create Custom Message type: 3) Create Custom Message type:
WE81. WE81.
4) To Link Custom Message type to 4) To Link Custom Message type to
Custom Idoc type: WE82. Custom Idoc type: WE82.
5) To Configure Communication 5) To copy Standard Inbound
Settings: Tcode: Sale. Function module to Custom Inbound
Function module: SE37.
6) To create Customer Distribution 6) To Define characteristics to
Model (CDM): Tcode: BD64. Custom Inbound Function module:
BD51.
7) To create Port: Tcode: WE21. 7) To define Function module as
Inbound and Link it to Custom
Message type: WE57.
8) To generate Outbound Partner 8) To create Custom Process code
Profile: Tcode: WE20. and link it to Custom Message type
and Custom Inbound Function
module: WE42.
P a g e 26 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

9) To create Custom Outbound 9) To configure Inbound process for


Program: SE38. Custom Message type
i) To Configure Communication
Settings: Tcode: Sale.
ii) To generate Inbound partner
Profile: WE20.
10) To create Custom Tcode for
Custom Outbound Program: SE93.

Login with Sending System


1) Create Custom Database table: SE11.

2) To create Custom Idoc


a) Create Custom Segment: Tcode:
➢ Tcode: WE31.
➢ Segment type: zyseg1.
➢ Click on ‘create’ button.
➢ Provide Short Description: custom segment and enter.
➢ Provide group of fields as below:

P a g e 27 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save (ctrl+S).

b) To Create custom Idoc type: Tcode:


➢ Tcode: WE30.
➢ Obj. Name: zyidoc1.

➢ Click on ‘create’ button.


➢ Description: Custom Idoc type.
➢ Enter.
➢ Select custom idoc type: ZYIDOC1 and click on ‘create’ button.

P a g e 28 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Save it (Ctrl+S).

3) Create Custom Message type:


➢ Tcode: WE81.
➢ Click on ‘change’ button and enter.
➢ Click on ‘new entries’ button.

➢ Save it (Ctrl+S).

4) To Link Custom Message type to Custom Idoc type:


➢ Tcode: WE82.
➢ Click on ‘change’ button and enter.
➢ Click on ‘new entries’ button.

➢ Save it (Ctrl+S).

5) To Configure Communication Settings: Tcode: Sale


➢ i) Define Logical systems: Tcode: Sale.
➢ Expand Basic settings.
➢ Expand Logical systems.
➢ a) ‘Define Logical system’.
➢ b) Assign Logical system to client.
➢ c) Expand communication and click on ‘create RFC connections’.
➢ Note: Please refer the above communication settings steps.

6) To create Customer Distribution Model (CDM):


➢ Tcode: BD64.
➢ Click on ‘change button’.
➢ Click on ‘create model view button’.

P a g e 29 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Provide the details as below:

➢ Enter.
➢ Select ‘CDM3’ and click on ‘Add message type’ button.

➢ Enter.
➢ Save (Ctrl+S).

7) To create Port:
➢ Tcode: WE21.
➢ Select Transactional RFC.
➢ Click on ‘create’ button.

P a g e 30 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Provide the details as below:

➢ Save it (ctrl+S).

8) To generate Outbound Partner Profile:


➢ Tcode: WE20.
➢ If partner LS already exists then expand it and select your partner ‘REC_LS’.
➢ Save (Ctrl+S).

P a g e 31 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ In ‘Outbound parmtrs’ click on ‘ ’ icon (create outbound parameter).


➢ Provide the following details:

➢ Save (Ctrl+S).

9) To create Custom Outbound Program:


➢ Tcode: SE38.
REPORT ZOUTBOUND_PROGRAM.
*Custom Outbound Program to send Employee data
*to create implicit work area
tables zyemp.

*to create work area of segment type


data wa_seg type zyseg1.
*to create internal table it_master_idoc type EDIDD to capture master idoc
data
data it_master_idoc type table of EDIDD.
P a g e 32 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

*to create work area of structure EDIDD


data wa_master_idoc type EDIDD.
*to create internal table it_comm_idoc of type EDIDC to capture communica
tion idoc data
data it_comm_idoc type table of EDIDC.
*to create work area of structure EDIDC
data wa_comm_idoc type EDIDC.
*to create work area of structure EDIDC to store sender and receiver addres
ses
data ctrl_rec type EDIDC.

*to create an input fields to enter employee number,message type and logic
al system
PARAMETERS:p_eno like zyemp-eno,
p_msgty type edi_mestyp,
p_logsys type logsys.

START-OF-SELECTION.
perform fill_ctrl_record.
perform preprare_master_idoc.
PERFORM generate_comm_idoc.

*&---------------------------------------------------------------------*
*& Form FILL_CTRL_RECORD
*&---------------------------------------------------------------------*

FORM FILL_CTRL_RECORD .

*to fill control record


ctrl_rec-mestyp = p_msgty.
ctrl_rec-IDOCTP = 'ZYIDOC1'.
ctrl_rec-RCVPRT = 'LS'.
ctrl_rec-RCVPRN = p_logsys.

P a g e 33 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

ENDFORM.

*&---------------------------------------------------------------------*
*& Form PREPRARE_MASTER_IDOC
*&---------------------------------------------------------------------*
FORM PREPRARE_MASTER_IDOC .

*to get employee master data from dbtable zyemp


select single * from zyemp into zyemp WHERE eno = p_eno.
if sy-subrc = 0.
MOVE-CORRESPONDING zyemp to wa_seg.
** To fill Master Idoc
wa_master_idoc-segnam = 'ZYSEG1'.
wa_master_idoc-sdata = wa_seg.
append wa_master_idoc to it_master_idoc.
endif.

ENDFORM.

*&---------------------------------------------------------------------*
*& Form GENERATE_COMM_IDOC
*&---------------------------------------------------------------------*
FORM GENERATE_COMM_IDOC .

*Function Module:Master_idoc_distribute:It takes input as control record(se


nder and receiver addresses and message type with idoc type) and master id
oc then generates communication idoc
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = ctrl_rec
TABLES
COMMUNICATION_IDOC_CONTROL = it_comm_idoc
MASTER_IDOC_DATA = it_master_idoc
EXCEPTIONS
ERROR_IN_IDOC_CONTROL =1
ERROR_WRITING_IDOC_STATUS = 2

P a g e 34 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

ERROR_IN_IDOC_DATA =3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
IF SY-SUBRC = 0.
* commit work.
* to find no. of records in communication idoc(it_comm_idoc)
DESCRIBE TABLE it_comm_idoc.
write:/ sy-tfill, ' Communication Idocs generated'.
else.
MESSAGE id sy-msgid TYPE sy-msgty NUMBER sy-msgno with sy-
msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.

ENDFORM.

10) To create Custom Tcode for Custom Outbound Program: SE93

Login with Receiving System


1) Create Custom database table: SE11.
2) Create Custom Idoc.
2)(a) Create Custom Segment: WE31.
2)(b) Create Custom Idoc type: WE30.
P a g e 35 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

3) Create Custom Message type: WE81.


4) To Link Custom Message type to Custom Idoc type: WE82.
Note: The database table name, its fields, its data elements, custom segment,
custom idoc type and custom message type should have the same name, data
type and length as in Sending system.
5) To copy the standard inbound function module to custom inbound function
module: Tcode: SE37.
Function Module: IDOC_INPUT_DEBIT
➢ Click on ‘copy’ button and enter.

➢ Click on ‘copy’.
➢ Enter.
➢ Click on ‘change’ button.
➢ Click on ‘source code’.
Note: Delete the entire code except function and endfunction.
FUNCTION ZIDOC_INPUT_EMP.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" VALUE(PI_XD99_USED) TYPE CHAR1 DEFAULT SPACE
*" VALUE(PI_KNVK_SPECIAL) TYPE CHAR1 DEFAULT SPACE
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC
P a g e 36 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

*" IDOC_DATA STRUCTURE EDIDD


*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
*" EXCEPTIONS
*" WRONG_FUNCTION_CALLED
*"----------------------------------------------------------------------
*ENHANCEMENT-POINT IDOC_INPUT_DEBITOR_G1 SPOTS ES_SAPLVV02CORE.

*to create implicit work area


tables zyemp.

*to create work area of segment type


data wa_segemp type zyseg1.

loop at idoc_data.
case idoc_data-segnam.
when 'ZYSEG1'.
WA_SEGEMP = IDOC_DATA-SDATA.
MOVE-CORRESPONDING WA_SEGEMP TO ZYEMP.
** TO INSERT DATA INTO CUSTOM DBTABLE -ZYEMP
MODIFY ZYEMP FROM ZYEMP.
IF SY-SUBRC = 0.
IDOC_STATUS-DOCNUM = IDOC_DATA-DOCNUM.
IDOC_STATUS-STATUS = '53'.
IDOC_STATUS-MSGTY = 'S'.
IDOC_STATUS-MSGID = 'ZMSG1'.
IDOC_STATUS-MSGNO = '010'.
IDOC_STATUS-MSGV1 = ZYEMP-ENO.
else.
IDOC_STATUS-DOCNUM = IDOC_DATA-DOCNUM.
IDOC_STATUS-STATUS = '51'.
IDOC_STATUS-MSGTY = 'E'.
IDOC_STATUS-MSGID = 'ZMSG1'.
IDOC_STATUS-MSGNO = '011'.
IDOC_STATUS-MSGV1 = ZYEMP-ENO.
ENDIF.

P a g e 37 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

APPEND IDOC_STATUS.
ENDCASE.
ENDLOOP.

ENDFUNCTION.
➢ Activate (ctrl+F3).

6) To define characteristic to inbound function module:


➢ Tcode: BD51.
➢ Enter.
➢ Click on ‘new entries’ button.

➢ Save it (ctrl+S).

7) To define function module as inbound and link it to custom message type


➢ Tcode: WE57.
➢ Click on ‘change’ button.
➢ Enter, Enter.
➢ Click on ‘new entries’ button.
➢ Provide the details as below:

➢ Save (Ctrl+S).
P a g e 38 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

8) To create Custom Process code and link it to Custom Message type and
Custom Inbound Function module:
➢ Tcode: WE42.
➢ Click on ‘change’ button.
➢ Click on ‘new entries’ button.
➢ Provide the details as below:

➢ Save (ctrl+S) to your package.


➢ Enter.

➢ Save (Ctrl+S) to your package.


➢ Back (F3).
➢ Double click on ‘Logical Message’ from left panel.
➢ Click on ‘new entries’ button.

P a g e 39 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save it (ctrl+S).

9) To Configure Inbound Process for custom message type-zymsgtyp


➢ i) To configure communication settings:
➔ i) Define Logical systems: Tcode: Sale.
➢ Expand Basic settings.
➢ Expand Logical systems.
➢ a) ‘Define Logical system’.
➢ b) Assign Logical system to client.
➢ c) Expand communication and click on ‘create RFC connections’.

10) To generate Inbound Partner profile for custom message type:


➢ Tcode: WE20.
➢ Note: If Partner already exists, we can use it and can create another
message type, here it is custom message type-zymsgtyp.
➢ Expand partner type-LS.
➢ Select ‘SEND_LS’.
➢ In ‘Inbound parmtrs’ click on ‘ ’ icon (create Inbound parameter).
➢ Provide the following details:

P a g e 40 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Save it (Ctrl+S).

Login with Sending system


To send employee data:
➢ Tcode: ZBD12.

➢ Execute (F8).
➔ Message: Send Employee data.
➔ Communication Idocs generated.
➢ Check the idoc status: WE02.

P a g e 41 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Login with receiving system:


➢ Check the idoc status: WE02.

P a g e 42 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Extension Idoc: It is the concept in which along with Standard application data
you can send or transfer custom data (‘Z’ fields) to the Receiving System.

Note: Custom fields cannot be added directly in the idoc type (DEBMAS06)
instead you need to create custom segment with custom fields and then add
this custom segment to custom idoc type.

Steps to work with Extension Idoc:


Login with Sending system
Step-1: To add custom fields to standard database table KNA1 using Append
structure.
➢ Tcode: SE11.

➢ Click on ‘Display’ button.


➢ Click on ‘Append structure’ button.
➢ Click on ‘create’ button.
➢ Append Name: ZAKNA1 and Enter.

P a g e 43 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Activate (Ctrl+F3).

Step-2: To create Custom Segment:


➢ Tcode: WE31.
➢ Segment type: zcseg1.
➢ Click on ‘create’ button.
➢ Short Description: Custom segment.

➢ Enter and Save (Ctrl+S).


➢ Enter.

Step-3: To create Extension Idoc


➢ Tcode: WE30.

➢ Click on ‘create’ button.

P a g e 44 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.

➢ Select ‘E1KNA1M’ (Segment) and click on ‘create’ button.


➢ Enter.

P a g e 45 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Save (Ctrl+S) to your package.

Step-4: To link Extension Idoc type to Standard Message type (DEBMAS) and
Basic type (Idoc type-DEBMAS06).
➢ Tcode: WE82.
➢ Click on ‘Change’ button.
➢ Enter.
➢ Click on ‘New entries’ button.

➢ Enter.
➢ Save (Ctrl+S) to your package.
Login with Receiving System
Note: Create custom fields with the same name, data type, length, custom
segment, Extension idoc same as Sending system.
Step1: To add custom fields to standard database table KNA1 using Append
structure.
➢ Tcode: SE11.
Step-2: To create Custom Segment:
➢ Tcode: WE31.
Step-3: To create Extension Idoc
➢ Tcode: WE30.
P a g e 46 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Step-4: To link Extension Idoc type to Standard Message type (DEBMAS) and
Basic type (Idoc type-DEBMAS06).
➢ Tcode: WE82.
➢ Note: All the 4 steps same as above, you need to repeat in the Receiving
system.
Login with Sending System
Note: BD12 is the Standard Transaction which is used to Send Customer master
data from Sending system to Receiving system but to send the custom segment
data (‘z’ fields data of kna1) along with standard data, you need to add custom
functionality in the standard transaction BD12 and this is achieved with the help
of enhancement.

Navigation steps to find Enhancement for Tcode: BD12


Step-1: To find program name and its package of Tcode: BD12.
➢ Tcode: BD12.
➢ Go with menu option: System->Status.
➢ Program: RBDSEDEB (double click here).
➢ Go with menu option: Goto->attributes.
➢ Package: VSV.
Step-2: To find Enhancement in BD12.
➢ Tcode: SMOD.

➢ Package: VSV.
➢ Enter.
Exit name Short text.
VSV00001 User exit Customer and vendor
distribution Receipt/issue.
VSV00002 Read filter objects for vendor master.
VSV00003 Read filter objects for customer
master.

➢ Enhancement: VSV00001.
➢ Click on ‘Display’ button.
➢ Click on ‘components’ button.

P a g e 47 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Function module Short Text


EXIT_SAPLVV01_001 Create Export of Additional Customer
Master Segments.
EXIT_SAPLVV02_001 Read and Post Additional Export
Customer Master Segments.

Note:
o EXIT_SAPLVV01_001: This Exit need to be implemented in Sending system
which will fill custom segment and send it to receiver.
o EXIT_SAPLVV02_001: This Exit need to be implemented in Receiving system
which will read custom segment and post it to standard database table
(Kna1).

Navigation steps to implement enhancement by creating project


➢ Tcode: CMOD.
➢ Project: zproj1.
➢ Click on ‘create’ button.
➢ Short text: To fill and send custom segment data.
➢ Save it (Ctrl+S).
➢ Click on ‘Enhancement Assignment’ button.
➢ Note: Enhancement already attached to a project (say: ZSUSMM).
➢ Note: If Enhancement is already implemented then you should not delete it
if it is already moved and present in Production system. you can add your
code in the existing project.
➢ Project: ZSUSMM.
➢ Click on ‘change’ button and enter.
➢ Click on ‘components’ button.
➢ Function exit:
o EXIT_SAPLKD01_00
o EXIT_SAPLKD02_00
o EXIT_SAPLVV01_00 (Double click here).
INCLUDE ZXVSVU01 (Double click here).

Include ZXVSVU01
*to create work area
data wa_zkna1 type ZAKNA1.
*to create segment work area of type segment:ZCSEG1
P a g e 48 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

data wa_seg type ZCSEG1.


*to create work area of standard segment-e1kna1m.
data wa1_e1kna1m type e1kna1m.

*TO Fill custom segment


case segment_name.
when 'E1KNA1M'.
wa1_e1kna1m = idoc_data-sdata.
* *to get custom fields data from dbtable kna1
SELECT single ZZKUNNR ZZLEGSYSNO from kna1 into wa_zkna1 where kunnr
= wa1_e1kna1m-kunnr.
** To fill idoc with custom segment
MOVE-CORRESPONDING wa_zkna1 to wa_seg.
idoc_data-segnam = 'ZCSEG1'.
idoc_data-sdata = wa_seg.
append idoc_data.

ENDCASE.
➢ Activate (ctrl+F3).

To configure Outbound Process for the message type -Debmas for Extension
idoc
Step-1: To configure Communication Settings: Tcode: Sale.
i) Define Logical system.
ii) Assign Logical system to Client.
iii) Create RFC connection.
Step-2: To create Customer Distribution Model (CDM): Tcode: BD64.
➢ Click on ‘change’ button.
➢ Click on ‘create model view’ button.
o Short text: customer distribution model.
o Technical name: CDM9.
➢ Enter.
➢ Select ‘CDM9’ and click on ‘Add message type’ button.

P a g e 49 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Enter.
➢ Save it (Ctrl+S).

Step-3: To create Port: Tcode: WE21.


➢ Select TRFC and click on ‘Create’ button.

➢ Enter.

➢ Save it (Ctrl+S).
P a g e 50 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Step-4: To create Outbound Partner profile for message type: Debmas and
Extension idoc
➢ Tcode: WE20.
➢ Note: If the partner already exists, we can use it.
➢ Expand partner type-LS and select your existing partner-REC_LS.
➢ In Outbound Parameters.

➢ Click on ‘+’ button.

➢ Save it (Ctrl+S).
Login with Receiving System
To Configure Inbound Process for the message type -Debmas for extension
idoc
Step-1: To configure Communication Settings: Tcode: Sale.
➢ i) Define Logical system.
➢ ii) Assign Logical system to Client.
P a g e 51 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ iii) Create RFC connection.


Step-2: To Generate Inbound Partner Profile for message type-Debmas
➢ Tcode: WE20.
➢ Note: If partner already exist then we can use it.
➢ Expand Partner Type-LS.
➢ Select ‘SEND_LS’.
➢ In Inbound Parameters.

➢ Click on ‘+’ button.

➢ Save it (Ctrl+S).

To Implement Enhancement by creating Project for it


➢ Tcode: CMOD.
➢ Project: zproj9 and click on ‘create’ button.
o Short text: To read and post custom segment data to database table.
➢ Save it (Ctrl+S).
➢ Click on ‘Enhancement Assignment’ button.
P a g e 52 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Note: SAP enhancement VSV00001 already belongs to project ZSUSMM.


➢ Note: If Enhancement (VSV00001) is already implemented then we can use
it as below:
➢ Tcode: CMOD.
➢ Project: ZSUSMM.
➢ Click on ‘Change’ button and ‘enter’.
➢ Click on ‘components’ button.

➢ Double click on Function Exit: EXIT_SAPLVV02_001.


o INCLUDE ZXVSVU02 (Double click on this include and hit enter).
➢ Opens a screen as below:

➢ Click on ‘yes’ button.


➢ Save it to your package.
*&---------------------------------------------------------------------*
*& Include ZXVSVU02
*&---------------------------------------------------------------------*
*to create work area of structure zakna1
data wa_zakna1 type zakna1.
*to create work areea wa_zseg1 of segment type-ZCSEG1
data:wa_zseg1 type ZCSEG1.
*to create work area of standard segment-E1KNA1M

P a g e 53 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

data wa_e1kna1m type E1KNA1M.

LOOP AT IDOC_DATA.

CaSE IDOC_DATA-SEGNAM.
WHEN 'E1KNA1M'.
WA_E1KNA1M = IDOC_DATA-SDATA.
WHEN 'ZCSEG1'.
WA_ZSEG1 = IDOC_DATA-SDATA.
MOVE-CORRESPONDING WA_ZSEG1 TO WA_ZAKNA1.
UPDATE KNA1 SET ZZKUNNR = WA_ZAKNA1-
ZZKUNNR ZZLEGSYSNO = WA_ZAKNA1-
ZZLEGSYSNO WHERE KUNNR = WA_E1KNA1M-KUNNR.
ENDCASE.

ENDLOOP.
➢ Activate (Ctrl+F3).

Login with Sending system


To Send Customer Master data
➢ Tcode: BD12.

➢ Click on ‘Execute’ button (F8).


➢ 1 master idoc.
➢ 1 communication idoc.

Check idoc status in sending system


➢ Tcode: WE02/wE05.
➢ Click on ‘Execute’ button.

P a g e 54 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

Login With Receiving System


➢ Tcode: WE02/WE05.
➢ Click on ‘Execute’ button.

To Rectify Application Document Error from Idoc


➢ Tcode: WE19.

P a g e 55 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.
CROSS APPLICATION

➢ Click on ‘execute’ button.


➢ Click on ‘Standard inbound’ button from application tool bar.

➢ Enter.
➢ Enter.
➢ Again, check Idoc Status: Tcode: WE02.
➢ Then check in Standard database table Kna1 and custom fields added to it.

P a g e 56 | 56
Abap S4 Hana Faculty: Irfan, VersionIT, [Link], [Link]: 9014629911, Ameerpet.

You might also like