cancel
Showing results for 
Search instead for 
Did you mean: 

Different receivers based on a condition

0 Kudos

Hello experts,

I have a scenario File to IDOC . The file has the structure : Many transactions( codes starting from 111 to 999)and one Footer record. The footer record will have the total number of lines, and the total number of 111 codes .

The file has to be read by XI and if the total number of lines or the total number of 111 trasactions does not match with that of the numbers in the footer record, then an email has to be sent to a distribution list (external partners) saying that the bumner of lines or the number of 111 trnsactions do not match with that of the numbers mentioned in the footer record.

If the numbers match , then the file has to be mapped to idoc .

This is kind of one file to multple receivers but not exactly multiple recievers, of the mail adapter s triggered, then the idoc adapter should not be triggered.

I tried it with multimapping: 1 message for Mail and the other for IDOC, and tried giving the condition createif for mail node but it is throws out error:

Cannot produce target element /ns0:Messages/ns0:Message1/ns2:Mail.

Can you please help me in acheiving this scenario.

thank you.

Accepted Solutions (1)

Accepted Solutions (1)

VijayKonam
Active Contributor
0 Kudos

You should change the occurances of that message in the mapping to 0..1 instead of 1..1. Then it would not throw the error.

VJ

Former Member
0 Kudos

> You should change the occurances of that message in the mapping to 0..1 instead of 1..1. Then it would not throw the error.

You are right. Just changing the occurrance it will make the mapping successful.

Just sharing my thoughts with you.

But this will create an empty payload at runtime which is not acceptable and neither a good practice. What you say?

Regards,

Sarvesh

0 Kudos

Hello all,

thank you for your replies.

I have tried the option of enhanced receiver determination.

There is no need of multimapping. Here are the steps that i followed to achieve the required result:

Used the Receviver determination as my message interface and in the mapping of the Server,

the Message type -->Receivers -->http://sap.com/xi/XI/System

the Message Interface --> ReceiverDetermination -->http://sap.com/xi/XI/System of swcv SAP BASIS 7.00

I have given the condition for the Receiver Services for the Field Service.

and in the configuration part there is no change in the usual Sender agreements, Recevier agreemants and Interface determinations. But in the receiver determination , i have selected the Enhanced radio button and selected the interface mapping for the receiver determiantion .

This works.

Regards,

Lakshmi.

Answers (2)

Answers (2)

0 Kudos

Solved.

Former Member
0 Kudos

If you have used UDF to set you receivers based on conditions in Mapping then just be careful of hard coded values coz when you will transprot it to procution then receivers must be changed automatically according to the environment (QA, PRD).

Former Member
0 Kudos

Content deleted.. the solution given my Lakshmi seems good...

Edited by: Sarvesh Singh on Dec 22, 2009 1:57 AM