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

SAP NETWEAVER TIPS

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
SAP ABAP/Java developer tips
How to do additional dialog processing after SAP COMMIT WORK statement
How to find a piece of SAP ABAP code without debugging
How to read an SAP transaction in an ABAP code
How to provide an SAP R/3 4.5B application server with a Web service interface
How to find owners and transports of deleted ABAP programs
Fixing a common OPEN_FORM and START_FORM error in SAPscript
Select Text fields: Case-insensitive
Is this the quickest way to find a BADI?
Easily debug error messages in SAP processes
Accessing private attributes in ABAP Objects

SAP PI/XI
NetWeaver PI 7.1 easier to implement than earlier versions, SAP says
Getting started with SAP NetWeaver PI (formerly XI)
Bucking the economic trend, HSBC embarks on NetWeaver PI project
How to be a self-taught NetWeaver and ABAP expert
An ABAP user wants to learn XI
What are the benefits of EAI?
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
SAP PI/XI Research

SAP NetWeaver tips
Using SAP NetWeaver MDM with CRM, SCM and NetWeaver BI
The importance of master data management following mergers and acquisitions
Designing your SAP NetWeaver master data management strategy
Enterprise MDM: SAP MDM for reducing data silos and duplicate records
How to move SAP NetWeaver Enterprise Portal between servers
Getting started with SAP NetWeaver PI (formerly XI)
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!

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.



NetWeaver SAP White Papers
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, 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