cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver Determination in multi mapping

Former Member
0 Kudos

Dear Folks,

I am facing a difficulty in implementing conditional receiver determination in my scenario. This is an IDOC to FILE scenario and requirement is IDOC needs to be split in multiple messages and specific messages to be delivered to different warehouses using FTP.

I have implemented multimapping 1:N and able to split the IDOC as per the requirement. But when I execute conditional receiver determination, all the splitted files are sent to all the warehouses.

The input is

<IDOC>

<Segment>

<warehouse_no>1</warehouse_no>

</Segment>

<Segment>

<warehouse_no>2</warehouse_no>

</Segment>

<Segment>

<warehouse_no>3</warehouse_no>

</Segment>

</IDOC>

and output I want as

File No 1

<MT_WarehouseDetails>

<warehouse_no>1</warehouse_no>

</MT_WarehouseDetails>

sent to warehouse 1

File No 2

<MT_WarehouseDetails>

<warehouse_no>2</warehouse_no>

</MT_WarehouseDetails>

sent to warehouse 2

File No 3

<MT_WarehouseDetails>

<warehouse_no>3</warehouse_no>

</MT_WarehouseDetails>

sent to warehouse 3

currently I am getting all the files in all the folders.

Your help will be appreciated.

- Shri

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Sorry Shripad, I am using your Space for Understanding few things , But I hope this will be usefull for you also ...

Hi Udo ,

>>>This corresponds to the sender signature of the second flow - of course. ???

I Understand the Flow of Message from IDOC to SOAP Soap Sender , but afterwords I have no idea ??

IDOC - > PI MULTI MAPPING - > SOAP RECEIVER CALLING - >SOAP SENDER ( NOW FROM HERE PLEASE EXPLAIN ?)

Can You Guide ,for Second Flow , what all Objects in ID and ESR will be created ?? Specifically to Second Flow .

udo_martens
Active Contributor
0 Kudos

>ciochinah wrote: "That is correct since the interface determination step (where you split the files) come after the receiver determination step where, as the name says, the receivers are determined"

That is the reason you introduce a second flow. To execute the receiver determination AFTER the split.

Original flow is: IDoc -> File

"Enhanced" flow can be:

1. IDoc -> PI http receiver

2. http sender -> File

For the second flow:

You create a dummy data type (one field string), dummy message type, 1 asychr outbound interface and for each warehouse a inbond interface using that message type, no mapping.

In IB directory you create a Business System (3rd party for the http sender / receiver), a simple Receiver Determination, an Interface Determination with conditions and for each Warehouse a Receiver Agreement / Channel.

The solution is of course not SAP standard, but pretty easy to develop and will have an amazing performance (compare to BPM). The Monitoring is not so nice, because you will get always 2 messages where you expect one.

Regards,

Udo

Former Member
0 Kudos

Hi Udo

What do u mean by this

" an Interface Determination with conditions "

In second Flow . I have Created a InterfaceDetermination with all three InboundInterface.

Now What . ???

Where is actually Conditions coming Up ?????

In Receiver Determination - I have only 1 Receiver Buisness System ..

In Interface Determinatin - I have Created a InterfaceDetermination with all three InboundInterface.

Then for each Interface - I have created 3 Receiver agrement with three Different Channel pointing to each different warehouse directory but on same FTP Server.

Now where is actually routing taking place for that coming data ??????

Former Member
0 Kudos

Hi,

In this case the routing in your case should be in the interface determination for each inbound interface.

in the second flow your messages are already splitted. so for each receiver you need to add a new condition in your interface determination to select only the messages for that specific receiver

aashish_sinha
Active Contributor
0 Kudos

Hi Shripad,

As per my understanding your scenario, your steps are perfectly fine. Only thing bother me is your receiver determination condition. i guess whatever condition you are giving there is not executing properly hence output files are going to all the folders.

Please have a look to below blogs, probably you will find a solution

1.Receiver Determination in Xpath

/people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination

2. Multi mapping scenario Just to cross check

/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible

3. Wiki for enhance receiver determination

http://wiki.sdn.sap.com/wiki/display/SI/StepbyStepguidetoExplainEnhancedReceiver+Determination

Lets see if you get some pointer.. or you missed something.

Regards

Aashish Sinha

Former Member
0 Kudos

coming back on this,

you might want to change your mapping to create output based on the message context. in this case you simply keep your flow and then in your mapping if receiver is RCV_1 then create the output specific for him, if RCV_2 then create output specific for him.

