cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver determination - check if field value exist or not

KennethEriksen
Participant
0 Kudos

Hi,

I'm trying to set up receiver determination with two possible receivers, A and B, depending on the content of the IDoc sent from business system. I need to check if field /ORDRSP/.../E1EDK35/CUSADD = PDA. I have no problem creating the condition when field CUSADD='PDA' exist, but I can't figure out how to create a condition which is true when there is no CUSADD='PDA'.

I have concluded that the main problem is that the E1EDK35-segment is repeating, meaning there could for instance be 4 occurences of E1EDK35, each with its own CUSADD (and with its respective qualifier). So if I use xpath condition:

/ORDERS05/IDOC/E1EDK35[CUSADD!='PDA']

it will still be created because the other E1EDK35-segments exist without field CUSADD = 'PDA'.

What I need is to check globally (entire message) if field E1EDK35/CUSADD contains value 'PDA' or not. I have played around with XPATH count-functions without success. I have also played around with Dynamic Configuration, but since receiver determination is performed before the mapping I cannot assign values to dynamic configuration using mapping.

Any hints, folks?

Thanks!

Br,

Kenneth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First of all figure out the total values coming in all different CUSADD (I am sure there will be some fixed nubers). Let say at max you get 4 different kind of CUSADD then in your Condition Editor declare all 4 with "AND", & "OR" operater to validate your condition.

eg.

(/ORDERS05/IDOC/E1EDK35CUSADD u2260 PDA ) AND

(/ORDERS05/IDOC/E1EDK35CUSADD = XXX     OR
 /ORDERS05/IDOC/E1EDK35CUSADD = YYY    OR
 /ORDERS05/IDOC/E1EDK35CUSADD = ZZZ )

So when above conditions will be true then it will pass the data to the desired receiver.

Regards,

Sarvesh

KennethEriksen
Participant
0 Kudos

Thanks Sarvesh!

Works like a charm (even though I had to play around with several AND and OR combinations to make it work)!

-Kenneth

Former Member
0 Kudos

You are most welcome! Nice to hear that it helped you. )

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

Did you try playing around with multiline check box if thats of any help...I guess if there are too many of values for that field you can do the check in mapping and use enhance interface determination

Regards

Vijaya

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

You can try this

In RD choose the option EX(Exist)


/ORDERS05/IDOC/E1EDK35CUSADD EX PDA  and
 /ORDERS05/IDOC/E1EDK35CUSADD != PDA

Former Member
0 Kudos

>

> Hi

> You can try this

>

> In RD choose the option EX(Exist)

>

 
> /ORDERS05/IDOC/E1EDK35CUSADD EX PDA  and 
>  /ORDERS05/IDOC/E1EDK35CUSADD != PDA 
> 

Hi Luis,

Don't you think above conditions are contrary to each other??

Regards,

Sarvesh