Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP PI 7.4 IDoc to Flat File - Group Flat File Output

Hi Everyone,

I've an issue with my IDoc to Flat File scenario. I would appreciate any advice you could give on this.

I have mapped IDoc SHPORD|DELVRY06 to produce a fixed length flat file output. The IDoc's are collected in SAP and sent out to PI. We are appending all the IDocs sent out to one flat file.

For every IDoc line segment E1EDL24 we need one line in the flat file output. This works fine.  (E1EDL24 ->removeContexts>Record)

The problem I have is grouping the lines in the flat file. Currently the output comes out like:-

<Transaction><Key><Material> <Quantity>

AB809MAT1 20

AB813PRD1 15

AB809MAT1 20

AB814PRD2 12

AB813PRD1 15

AB999ITM1  10

AB809MAT1 25

But the requirement is to have the output group (rolled up) by <Transaction><Key><Material> <Quantity> as follows:-

AB809MAT1 65

AB813PRD1 30

AB814PRD2 12

AB999ITM1  10

Do i need to perform another mapping step ?  Or is there I way I can achieve this within the existing mapping ? I've searched around but for some reason can't seem to find this scenario. Any help would be greatly appreciated.

Thanks for your time.


Former Member

Hello Joel,

Why don't you try sort by key function.?

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question