Hi experts,
We have a PlainFile-To-Idoc Sap XI scenario. We have a requirement where we need to produce multiple idocs from one file. The plainFile(=text file) is similar to this:
> >Header123ABC123 >DetailXYZ987ABC654 >DetailXYZ988CBA653 >DetailXYZ989BCA652 >DetailXYZ989CAB651 >.. >.. >.. >.. >TrailerZYQ474FDJKDF >
Now for every 300 u201Cdetailu201D records from the above structure it should create another idoc.
I already defined in the File adapter the content conversion with the following parameters:
> >Document Name: MT_Prices >Document namespace: http://prices >Recordset Name: Recordset >Recordset Structure: Header,1,Detail,*,Trailer,1 >Recordset Sequence: Ascending >Recordsets per Message: 300 >Key Field Name: KeyID >Kield Field Type: String (Case-sensitive) > >Header.fieldnames >Header.fieldFixedLengths >Header.missingLastfields add >Header.keepIncompleteField YES >Header.fieldFixedLengthType byte >Header.lastFieldsOptional YES >Detail.keyFieldValue >Detail.fieldnames >Detail.fieldFixedLengths >Detail.missingLastfields add >Detail.keepIncompleteField YES >Detail.fieldFixedLengthType byte >Detail.lastFieldsOptional YES >Detail.keyFieldValue >Trailer.fieldnames >Trailer.fieldFixedLengths >Trailer.missingLastfields add >Trailer.keepIncompleteField YES >Trailer.fieldFixedLengthType byte >Trailer.lastFieldsOptional YES >Trailer.keyFieldValue >
The mapping is as follows:
Message Type =
>MT_Prices (1:1)
>>Recordset (1:unbounded)
>>>Header (1:1)
>>>Detail (1:unbounded)
>>>>Field1 (1:1)
>>>>Field2 (1:1)
>>>>..
>>>Trailer (1:1)
External Message ZPRICES =
>ZPRICES (1:1)
>>IDOC (1:unbounded)
>>>BEGIN (required)
>>>EDI_DC40 (1:1)
>>>>SEGMENT (required)
>>>..
>>>..
>>>Z1PRICES (1:1000)
>>>>SEGMENT (required)
>>>>Field1 (0:1)
>>>>Field2 (0:1)
>>>>..
Graphical mapping description:
>ZPRICES is graphical mapped with a constant (which is empty)
>Recordset is graphical mapped with IDOC
>BEGIN is graphical mapped with a constant (which is 1)
>SEGMENT (of EDI_DC40) is graphical mapped with constant (which is 1)
>Z1PRICES is graphical mapped with Detail
>SEGMENT(of Z1PRICES) is graphical mapped with constant (which is 1)
>Field1 is graphical mapped with Field1
>Field2 is graphical mapped with Field2
I place a text file with 1000 detail records pulling into XI. The result is 1 IDoc with 1000 segments.
I expected 4 IDocs: 3 IDocs with each 300 segments and 1 IDoc with 100 segment.
So can you tell us to solve this problem?
Looking forward for your help on this
Thanks in advance
Edwin