cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Receiver determination and multiple incoming messages

Former Member
0 Kudos

Hi All.

We have a scenario where we have multiple order numbers created/changed in a day. At the end of the day, we have to send a list of all changed (includes deleted/inserted) orders to external interfaces.

Now external interfaces are plenty - more than 50. Each require different data of the order. So we'd have different file contents for each interface.

We were toying with the idea of whether to use PI for this scenario or to use normal ABAP programs. Latter has the disadvantage of limited time frame and system resources available (dont want to go into details of why it is that).

Now if we use PI for this, we were thinking of just dumping all changed data to PI, and then let PI do all the processing to send to various parties. After my initial explorations, I have come up with the following limitations:

- If we dump all changed data in one message (i.e. one FM in R/3 picks up all changes and passes to PI via RFC adapter), I think I can only use the message once - which will mean that all mappings for all interfaces need to be done in one go. This would mean even if 1 mapping out of 100 interfaces fail, everything would fail. Is my understanding correct here? 'coz I tried to use the same message for another mapping, but it does not work - message is gone as soon as it is processed by one Interface determination. Or is there a way to use the same message again in another instance of interface determination - i.e. I make "different" mappings for each interface in the ESR.Lets say there are 10 interfaces. Then in Builder, I create 10 interface determinations, 10 receiver determination (sender would be 1). I tried it, but only 1 is processed.

Then I tried to do all mappings in one message mapping - i.e. 1:N mapping. But in that case, even one slight error was cancelling the whole mapping, even if data for some of outbound messages is correct.

Apart from this, another problem would come in generating different file names for each interface. We have a mapping table in R/3 which does that. It would mean that same mapping table needs to be copied to PI, make a new FileReceiver channel for each interface, make this receiver channel read from file, and get the file name from there. Correct? But is this possible that the file receiver channel read from PI database - I have never tried it.

I know my question is a bit long. Hope I could explain my problem. Any ideas would be of great help.

Thanks in adv.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Aishi,

You can dynamically determine multiple receivers and send multiple message with out using BPM.

Use the option of extended receiver determination available in Receiver Determination.

Here in this option you can select a mapping which will determine the receivers dynamically.

So you just need to built a mapping by selecting source message type that you have and the "Receivers" message types which is avialable in SAP BASIS SWCV under the namespace "http://sap.com/xi/XI/System" .

Your mapping logic should be such way that it will determine multiple receivers based up on the condition that you define.

Select this mapping under extended receiver dterminaiton option of your Receiver Determination object.

Once the receivers are determind then you can create multiple Interface determinations to deliver messages specific to receiver by calling operation mapping specific to receivers.

Regards

Prasanna Kumar

VijayKonam
Active Contributor
0 Kudos

I would suggest you to create as many one to one interfaces in PI and call them based on your function data in an ABAP FM or a report. Doing a multi mapping for those many different messages becomes clumsy in PI mapping and it would be the most difficult thing to maintain it. Instead an ABAP program would have better flexibility of implementing the logic and calling the individual services.

VJ

neshath_anjum
Explorer
0 Kudos

Hi Prasanna,

Good Suggestion, could you please elaborate or suggest document explaining. How to implement this on existing interfaces.

Regards

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

if you want to multicast the same message then ccBPM would work for you.

also can define exception handling for invdividual mappings, so that it wont fail your message.

have a look in to this

http://wiki.sdn.sap.com/wiki/display/XI/IntegrationProcess(ccBPM)inXI

You can use dynamic configuration using adapter specific message attributes for the file name

please check this

http://wiki.sdn.sap.com/wiki/display/Snippets/SAPXIDynamic+Configuration

hope it helps.

regards,

francis

Edited by: Francis Antony on Sep 22, 2010 12:33 PM

Former Member
0 Kudos

Thanks Francis.

But adding exception to the message - means I'd have to do my own mapping in Java or abap, right? Cannot do it via normal mapping.

Do you have an example of how to handle this?

Also, all things I cannot handle, right?

2nd -> Dynamic configuration link that you said, it means I'd have to do coding in adapter? No way I could use file variables substitution mechanism to pick up from some database?

3rd -> Multicast would not eliminate my problem of transformation, right? It would mean that in the ParForEach loop, I define my transformation - which can only be one. Or I somehow assign transformation to use also dynamically?

So overall, do you think this scenario should use PI? Personally I feel it could best be handled in R/3.

Thanks in adv.

Former Member
0 Kudos

Hi Aishi,

1. Exception handling- this can be done inside the ccBPM via the exception branch. so if your transformation step (mapping) has some error you can handle this inside the ccBPM.

2. Dynamic configuration is not done via the adapter module. Its from the mapping. you have to write a UDF in the mapping with code snipped mentioned before, then just select the adapter specific attributes- file name in communication channel. The file name obtained from the mapping(by the UDF) would be added to the XI message header and dynamically fill the file name in communication channel when the message reaches over there.

3. I was thinking starting the ccBPM with a fork step and parallel branches based on your number of interface to which the same message has to sent, like below

http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/56373f7853494fe10000000a114084/content.htm

integration process will be a performance intensive approach from XI point of view.

regards,

francis