Skip to end of metadata
Go to start of metadata

Scenario : RFC to JDBC:

In this scenario RFC will make synchronous call to JDBC by passing your group ID and retrieving the names of group member.

Integration Repository Configs
1. This scenario assumes that basic settings such as Software Component and Namespaces are already created according to your group. If you can not locate your software component or Namespace please import this.

Before we go to XI for configuration it requires a bit of settings in another SAP system. Since this requires a function module created in SAP system we will have to login to SAP system for creating the FM. To avoid time delay RFC function module is already created in R/3 system.
IMP NOTE: RFC and IDocs are special interfaces which act as interface in SAP. We don't require defining any data types, Message Types or Message Interface for them. They themselves act as Interface.

Data Type:
1. Expand the Integration Objects and go to the Data Types.
2. Create the data type for inbound interface.
a. XI_JDBC_In_03_XX
i. Insert
1. XI_Synch (this is table name which we are going to reference).
a. action (This is attribute category node which is attached to XI_Synch node.)
i. Type: String
ii. Category: Attribute
iii. Occurrence: Required
b. access
i. GroupID:
1. Type: String
2. Occurrence: 1
ii. Names
1. Type: String
2. Occurrence: 1
c. Key1
i. GroupID:
1. Type: String
2. Occurrence: 1

3. Create one more data structure for getting the response.
a. XI_JDBC_In_03_XX_response (Make sure that you are following the naming standard. Please don't alter the naming standard. Response data type name will have same name as input message and _response attached to it)
i. row (0..u) (make sure that "r" is small letter)
1. GroupID
a. Type: String
b. Occurrence: 1
2. Names
a. Type: String
b. Occurrence: 1
Note: "row" node will contain same nodes from "access" from input data type.
Note: Please create your structure strictly according to following structure otherwise JDBC adapter will throw unexpected errors during run time. JDBC only supports communication in certain format according to the scenario. Here preparing scenario for synch communication and we are going to select records from the SQL Table. After creating the structure it should look like following screen. We need to have a response structure as well for getting the selected records. Even this response structure has to be created in certain format.

Message Type:
1. Go to Message Type Option and right click to create a new message type with name XI_JDBC_In_03_XX by using XI_JDBC_In_03_XX data type.
2. Similarly create one more message type XI_JDBC_In_03_XX_response using Data type XI_JDBC_In_03_XX_response
3. Save newly created message type.

Message Interface
1. Create new Message Interface XI_JDBC_Synch_In_00
2. Select mode as Synchronous and direction as Inbound interface.
3. Since this is synchronous interface it will as for 2 message types.
a. Select XI_JDBC_In_03_XX as input message
b. Select XI_JDBC_In_03_XX_response as output message
4. Save the interface definition.

Message Mapping:
1. Go to Mapping Objects and go to Message Mapping section. Right click and create a new mapping
2. Use name as ZXI_00_Req_To_XI_JDBC_In_03_00.
3. Select ZXI_00 as source message type.
4. Select XI_JDBC_In_03_00 as target message type.
5. Map GroupID from source message to key1-GroupID.
6. Map a Constant value to all the nodes under "access" node. This will make sure that target message just have node created after mapping is executed.
7. Save the Message mapping.

Since it is a synchronous call, we need to have one more mapping for response which we are getting from SQL Server system.

Map XI_JDBC_In_03_XX_response to XI_00.response.

Note: Make sure that JDBC response is mapped to RFC response and not the other way round.

Interface Mapping:

1. Go to Mapping Objects and create a new Interface Mapping.
2. Use ZXI_XX_To_XI_JDBC_Synch_In_XX Interface mapping name.
3. Select Source interface as ZXI_XX and Target interface as XI_JDBC_Synch_In_XX
4. Click "Read Interfaces"
5. Select ZXI_00_Req_To_XI_JDBC_In_03_00 as the message mapping name for the "Request" tab and XI_JDBC_Synch_In_00_response_To_ZXI_00 as the "response" message mapping.

Note: Please activate all the changes. Try to activate all the created or changed objects in one go. If you are having trouble in activating the objects try activating it one by one. While activating individual objects make sure that you are following the sequence Fault Message Types, Software Component (if changed) Data Type, Message Type, Message Interface, Message mapping and Interface Mapping. If not activated, these objects will not be visible in directory while doing the configuration.

Integration Directory changes

Login to Integration Directory.

Check if we have Business System XXXXXX available in the system (Ask instructors if you don't have the business system available).

1. Make sure that you have you business scenario in the tool. Locate XI_WWxx_XX scenario and check all your objects created in scenario exist there.

2. Make sure that YYYYYY business system is assigned to your scenario.

3. Create new RFC communication channel RFC_Sender_PRP_XX under YYYYYY with following properties:

4. Go to the "Service without Party" and locate BS_FILE_SERVER business system. Right click on this and assign this business system to your scenario.

Note: Make sure that you are under OBJECT tab Right click on the business system and select appropriate option from the menu. Please don't select "Assign business system" option.

5. Go to the Business XXXXXX and validate if you have the communication channel with following properties:
a. Name: JDBC_Receiver_LocalSystem_XX
b. Make sure that you are giving correct values in JDBC driver related information. I recommend that you copy paste these values from this document instead of typing manually to avoid the typing errors.
Protocol: JDBC 2.0
JDBC Driver:
Connection: jdbc:microsoft:sqlserver://XXXXXX:1433;DatabaseName=XI
User Name:

Receiver Determination

1. Create a new receiver determination by selecting YYYYYY as source system, ZXI_XX as source interface.
2. Select XXXXXX as the receiver system and save the setting.
3. Go to "Configure Overview of Receiver Determination" tab and create new interface determination.
4. Receiver Interface: XI_JDBC_Synch_In_00
5. Interface Mapping: ZXI_00_To_XI_JDBC_Synch_In_00
6. Receiver Agreement: JDBC_Receiver_LocalSystem_XX
7. Sender Agreement: RFC_Sender_PRP
8. Right click under interface determination option and select the "Create New Specific" option. You can select the inbound interface from the new screen.
Activate all in ID.

Ready for testing. Drop the file after some time file will be deleted from the source directory and new file will be created in target directory.