the disadvantage is that in most cases you need to hardcode the receivers in the mapping, but if you find a smart way of generating the content then you can keep your mapping clean of hardcoding

Former Member
0 Kudos

HI CIOCHINAH ,

Your approach . : -

IDOC -> PI MULTI MAPPING - > SOAP RECEIVER - > SOAP SENDER -> PI MAPPING - > FILE

I have few Question/Queries on this , :-

1. SOAP Reciever : -

What will be TARGET URL/ SOAP ACTION here to call PI SOAP Sender??

Do We have to add anything else like adapter Modules for such cases ?

How to take Data forword from SOAP Sender ?? Please Explain .

If you have any blog Or article on this . Please Share

udo_martens
Active Contributor
0 Kudos

Hi prabhatxi,

this is much easier with http receiver and http sender.

Target URL for receiver adapter will be: http://pi-host:pi-http-port/sap/xi/adapter_plain?interface=secondFlowIF&namespace=secondFlowNS&servi...

This corresponds to the sender signature of the second flow - of course.

Regards,

Udo

Harish
Active Contributor
0 Kudos

Hi Shri,

To avoid BPM you need to use two flow in your PI system. In the first flow you need to split the messages like warehouse_no-1, warehouse_no-2, warehouse_no-3. And then you need to send the split message to PI using Soap communication.

In the second flow you can send the split messages to corresponding receivers using receiver determination.

Former Member
0 Kudos

<>

Edited by: prabhatxi on Mar 1, 2011 5:33 PM

Former Member
0 Kudos

Hi,

That is correct since the interface determination step (where you split the files) come after the receiver determination step where, as the name says, the receivers are determined.

I think your case is one where the use of bpm is actually recommended: do the splitting in bpm and then the extended receiver determination in the flow from ccBPM to receivers.

alternatively you could put the splitted files in a folder on the file system and then pick them up afterwards

and the third option: keep the current flow and route it back to PI under a communication component via soap

create a new flow from the new communication component using the extended receiver determination to each of your receivers. in this case you somehow simulate the publish subscribe pattern

Former Member
0 Kudos

Thanks for the input. Will you please explain me the third scenario in detail. I think that is more feasible solution.

Satyagadadas
Active Participant
0 Kudos

Another way to resolve it:

Use conditional Receiver determinition and then use conditional mapping.

Ex: If the Idoc has entry for warehouse1 then receiver system is warehouse1 and the mapping for this is warehouse1.

This warehouse1 mapping sends only warehouse1 records to target structure

You can do the same for rest of 2.

Second option:

Use dynamic receiver option.

Hope it helps.

Thanks,

Former Member
0 Kudos

Hi Satyanarayana,

I have already tried solutions suggested by you. conditional interface determination is not possible because the message interface is identical and dynamic receiver is also not possible because receiver determination is prior to interface determination.

It would be gr8 if you could able to think some solution without BPM and share the same with me.

- Shri

Former Member
0 Kudos

hi,

it is indeed a nice solution here is what I propose:

define a new communication component called XI_BUS, define a sender comm soap channel SND_SOAP_IDOCTYPE and a receiver soap comm channel RCV_SOAP_IDoctype that points to the sender one. (you will need a service username and password in the pi system). check this link on how to configure your RCV comm channel to point back to your PI system [http://help.sap.com/saphelp_nw04/helpdata/en/2b/d5653fd1d3b81ae10000000a114084/frameset.htm]

source system -> XI (in this flow you do the multi mapping)-> XI_BUS (using RCV_SOAP_IDOCTYPE) (basically re-routing it back to XI)

XI_BUS(using SND_SOAP_IDOCTYPE) -> XI ( here you use your extended receiver determination) -> RCV_1

-> RCV_2

..........

-> RCV_n

I hope this helps

Former Member
0 Kudos

The solution proposed by ciochinah is feasible, but you can also try following:

For multi-mapping scenario, if you want each message route to specific receiver or a specific group of receivers, you can create Receiver Rule, but make sure you have identifier in your source message can be used to create context object or using XPATH directly. (You must have some condition to produce specific type of message)

Once you Receiver Rule created, in your receiver determination, you can specify this rule by using insert rules (do not use local rules)

This feature at least exist on PI 7.1, I have no idea if PI 7.0 or earlier version has it or not, you have to check it out.

Regards

Liang