Skip to Content
author's profile photo
Former Member

SplitByValue Function with IDoc structure

Hi,

I have an interface where I am trying to create IDocs directly from XI using a Message Mapping (without Java, XSLT, etc.). My input file has a flat structure (including a store field), and the IDoc structure is as follows:

ZSC_DELVRY03 ....................(1)

-


IDOC .................................(1)

-


EDI_DC40 ......................(1)

-


E1EDL20 .......................(1-9999) .......Delivery Header

-


ZSC_E1EDL20_ADD....(0-1) ............Extension on header Level

-


E1EDL24....................(0-99999)......Delivery Item

I need to create a new E1EDL20 (Header) segment for each store (on change of store in the input file, which is sorted). I have been able to split the file by store using the Standard Function SplitByValue on the store field, however there is a problem.

In the XI mapping documentation it says that a maximum of min occurs target fields(structures) can be created using SplitByValue. Therefore, since the E1EDL20 Segment has min occurs = max occurs = 1, only the first E1EDL20 segment for the first store is created.

Has anyone found a way round this? Is there any way of changing the XSD definition for the Idoc in XI?

Thanks,

--Lee Tomlinson

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Dec 23, 2003 at 06:40 PM

    Hello Lee,

    according to your description of the problem, your E1EDL20-Segment might occur 1-9999 times? So minOccurs=1 and maxOccurs=9999?

    In this case you do not need the SplitByValue function. Simply map a source segment or a source node that represents your store (probably the store field) to E1EDL20. It should be created as often as there are store fields in your source message.

    Best regards

    Joachim

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I do not think I can have explained my problem properly. Here is what I am actually trying to do:

      The structure of my input file is as follows where the store is the first 4 chars and item code is the following 6 chars:

      Store

      |     Item code

           ÂÂ

      0123000001...(other fields)

      0123000002...(other fields)

      0123000003...(other fields)

      0456000004...(other fields)

      0456000005...(other fields)

      0456000006...(other fields)

      0456000007...(other fields)

      0456000008...(other fields)

      0789000009...(other fields)

      0789000010...(other fields)

      I do not want to create an E1EDL20 segment for each of the records in the input file, only when the store changes. I want to do this, so that the items for a particular store all appear in the lower level segments of the appropriate E1EDL20 segment.

      IDOC

      -

      -


      E1EDL20-WERKS....... = 0123

      -

      -


      E1EDL24-MATNR.... = 000001

      -

      -


      E1EDL24-MATNR.... = 000002

      -

      -


      E1EDL24-MATNR.... = 000003

      -

      -


      E1EDL20-WERKS........= 0456

      -

      -


      E1EDL24-MATNR.... = 000004

      -

      -


      E1EDL24-MATNR.... = 000005

      -

      -


      E1EDL24-MATNR.... = 000006

      -

      -


      E1EDL24-MATNR.... = 000007

      -

      -


      E1EDL24-MATNR.... = 000008

      .

      .

      . etc.

      The problem is that because the E1EDL20 segment has MIN occurs 1, when you use splitByValue, the field (or in this case structure - E1EDL20) will only be created a MAXIMUM of Min Occurs times (i.e.- once).

      I am looking for a way of getting round this issue, as I cannot change the structure of the IDoc.

      Thanks a lot,

      --Lee Tomlinson