cancel
Showing results for 
Search instead for 
Did you mean: 

Issue: Multiple IDOCs to single File with the complex structure

Former Member
0 Kudos

Hello Everyone,

We have a scenario multiple IDOC to File. Multiple IDOCs data from ECC are coming in a single file. IDOCS are

coming one by one and then we need to collect these IDOCS in a single File.As per requirement,the structure of the file is as mentioned:

File Header : Occurence 1 to 1

Vendor Header : occurence 1 to 1

Vendor Detail : occurence 1 to unbounded

Vendor Trailer: occurence 1 to 1

Vendor Header : occurence 1 to 1

Vendor Detail : occurence 1 to unbounded

Vendor Trailer: occurence 1 to 1

.

.

.

.

File Trailer: occurence 1 to 1.

With this structure, Multiple IDOCS need to be merged in a single file but with the constraints as shown in above structure.

How we can achieve this. Kindly help.

Regards,

Kanisha Sharma

Accepted Solutions (0)

Answers (1)

Answers (1)

rajasekhar_reddy14
Active Contributor
0 Kudos

Refer below blog, try to avoid BPM in yoru case

/people/michal.krawczyk2/blog/2009/05/21/xipi-collecting-idocs--possible-ways-with-pros-and-cons--5-ways

Regards,

Raj

Former Member
0 Kudos

We thought to apply the same solution too but we are using the same IDOC in more than one Interfaces targetting to file system only with different purpose. Any other solution please.

Former Member
0 Kudos

If Idoc came one by one, with the same type, you can set file receiver adapter in appending mode to destination file name.

Then:

SenderIdoc -> Mapping -> FileAppend

Former Member
0 Kudos

Hi,

Thanks . But as I mentioned above the structure of Receiver File, even after appending the file data, we need to have this sturcture:

File Header : Occurence 1 to 1

Vendor Header : occurence 1 to 1

Vendor Detail : occurence 1 to unbounded

Vendor Trailer: occurence 1 to 1

Vendor Header : occurence 1 to 1

Vendor Detail : occurence 1 to unbounded

Vendor Trailer: occurence 1 to 1

.

.

.

.

File Trailer: occurence 1 to 1.

In that file, we want File header record one time, Vendor header record one time.............in the same way for all data records.

These should not be repeated. With this structure how we can achieve this.

Regards,

Kanisha Sharma

Former Member
0 Kudos

Hi,

With the file structure that you have defined above, you will not be able to use the append mode in the receiver comm channel.

If you are on PI 7.1, you have the option of collecting Idocs in SAP and sending them as one single message.

Refer the following blog for more details :

/people/shabarish.vijayakumar/blog/2010/02/09/idoc-packaging--how-to-deal-with-reprocessing

If this can not be used and you are already using the same Idoc in other scenarios and hence cannot go for the http file port option, in that case, the only other option left for you would be to use a bpm to collect the Idocs

Regards