Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
File to JDBC Adapter using SAP XI
Author Anirban Ghatak
Version 1.0
Introduction:
The document deals with the integration scenario involving File to JDBC adapter communication using SAP XI. File adapter is used to read the data from xml source. JDBC adapter is used to push the data to Database.
Prerequisites:
a> Database table with the following fields:
EMPID: varchar 1
EMPNAME: varchar 1
EMPAGE: Integer
FLAG: Char 1
b> Two business systems are required to be configured of type 3rd party (in SLD). ‘Service’ parameter to be set as ‘Service without party’.
c> FTP configuration should be in place.

Configuration steps in Integration Repository
1> Create two data types: data_filesender and data_jdbcreceiver as shown in the following figure.

Similarly the second data type as shown in the following figure:

2> Create two Message type for the data types we created in the step 1 as: data_filesender and data_jdbcreceiver. Figure below is the actual screenshot as a sample.


And similarly the second message type.

3> Create the Message Interface: mi_file and mi_jdbc as shown below in the figure:

For the File system in DEFINITION tab check radio button Inbound for Category. Mode value should be Asynchronous. For the receiver, Category should be Inbound and Mode should be Asynchronous.

4> Now create the Message Mapping as mm_file_jdbc, make sure the table is created prior to this and the action field is hard coded with “insert” value under CONSTANT function. Please refer to the figure below.


5> Now create the Interface Mapping mi_file_jdbc. We make sure to select the correct mapping Program.


Configuration steps in Integration Depository
1>As a first step create two Communication channel,
cc_file_sender and cc_jdbc_receiver as shown in the figure below. Make sure that the Service selected is of 3rd party in system landscape directory.
Set Processing Mode value as delete (this option will delete the file once it is read by SAP XI adapter) and transfer mode as binary.

Similarly configure the Receiver channel. Use the JDBC 2.0 Transport protocol. Make sure that connection parameter has your local machine name.

2> Now create the Sender Agreement connecting to the channel of sender as shown in figure below:

Now create the Receiver Determination as shown in the figure below:

3> Configure the Interface Determination as shown in the figure below:

4> As a last step create the Receiver Agreement as shown in the figure below:


This completes configuration with Integation Repository and Intregation Directory.

Testing:
• Log in to Adapter monitor and check for the File adapter and Jdbc adapter.The status should be green.
• Insert the source xml in the root folder path of the FTP adapter that you used. It will be detected and deleted according to the time set in your polling interval.
• Check message and flag status in SXMB_MONI. A chequered flag should be present.
• Log in to SQL Studio and look for your table under the DBA path (or the path you used to create the table), and right click->show content for the values, you should get the new values as shown in the slide below:

It should reflect the new values in the tuple of the table that we have created .This is shown in the slide below.


That’s the &#146File-xi-Jdbc scenario&#146.
12 Comments