cancel
Showing results for 
Search instead for 
Did you mean: 

Condition for Interface Determination

Former Member
0 Kudos

Hi experts,

for interface scenario IDOC to file, I need to have a condition on Interface Determination which is as follow :

the field for the condition can appear several times, if one of its value is > 0 then I have to apply mapping, else not

I have put a condition [FIELD > 0] EX and ticked multilines, but does not seem to work.

When I send an idoc including lines = 0 and lines > 0, I have the 'unable to determine interface determination' error, even though I have lines > 0

D you have any Idea how should I proceed?

Any help would be greatly appreciated.

Thanks a lot,

Jamal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi experts,

thx for your feedback.

Actually, I have tried

(/ZDELVRY03_EXT/IDOC/E1EDL20/E1EDL24/[sum(LGMNG) > 0] EX )

but I always get the 'unable to determine an inbound interface' for every cases

Is my statement correct ? maybe it comes from the fact that values in field LGMNG are formated like this : 0.000 or 12.000 for example ?

Thanks a lot for your help

Former Member
0 Kudos

In your X-Path use this..

/ZDELVRY03_EXT/IDOC/E1EDL20/E1EDL24[ (LGMNG > "0") ]

and on condition editor ad the oprend "EX".

This must work, because I have tried it.

Answers (6)

Answers (6)

Former Member
0 Kudos

Actually Abhishek is right. You have to use the x-path express exactly same as he mentioned.

From the very begining I was having a feeling that it should work for any value GT 0, but as you said in your question, you tried and didn't worked.....

Anyway, when you tried with below expression then it didn't work because your conditions were not properly set with correct brackets and parentheses.

I have put a condition [FIELD > 0] EX and ticked multilines, but does not seem to work.

Thanks Abhishek.

Regards,

Sarvesh

former_member200962
Active Contributor
0 Kudos
if one of its value is > 0 then I have to apply mapping, else not

If your requirement is to check if the sum of values in all the Field nodes is greater than 0 then the condition given by Sarvesh will work.

If your requirement is to check if value of any of the Field nodes is greater than 0 then have the condition as shown below:

/p1:IDOC/Node1[(Field1 > "0")]  EX

the actual Xpath needs to be used

Since you have only one mapping and you need to decide if to execute the process or not.....why are you proceeding till Interface Determination? Why not check in receiver Determination itself and cancel the process there itself.....it will save some time.

Regards,

Abhishek.

Former Member
0 Kudos

Actually, if I put condition in mapping, it would create an empty file on target, which is not allowed.

Is there isnt a way I have this in Interface determination ?

Thanks,

Former Member
0 Kudos

Hi,

There is one solution which may work for you....

In your X-Path, if you sum FIELD values and then check it... like this.

/p1:MT_test/ITEM[sum(FIELD) > 0] and then use the EX operator.

Take help of this blog...

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

Regards,

Sarvesh

Former Member
0 Kudos

U can use the standard greater function in mapping of root node it will give either true or false and use the ifwithoutelse function and map it to target root node.

refer this link

http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

No need to give any condition.

Chirag

Former Member
0 Kudos

Hi Jamal,

Uncheck the option MaintainOrderAtRuntime in interface determination and check.

Once again check the interface determination, is it created correct or not.

Regards

Ramesh

Former Member
0 Kudos

Hi, i think the better way is put this condition on mapping, not in the interface determinartion.

Regards.

MS.