cancel
Showing results for 
Search instead for 
Did you mean: 

Xpath expression not working in Interface Determination

Former Member
0 Kudos


Hi,

I have a scenario where 1 source file will be containing multiple IDocs and based on certain conditions 5 different files should be created. I am using xpath to define these conditions in Interface Determination. Xpath is working for 4 files but it is not working for one particular file. It is creating this particular file even when the condition is not satisfied.

Xpath expression:

/ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL[STAT = "I0002" and (STAT != "I0009" or STAT != "I0010" or STAT != "I0012" or STAT != "I0074" or STAT != "I0076")]

File should be created if STAT has "I0002" and should not have any of "I0009", "I0010", "I0012", "I0074", "I0076".

Idoc segment structure is like:

<E1JSTKL SEGMENT="1">

            <STAT>E0001</STAT>

            <STSMA>Z0000006</STSMA>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0002</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0004</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0010</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0016</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0028</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0215</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0291</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0361</STAT>

         </E1JSTKL>

Each IDoc in the file would have similar segment occurrence.

Would appreciate any help on this.

Thanks!

View Entire Topic
0 Kudos

Hi

Instead of using an EXpression please try putting them directly as separate conditions.

/ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT = I0002  AND

/ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT != I0009   AND

/ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT != I0010   AND

and so on...



Former Member
0 Kudos

Hi Karanam,

I have tested this condition before but no success.

Thanks!

0 Kudos

I tried testing a similar condition and it works for me. Can you crosscheck? Also can you put the screenshot of what you tried.

Former Member
0 Kudos

Hi Karanam,

PFB the condition which i have tested.

(/ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT = I0002 AND /ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT ≠ I0009 AND /ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT ≠ I0010 AND /ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT ≠ I0012 AND /ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT ≠ I0074 AND /ZLOIPRO03EXT/IDOC/E1AFKOL/E1JSTKL/STAT ≠ I0076)

For scenario where file should not be created, it is working fine. But for scenario where file should be created it is not working. PFB snapshot of the inputfile for which condition is failing.

  <E1JSTKL SEGMENT="1">

            <STAT>I0002</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0016</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0028</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0215</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0236</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0291</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0321</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0361</STAT>

         </E1JSTKL>

         <E1JSTKL SEGMENT="1">

            <STAT>I0485</STAT>

         </E1JSTKL>

Thanks!