cancel
Showing results for 
Search instead for 
Did you mean: 

Context problem in Conditional Receiver Determination

Former Member
0 Kudos

Hi All,

The scenario is,

There is a IDoc with a segment that is going to occur more then once, this segment has many fields out of which 1 field is for flag and the other for plant which has to be used for Routing to different Receivers.

<Segment1>

<Segment>

     <flag>X</flag>

     <plant>1XXX</plant>

</Segment>

<Segment>

     <flag> </flag>

     <plant>1AAA</plant>

</Segment>

</Segment1>

The Routing condition currently is

Segment1/Segment/flag=X and Segment1/Segment/plant=1XXX --> Receiver (Many such Receivers are there based on the Plant field)

But the condition is not working, If the first segment has flag as X, the IDoc is sent to all the plants i.e in this case it is going to both plant 1XXX and 1AAA, Though we want the IDoc only to go to 1XXX because only it has Flag as X.

Can anyone please help with what can be a possible solution to this.

Thanks and Regards,

NehaSingh

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Segment1/Segment/flag=X and Segment1/Segment/plant=1XXX --> Receiver (Many such Receivers are there based on the Plant field)

But the condition is not working, If the first segment has flag as X, the IDoc is sent to all the plants i.e in this case it is going to both plant 1XXX and 1AAA, Though we want the IDoc only to go to 1XXX because only it has Flag as X.

You could consolidate your condition to Segment1/Segment[flag="X" and plant="1XXX"] just make sure to use EX in the operands. Take note that the said conditions are also needed in your interface determination.

You could also follow the suggestion of Raja.

Hope this helps,

Mark

Former Member
0 Kudos

Thanks Everyone for your replies!

Answers (3)

Answers (3)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Few cents ....

Make sure to use quote in checking values for both flag and plant.

zameerf
Contributor
0 Kudos

Hi,

>>(Many such Receivers are there based on the Plant field)

So, do you have some condition/receiver for plant 1AAA? if so, you may want to check if that is satisfied as well, so that it is being sent to both plants.

basically, do you expect data for both plant in one single input message?

If so, you have to filter and split messages using multi mapping.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

I have experiencesimilar kind of issues with Interfaced etermiantion

Solutio1:

Use Enhanced Receiver determination definetly this is the right design to solve context problems.

Search in SCN.

Solution2:

Check Segment1/Segment/plant=1XXX  and Segment1/Segment/flag=X and try this logic,if it is not working then use stringle lenght function and check flag value length = 1 instaed of chekcing value.

Best Regards,

Raj

former_member184681
Active Contributor
0 Kudos

Hi,

Instead of:

Segment1/Segment/flag=X and Segment1/Segment/plant=1XXX

Write the condition as follows:

Segment1/Segment[flag="X"]/plant=1XXX

Hope this helps,

Greg