Académique Documents
Professionnel Documents
Culture Documents
Brief Overview:
The purpose of this exercise is to call an RFC from SAP R/3 asynchronously. A function module
is used to send Data to XI / PI. SAP PI will then convert the data in the Standard SQL Format
and Insert the data into the JDBC database tables.
The Data from table 'ZEMP_DET' created in R/3 will be fetched by the RFC 'ZTEST_TIPS_DOI'
and sent to SAP PI. SAP PI will then insert these Records into database tables.
Prerequisites:
Implementation Steps:
A.1) Create RFC in SAP R/3 System (Send Data to SAP PI).
Go to Transaction SE37. Enter the name for functional module. Click on Create.
Create an RFC destination 'RFC_SENDER_DS' of type 'T' in the SAP R/3 system itself (Not in
XI System)
To find the Gateway Host & service: Goto Transaction SMGW -> Goto -> Parameter -> Display
For calling the RFC asynchronously use �In Background task� command.
*&------------------------------------------------------------------*
*& Report ZTEST_WEBSERVICE
*&------------------------------------------------------------------*
REPORT ztest_webservice.
* IMPORTING
* count = l_temp
TABLES
zemp_det = g_zemp_det
EXCEPTIONS
rfc_external_abort = 1
deliveryexception = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
commit work.
This Document does not contain configuration steps for creating the Business System,
Technical system, Product & Software component. It is assumed that the sender and receiver
Business Systems are already created along with corresponding Technical System, Product,
Software components. Also the Software Component is imported into Integration Repository.
In this Example,
Select the radio Button 'Import of RFC and IDoc interfaces from SAP system Permitted'
Now right click on Imported Object under your Software Component and click on Import of SAP
Objects.
Note: We don't require any Data Type, Message Type and Message Interface for Sender
side as RFC itself will be used for Sender Data Type, Message Type and Message
Interface.
In the Left Frame, Right Click on the Node Message type and select "New".
In the Left Frame, Right Click on the Node Message Interface and select "New ".
In the left frame, right click on the Message Mapping under "Message objects" tab and select
"new".
Perform the Mapping of each target field with suitable source fields as per your requirements.
Create a new Configuration Scenario or use an existing one. In our example scenario “rfc2jdbc”
will contain all our scenario objects.
B.2.2 Add Sender and Receiver Business System.
Go to your Sender Business System, right click on communication channel and select “new”.
Go to your Receiver Business System, right click on communication channel and select “new”.
Interface: ZTEST_TIPS_DOI
Namespace: urn:sap-com:document:sap:rfc:functions
Interface: ZTEST_TIPS_DOI
Namespace: urn:sap-com:document:sap:rfc:functions
Namespace: “urn:sap-com:Tipsinterface”
Namespace: “urn:sap-com:Tipsinterface”
Interface: “ZTEST_TIPS_DOI”
Namespace: urn:sap-com:document:sap:rfc:functions
Open the database table to see if the records have been inserted into tables or not.