• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

riyaz.net

Tech Tips and Tutorials for SAP Professionals and Bloggers

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure
You are here: Home / SAP / File-to-File scenario using J2SE Engine

File-to-File scenario using J2SE Engine

April 29, 2009 by Guest Authors

Before starting this document please refer the topic Working with PlainJ2SE Adapters which I posted earlier. This article gives an idea on how PlainJ2SE Adapters work with XI.

  • Step 1: Steps in PI server
  • Step 2: Configuring Plain J2SE File Adapter for both Sender and Receiver.
  • Step 3: Test the Scenario.

Step1: Steps in PI (XI)

Create Data types, Message Types, Message Interfaces, Message Mapping and Interface Mappings in IR.

a) Create Data type:

Data type

b) Create Message type:

Message type

c) Create Message Interfaces for Outbound and Inbound Interfaces

Outbound Message Interface

Inbound Message Interface

d) Create Message Mapping:

Message Mapping

e) Create Interface Mapping:

Interface Mapping

Now Save and activate all the objects in IR. Then to go to the Integration Directory and create a Configuration Scenario and also Create Business Services.

Steps in ID:

  • Create a communication Channel for the Receiver Business Service. And No need of configuring Sender communication Channel
  • No Sender Agreement
  • Create Receiver Agreement
  • Create Receiver Determination
  • Create Interface Determination

a) Create a communication Channel for the Receiver Business Service

  • Adapter: XI
  • Type: Receiver

Communication Channel

From the above screenshot Target Host will be the IP address of the Target system to which PI has to send. Service Number can be anything. Path also can be anything. But while configuring the PlainJ2SE file_receiver adapter, it’s better to give the path for XI.httpService as mentioned below.

XI.httpService=http://<TargetIPAddress>:<Service Number>/file/test

Authentication Data:

  • Authentication Type: Use Logon Data for Non-SAP System
  • User Name: sap (which is used to logon the PlainJ2SE Adapters)
  • User Password: init

b) No Sender Agreement

c) Create Receiver Agreement

Receiver Agreement

d) Create Receiver Determination

Receiver Determination

e) Create Interface Determination

Interface Determination

Finally configured steps in ID with colored:

ID Steps

Step2: Configuring Plain J2SE File Adapter for both Sender and Receiver

a) First let’s Configure Sender Adapter: file_sender2is

Sender Adapter Configuration 

Below mentioned Parameters are Mandatory while configuring a Sender PlainJ2SE Adapter.

classname=com.sap.aii.messaging.adapter.ModuleFile2XMB
version=30
##Here we are using a Simple Row Conversion
mode=FILE2XMBWITHROWCONVERSION
## Integration Engine address and document settings (example, see docu)
XI.TargetURL=<Integration Engine URL of XI to which PlainJ2SE Adapter need to connect>
XI.User=<XI UserId>
The user must have the authorizations of group SAP_XI_APPL_SERV_USER
On the Integration Server.
XI.Password=<Password>
XI.Client=<XI Client >
XI.Language=EN
#XI.SenderParty=<Sender Party>
XI.SenderService=<Sender Business Service>
XI.Interface=<Sender Message interface>
XI.InterfaceNamespace=<Namespace>
#XI.ReceiverParty=<Receiver Party>
XI.ReceiverService=<Receiver Business Service>

Configuration

The below mentioned parameters have to mention according to our requirement. Here we are doing with row conversion.

Configuration

After Configuring Adapter follow these steps click Store Configuration Data next click Restart and then click Reload.

If Adapter is working fine then it should be in Green status. Check View log if it shows Red.

b) Configure the Receiver Adapter: file_receiver

It’s better to give the path for XI.httpService as mentioned below.

XI.httpService=http://<TargetIPAddress>:<Service Number>/file/test

Note: TargetIPAddress and Service Number are the same details that we mentioned in Receiver XI Communication Channel. So that our XI Adapter will find the Target system depending upon these details.

Configuration

After Configuring Adapter follow these steps click Store Configuration Data next click Restart and then click Reload. If Adapter is working fine then it should be in Green status. Check View log if it shows Red.

Step3: Test the Scenario

Place a file with name PlainJ2se.txt in Input folder After the poll interval of 30secs as we mentioned in sender file adapter it should be archived in Archive folder and should place the target file name PlainJ2se<add timestamp>.txt in Output directory.

Check in the View log of sender File plain J2SE after placing a file in Input folder.

View Log

The above screenshot shows the successful process done by the Sender adapter as it was picked the file from Input folder sent to Integration Engine and also archived to D:/Archive.

Archive

Now check the View log of Receiver File J2SE Adapter.

View Log

This screenshots shows that Receiver FileJ2SE was also processed successfully.

Output

Check the Tcode: SXMB_MONI in PI System.

SXMB_MONI Result

Kalyan Chakravarthy is a PI Consultant with Fujitsu Consulting India Ltd. Prior to this, he has worked with Syntel and Xansa.

Filed Under: SAP Tagged With: SAP PI

About Guest Authors

Primary Sidebar

Popular Guides

  • Dropbox Tutorial
  • CDN Setup Guide
  • Blog Design Tips
  • Optimize RSS Feed
  • Create Twitter App
  • Short URLs
  • Password Protect Folders
  • Time Management
  • ALE IDocs Tutorial
  • SAP PI Starter Kit
  • SAP PI Tips
  • Ergonomics

Popular Topics

  • Home
  • WordPress
  • Tips & Tricks
  • Internet
  • SAP
    • SAP PI
    • SAP ABAP
  • Personal Finance
  • Health & Fitness
  • Travel & Leisure

About Riyaz

riyaz.net is a popular technology site with how-to guides, tips and tutorials on personal technology, blogging, social media, web apps, personal finance and SAP.

riyaz.net was launched way back in 2005 by web designer, blogger and SAP Consultant Riyaz Sayyad from Pune, India. Over the years the site has grown into a full featured online community with thousands of visitors daily from around the world. Read more.

Copyright © 2025 · riyaz.net