Hi,
I have a file to multiple idoc scenario.
My Source structure:
Msg type
Data Type
Header (1) (field1, field 2, field 3 etc)
ITEM( 0 to U) (field X, field Y, field Z etc)
Target structure:
Idoc Type
IDOC (1 to U)
Begin
Idoc Ports (1) (field a1, field a2, field a3 etc)
Idoc_HDR (1) (field1, field Y, field 3 etc)
Idoc_ITM (1 to 99999999) (field X, field Z etc)
Idocs are generated only for some ITEM lines of source and so the value of field X is used and mapped to IDOC node using createif.
Rest of the mapping is done normally and works fine and creating multiple idocs if there are multiple ITEM lines in the source file. This mapping is doesn't work if I want to create multiple Idoc-ITMs
My requirement is to create multiple Idoc_ITM nodes under one parent IDOC node for for all ITEMs relating to one "field Y" of source. At the moment I am creating 4 idocs for the below example, but I want 3 like below:
For example:
Source file:
Country, city, date
emp1, department1, roleA
emp2, department1, roleB
emp3, department2, roleC
emp4, department3, roleC
Required Target file:
IDOC 1
Idoc_HDR
Country, department1, date
Idoc_ITM
emp1, department1, roleA
Idoc_ITM
emp2, department1, roleB
IDOC 2
Idoc_HDR
Country, department2, date
Idoc_ITM
emp3, department2, roleC
IDOC 3
Idoc_HDR
Country, department3, date
Idoc_ITM
emp4, department3, roleC
How can achieve it please?
Many thanks.
Ramesh.