Skip to end of metadata
Go to start of metadata
Business Requirement

Consider a scenario where Legacy system wants to communicate with a BAPI using XI. In this scenario, we retrieve the details of a company from the RFC based on the company id in one Sender File and receive the details in another File (FILE-RFC-FILE).

General Approach

We can achieve this by using Business Process Management (BPM) .For this we need to create one Integration Process object in Integration Repository. Where we can define the processes. Also we need to create one Integration Process in Integration Directory. It will works as business service, takes the data from source system, and retrieves data from the BAPI based on the source file. Then it will send data to the appropriate system. For this we need to configure three Receiver Determinations, three Interface Determinations, one Sender Agreement and two Receiver Agreements.

New Approach with SP 19 on XI 3.0 and SP 10 on PI 7.0

Modules will enhance the functionality of the adapter. We can achieve above scenario by using modules without using BPM. For this we need to create Outbound and Inbound Interfaces as synchronous in Integration Repository. In Integration Design we need to add modules in sender file adapter. Here we will configure one Receiver Determination, one Interface determination, One Sender Agreement and One Receiver Agreement.

The following modules we need to add sender file communication channel.

Number - ModuleName - Type - ModuleKey
1- AF_Modules/RequestResponseBean - Local Enterprise Bean - 1
2- CallSapAdapter-Local Enterprise Bean - 2
3-AF_Modules/ResponseOnewayBean-3

Parameters

ModuleKey - ParameterName - ParameterValue
1 - passThrough - true
3-receiverChannel - Receiver File Adapter Name
3-receiverService - Receiver Business Service/ System

Step-by-step procedure to run Scenario

By practically we look at a scenario which will give us a better picture to build an end-to-end application.

In Repository

1. Create Source and Target Data Types with corresponding Message Types.
2. Create the Message Interfaces for outbound and inbound messages in Synchronous Mode as follows.

Outbound Interface.
 

Inbound Interface.


 

3. Create Two Message Mappings, One is for Request Mapping and another one is Response Mapping.
4. Create one Interface Mapping for the corresponding Message Mappings.
5. Activate all the objects created.

In Directory

1 Create Business System with two communication channels. One is Sender Communication Channel and another one is Receiver Communication Channel.

In Sender Communication channel we need to add modules and Receiver communication channel details as follows.

 

2 Create or Assign R/3 system with RFC receiver communication channel.
3 Create the other configuration objects required(i.e., Receiver Determination, Interface Determination, Sender Agreement, Receiver Agreement).
4 Activate all the objects created.

Step: Execute

To execute scenario we need to upload the test file which contains the company code.

After activating the configuration scenario the sender file adapter will picks up the file from the specified directory and will process.

? Sender Communication channel monitoring.

 

After processing the message the status in SXMB_MONI is as follows.

? Message Monitoring in Runtime Work Bench as follows.

 

? Receiver Communication Channel Monitoring.

 

Features of this scenario

? This is the simple way to use Modules.
? These Modules are provided by SAP.
? Message is not going to Process Engine, so message won't be duplicated.

Summary

? Modules will enhance the functionality of Adapters. These modules equip the adapters with additional functions.
?  System performance will be good instead of using BPM.

3 Comments

  1. Former Member

    Hi,

        It didn't work on PI 7.1. File is getting picked up but not getting deleted after I add any of the modules to sender file adapter.

    Following are the error messages in defaultrace

    #1.5#005056A33969002E00003735000014A41040C0723D32A941#1236364790565#com.sap.engine.services.ts##com.sap.engine.services.ts#J2EE_GUEST#168484##<hostanme>_XXX_117114750##672e8d50052011deafc2005056a33969#XI File2XI[CC_NTLM/BE_FILE_LOCAL/]_400304##0#0#Error#1#/System/Server#Java#ts_0021##Thread is not associated with any transaction context.##
    #1.5#005056A33969002E00003737000014A41040C0723D32A941#1236364790565#com.sap.engine.services.ts##com.sap.engine.services.ts#J2EE_GUEST#168484##<hostname>_XXX_117114750##672e8d50052011deafc2005056a33969#XI File2XI[CC_NTLM/BE_FILE_LOCAL/]_400304##0#0#Error#1#/System/Audit#Java###Exception

    Unknown macro: {0}

    #1#com.sap.engine.services.ts.transaction.TxDemarcationException: Thread is not associated with any transaction context.
     at com.sap.engine.services.ts.transaction.TxManagerImpl.setRollbackOnly(TxManagerImpl.java:754)
     at com.sap.transaction.TxManager.setRollbackOnly(TxManager.java:382)
     at com.sap.aii.af.service.util.transaction.impl.SAPTxManagerImpl.rollback(SAPTxManagerImpl.java:109)
     at com.sap.aii.adapter.file.File2XI.processFileList(File2XI.java:1748)
     at com.sap.aii.adapter.file.File2XI.invoke(File2XI.java:615)
     at com.sap.aii.af.lib.scheduler.JobBroker$Worker.run(JobBroker.java:463)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    Caused by: com.sap.engine.services.ts.exceptions.BaseIllegalStateException: Thread is not associated with any transaction context.
     at com.sap.engine.services.ts.jta.impl.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:475)
     at com.sap.engine.services.ts.transaction.TxManagerImpl.setRollbackOnly(TxManagerImpl.java:751)
     ... 9 more
    #
     Appreciate your help!!

     Thanks

    Kiran

  2. Unknown User (107h9aof8)

    great article.

  3. Former Member

    Similar (but longer) SAP document here: https://scn.sap.com/docs/DOC-43843