cancel
Showing results for 
Search instead for 
Did you mean: 

Determine receiver by multiple fields from source payload

Former Member
0 Kudos

Dear experts,

We can add condition in Receiver Determination to achieve validation for each receiver, for example, usually we will have a check of some specific source fields and distinguish different receiver should be sent:

fieldA = "Receiver A" and/or field = "fieldB" then send this message to Receiver.

However, the right operator of above method requires a specific fixed given value only("Receiver A" here), it can't be fulfilled with a field from source payload also.

What if the requirement like this -- if fieldA equals fieldB, then send to Receiver, else, not send.

My suggestion is handle it in Mapping, add fieldA = fieldB check in the generation logic of output message, so if they aren't equivalent, output message will not be generated, henceno message would be sent to Receiver.

Just to confirm with you whether any simpler method to achieve this requirement? As in my case, I have to change the occurrence in signature tab of message mapping to 0-1 then add the logic, and I have to redo all the mapping as a result of changing the occurrence of target message in signature.

Any suggestion will be greatly appreciated, thanks a lot.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Why don't u use EX operator in RD?

Ur XPATH will be something like this:

/p1:MT_Message1/Record[FieldA=FieldB]     EX

Thanks

Amit Srivastava

Former Member
0 Kudos

Hi Amit,

I tried below expression in Xpath in RD:

/ZMMMM_MATMAS05/IDOC/E1MARAM/[MSTDV = RMATP] EX

I manually typed "[", "RMATP" and "]" since only one field can be chosen in Xpath for left Operand(I selected MSTDV here)...

Unfortunately it's not working as expected, am I in the wrong way?

Former Member
0 Kudos

Hello,

Try with this xpath(i have removed "/" after E1MARAM):

/ZMMMM_MATMAS05/IDOC/E1MARAM[MSTDV = RMATP] EX

Thanks

Amit Srivastava

Former Member
0 Kudos

yes, it's working after removing "/" before field..

Thanks Amit.

Answers (1)

Answers (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi,

You can achieve this using concept of dynamic receivers.

http://wiki.scn.sap.com/wiki/display/XI/Dynamic+receiver+determination+through+mapping

please revert back if you need any further inputs.

Ambrish

Former Member
0 Kudos

Thank you, Ambrish.

Do you have any idea of what Amit suggested-- EX middle operand at RD?

ambrish_mishra
Active Contributor
0 Kudos

Hi,

I understand where Amit is pointing to but since you have to comapre 2 source payload values, Dynamic receivers is the way to go.

@Amit - What do you think.

Ambrish