18 - Cross Applications
18 - Cross Applications
1
Introduction
▪ SAP cross applications are the part of interfaces which helps to transfer the data
▪ With the help of cross applications, we can transfer the data from Non-SAP to SAP , SAP
▪ The various cross applications are - BAPI, RFC ,IDOC’s( ALE & EDI) etc.
2
Requirement
▪ We will migrate the employee data in SAP system using BAPI with IDOC interface.
Step3 : Migrating the employee data using business object method(BAPI with IDOC
interface) of LSMW.
3
BAPI
▪ An external system (may be as SAP system or any other system uses programming
language like JAVA or Visual Basic or C++ ) can make a call to BAPI.
5
Prerequisites for BAPI
object>_<method>.
▪ We need to provide the below mentioned things while creating the business object.
Object Name - It is used for external identification of the business object. Using this
▪ Program - Program that will contain the ABAP code of the business object.
8
Status of Business Object/Business Object Components
1. Modeled
2. Implemented
3. Released
4. Obsolete
9
Modeled
▪ This status means the business object/business object components are defined.
1
0
Implemented
▪ This status means business object/business object components have got full
functionality implemented.
▪ They can be used for internal purpose (within SAP) and for testing purpose.
1
1
Released
▪ This status means business object/ business object components have got full
▪ This will make an entry in the BAPI explorer and can be invoked from external
1
2
Obsolete
▪ This status means that business object/business object components can not be used.
1
3
Functions(Benefits) of Business Object
▪ At BO level, non-SAP systems can communicate with SAP system. This can be done using
BAPI’s.
▪ BO types acts as entry points to data and functions for an SAP System.
1
4
Tables Related to Business Object
1
5
IDOC’s - Introduction
▪ IDOC is a data container (data file) which is exchanged between two systems or two
processes.
1
6
IDOC Processes
1. Inbound process
2. Outbound process
1
7
Inbound Process
1
8
Outbound Process
▪ If the data is going out from the SAP system, it is called as outbound process.
1
9
IDOC Data Exchange Methods/Technologies
1. ALE
2. EDI
2
0
ALE
▪ If the format of data is not changing between the systems, it is called as ALE.
▪ For example - There is a purchase order in SAP system -1 and the same purchase order
data flows to other SAP system-2. It is called as ALE, as the format of data is not
changing.
2
1
ALE(Contd.)
2
2
EDI
▪ EDI is a much older term and has been used in existence much before SAP.
▪ For example - There is a purchase order in System -1, when the purchase order data
flows to another system, it converted to sales order. It is called as EDI, as the format of
data is changing.
2
3
EDI(Contd.)
2
4
IDOC Architecture
1. Control record
2. Data record
3. Status record
Imp point : The transaction code to display the IDOC is WE02 or WE05.
2
5
Control Record
▪ It provides the control information such as IDOC type (basic type), message type, port,
▪ The value 1 is for outbound IDOC and the value 2 is for inbound IDOC.
2
6
Data Record
2
7
Status Record
▪ The values 1-42 are for outbound IDOC status and 50-75 are for inbound IDOC status.
2
8
Message Type
2
9
IDOC Type
▪ Example - While transferring employee data , empid empname are the examples of
IDOC type.
3
0
Difference between IDOC Type and Message Type
▪ IDOC type specifies the structure of the data whereas message type specifies the
3
1
Segments
3
2
IDOC(ALE) Interface for BAPI
3
3
IDOC Settings - Port
▪ Port defines the technical link between sender and receiver system.
TRFC port
File port
3
4
TRFC Port
▪ Here we define the ports for RFC destinations created using SM59.
3
5
File Port
▪ While using file port we can specify the directory where the IDOC file should be placed.
▪ The other system or the middleware will pick up the file from here.
3
6
IDOC Settings - Partner Profile
▪ In the partner profile of a partner , we maintain the parameters that are necessary for
3
7
Logical System
communication system.
3
8
Process Code
▪ The process code contains the details of the function module that are used for IDOC
processing.
3
9
Inbound Process Code
4
0
Outbound Process Code
4
1
Test Tool for IDOC(WE19)
▪ WE19 is the transaction code for the test tool for IDOC.
Imp point : Do not use WE19 for reprocess purpose, It is only for testing and debugging
purposes.
4
2
Reprocessing of Error IDOC’S(BD87)
4
3
Transaction Codes and Tables Related to BAPI
4
4
Transaction Codes and Tables Related to BAPI-IDOC Interface
4
5
Transaction Codes Related to IDOC’s
▪ Transaction code for mapping of IDOC type & message type - WE82
▪ Transaction code for assignment of function module to message type & IDOC type -
WE57
4
7
Tables Related to IDOC’s
4
8
Other Transaction Codes
4
9
RFC - Introduction
▪ As the name itself is suggesting, with the help of RFC we can connect with the external
▪ In all SAP systems, CALL FUNCTION represents an integral part of ABAP language.
▪ The statement CALL FUNCTION executes a function module in the same system.
▪ Existing function modules can be executed using an RFC from a remote system.
5
0
RFC - Introduction(Contd.)
In the above syntax - CALL FUNCTION = keyword, ZFM_ORDER = name of the function
module, DESTINATION = keyword, A4H = name of the source system in which function
module is created.
5
1
Difference Between BAPI and RFC
▪ BAPI = RFC function module + business object. The external system connects with the
business object and that business object calls the RFC function module whereas in the
case of RFC, external system directly connects with the RFC Function Module.
▪ BAPI is based upon OOPS concepts whereas RFC does not follow OOPS concepts.
5
2
Pre-Requisites for RFC
▪ RFC function module is just like a function module created in the transaction SE37, with
5
3
Steps to Send Materials from one SAP Client to Another SAP Client
▪ Below are the steps to send materials from one SAP client to another SAP client using
ALE.
3. Create and check the RFC connection using transaction code SM59.
5
4
Steps to Send Materials from one SAP Client to Another SAP Client
5. In the source client , create a partner profile for receiver client using transaction code
WE20.
6. In the receiver client , create a partner profile for source client using transaction code
WE20.
7. Create a distribution model using the transaction code BD64 - The purpose of
distribution model is to describes the ALE message flow between logical systems.
5
5
Steps to Send Materials from one SAP Client to Another SAP Client
5
6
Program - RBDMIDOC
▪ The program RBDMIDOC is used to generate the IDOC’s for a message type using the
change pointers.
Imp Point : In real projects, we schedule this program in the background which runs at
regular intervals.
5
7
Change Pointers Technique
▪ For the purpose of distributing data via ALE to other systems, the change pointers
technique is used.
▪ It’s purpose is used to distribute the data changes made in one SAP client to other SAP
clients.
▪ Change document technique is used to track the changes made to that document.
5
8
Change Pointers Technique(Contd.)
Imp point : Change document technique is used to track the changes made to that
document whereas change pointer technique is used to distribute that changes to other
clients.
5
9
Configuration Steps for Change Pointers
3. Specify the fields for which change pointers are to be written - Transaction code : BD52
6
0
Configuration Steps for Change Pointers
1. Enable change pointers globally - Transaction code : BD61. This option enables the
change pointer process globally. Make sure that the flag is checked.
2. Enable change pointers for a message type - Transaction code : BD50. This setting is
required for activating change pointers for a specific message type. Make sure that the
6
1
Configuration Steps for Change Pointers(Contd.)
3. Specify the fields for which change pointers are to be written - Transaction code : BD52.
SAP already provided a list of fields for which change pointers are written. If we are
satisfied with the standard set of fields, we can skip this step. If we want to add new
fields, we must add entries for the required fields. If we don’t want to generate the
Idoc’s for changes to a particular field, we can remove it from the list.
6
2
Thank You
6
3