Home > SAP Tips > SAP NetWeaver > SAP XI - Event based message triggering with dependencies
SAP Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

SAP NETWEAVER

SAP XI - Event based message triggering with dependencies


Krishnakumar Ramamoorthy
04.30.2007
Rating: -5.00- (out of 5)


SAP news, tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


We had a scenario in which two interfaces (say interface A and B) from a legacy system to ECC (Enterprise Central Component) were interdependent. That is, mapping for interface B could not start unless interface A had been successfully completed. Both interfaces used outbound JDBC adapters and inbound IDoc adapters. Mapping for interface B used RFC lookup and transformation couldn’t start unless the IDocs for interface A have been successfully posted in ECC.

To achieve this we needed to trigger an event in ECC after posting the IDocs for interface A successfully, and this event would in turn act as a trigger for starting the transformation process for interface B in XI. However, we all know, sender adapters in XI can only poll data at regular intervals. From SP19 (NW2004s SP10), the adapter engine can support scheduled polling but cannot handle event based triggers. Integration engine supports event based scheduling of messages (link) and we used this with a slight twist for implementing our scenario, as explained below :-

Step 1: Configure Sender ID for Interface B in SXMB_ADM (in XI)

To stage the messages of interface B sent by the adapter engine in the integration engine, we needed to create a sender ID first.

image

Step 2: Configure event-controlled message processing for interface B in SXMB_ADM (in XI)

Here, we configured the event based message processing for interface B and assigned a job ID for the filter (in this case Z_TRIGGER_INTERFACE_B).

image

After saving and activating the filter, a job with status “to-be scheduled” was created.

image

Note: Don’t schedule or activate the job from here. We will do the same as in step 3.

Step 3: Create a job in SM36 with the same ID provided in step 2 (in XI)

In this step, for better control on the job, we used SM36 to create the same.

a. Job ID should exactly be the same as in step 2 (in this case Z_TRIGGER_INTERFACE_B).

image

b. Job should execute program SXMS_START_JOBS as the first step.

image

c. Start condition for the job should be “After Event” for custom event ‘Z_INT_B_TRIGGER’ and should be 'periodic'.

image

Note: Use transaction code SM64 to create a custom event.

Step 4: Create a wrapper function module for BP_EVENT_RAISE to enable RFC (in XI)

The standard function module BP_EVENT_RAISE can be used for triggering events. However, the idea is to call this function module from ECC through RFC. Hence, we created a wrapper function module namely Z_ BP_EVENT_RAISE which will in turn call standard function module BP_EVENT_RAISE.

Step 5: Create a job in SM36 for posting the IDocs and triggering the event in XI (in ECC)

This job has two steps.

   1. First step calls program RBDAPP01 which will post IDocs for Interface A.

   2. Second step calls a Z program which in turn will call function module Z_BP_EVENT_RAISE in XI using RFC, with EVENT_ID parameter as 'Z_INT_B_TRIGGER' in this case.

 

Now, we have established an event-based message processing where mapping for interface B will start in XI only after IDocs for interface A have been posted completely in ECC. The whole process is summarized in the below picture.

image

Krishnakumar Ramamoorthy Krishnakumar Ramamoorthy has over seven years of experience in SAP related developments.



This content is reposted from the SAP Developer Network.
Copyright 2007, SAP Developer Network

SAP Developer Network (SDN) is an active online community where ABAP, Java, .NET, and other cutting-edge technologies converge to form a resource and collaboration channel for SAP developers, consultants, integrators, and business analysts. SDN hosts a technical library, expert blogs, exclusive downloads and code samples, an extensive eLearning catalog, and active, moderated discussion forums. SDN membership is free.

Want to read more from this author? Click here to read Krishnakumar Ramamoorthy's Weblog. Click here to read more about SAP Exchange Infrastructure (XI) on the SDN.



Rate this Tip
To rate tips, you must be a member of SearchSAP.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
ABAP/Java developer tips
Select Text fields: Case-insensitive
Finding BADIs you can use
Is this the quickest way to find a BADI?
ABAP Objects in SAP Workflow to provide improved performance
Easily debug error messages in SAP processes
Accessing private attributes in ABAP Objects
Find a BADI in a minute
Top 10 SAP tips of 2007
How to transport an SAP query in R/3 4.6x
How to switch off message determination in BAPI_PO_CREATE1

SAP XI (exchange infrastructure)
An ABAP user wants to learn XI
The benefits of EAI
When to choose SOAP, RFC and HTTP adapters
Quiz: SAP XI for beginners
XI: Search through the payload of a message... without TREX!
Automate the process of uploading catalogs using XI
Using Folders in PI 7.1
Hourly rates of NetWeaver consultants
Best career path for a pro with .NET experience
Is it wise to convert to an SAP NetWeaver EP/XI career from a Java/J2EE background?
SAP XI (exchange infrastructure) Research

SAP NetWeaver
Top 10 SAP tips of 2007
Retrieve BI data with Web Services
Eliminate database read/write times with ABAP shared memory
XI: Search through the payload of a message... without TREX!
Using Folders in PI 7.1
User management with SAP NetWeaver Administrator
Business process platform creation for healthcare, part 2
Business process platform creation for healthcare
How to acquire the runtime information of a data transfer process (DTP)
A process runtime dashboard for tracking efficiency

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
SAP Exchange Infrastructure  (SearchSAP.com)
SAP Integration Adapter  (SearchSAP.com)
SAP Integration Repository  (SearchSAP.com)
SAP Integration Server  (SearchSAP.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsBlogsTipsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
SearchSAP.com is a search service provided by TechTarget and is completely
independent of and not affiliated with SAP AG.
  TechTarget - The IT Media ROI Experts