avatar image
Former Member

Receiver determination condition

Hi Experts,

Below is my requirement.

In INVOICE IDoc

Case1: /INVOIC02/IDOC/E1EDK02[QUALF="002"]/BELNR ≈ 003*)        ----> Receiver 1

Case 2: /INVOIC02/IDOC/E1EDK02[QUALF="002"]/BELNR ≠ 003*)        ----> Receiver 2

It is working in case 1 but not in case2. All Orders which starts with 003 of QUALF 002 are also going to Receiver2.

I need to send invoices to Receiver1 for which E1EDK02/BELNR starts with 003 in E1EDK02/QUALF 002.

I need to send invoices to Receiver2 for which E1EDK02/BELNR didn't starts with 003 in E1EDK02/QUALF 002.

Input data for Receiver1:

- <E1EDK02 SEGMENT="1">

  <QUALF>001</QUALF>

  <BELNR>711111111</BELNR>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>002</QUALF>

  <BELNR>003111111</BELNR>

  <DATUM>20130716</DATUM>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>017</QUALF>

  <BELNR>008111111</BELNR>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>087</QUALF>

  <BELNR>0091111111</BELNR>

  </E1EDK02>

Input data for Receiver 2:

- <E1EDK02 SEGMENT="1">

  <QUALF>001</QUALF>

  <BELNR>711111111</BELNR>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>002</QUALF>

  <BELNR>004111111</BELNR>

  <DATUM>20130716</DATUM>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>017</QUALF>

  <BELNR>008111111</BELNR>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>087</QUALF>

  <BELNR>0091111111</BELNR>

  </E1EDK02>

(or)

- <E1EDK02 SEGMENT="1">

  <QUALF>001</QUALF>

  <BELNR>711111111</BELNR>

  </E1EDK02>

  </E1EDK02>

- <E1EDK02 SEGMENT="1">

  <QUALF>017</QUALF>

  <BELNR>008111111</BELNR>

  </E1EDK02>

Please help on how to achieve this. Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jun 09, 2015 at 06:04 PM

    You can use start with function along with not to check the second condition.

    Refer to my reply in below thread

    Something like this : /INVOIC02/IDOC/E1EDK02[QUALF = "002" and not(starts-with(BELNR,"003"))]EX

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Hareesh Gampa

      It is working, as i said before, for some Idocs, I am not getting QUALF with 002 value. so receiver determination is failing. I should use throw error option in receiver determination due to other customer requirements.

      So now I need to send IDoc to receiver2 if

      INVOIC02/IDOC/E1EDK02[QUALF = "002" and not(starts-with(BELNR,"003"))] EX )

      (or)

      INVOIC02/IDOC/E1EDK02[QUALF = "002"] does not exist

      Can you help me on what condition do i need to use for does not exist, how can I acheive above logic which in bold letters.

  • Jun 09, 2015 at 06:12 PM

    Hi Mohan,

    Have you checked the multiline checkbox?

    According with this thread

    You can try:

    Left operand --> contains(substring(/INVOIC02/IDOC/E1EDK02[QUALF="002"]/BELNR,1,3),'003')

    Operator --> =

    Right Operand --> true

    And the other option with false.

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Iñaki Vila

      AND came automatically in upper case when I clicked on + Icon. This is not something I added manually.

      I think we can not use contains condition including with other logic

Skip to Content