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
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 a comment