Skip to Content
0

SAP PI 7.4 - Splitting data in mapping by record

Oct 26, 2016 at 07:12 PM

168

avatar image

Hi

I've got a requirement whereby I will receive a flat file with employee pay data, the data includes a employee number and hours worked, dates etc.. The file will contain 1000's of employee numbers and not necessarily ordered by employee number, ECC needs to receive the data by employee number in batches by employee number.

I want to be able to split that file by 'Employee number' before passing it to a proxy in ecc for error handling. In File content conversion I can change the recordset to have 1 recordset per file and then send EOIO before being passed to the proxy, but it wont be grouping the employee id's together, so I need to work out how to map to group these employee numbers & their respective data before passing it over to the proxy.

Your help is gratefully received !

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ryan Crosby Oct 26, 2016 at 08:44 PM
0

Hi George,

I think this can be done with the help of some UDFs and a suitable graphical mapping and it's only a matter of what your chunk/group size needs to be. I can't speak for XSLT because I have never used it so I wouldn't rule that out as an option for some other folks that may have experience there.

Regards,

Ryan Crosby

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi George,

I am attaching a quick and dirty example with a fake message type that has screenshots of all the pieces. Think of the "grouping" level to represent the RecordSet at the source side. I had to put it into a .zip because there were several screenshots of all the parts so you will have to rename to a .zip and then extract the contents.
mappingzip.txt

Regards,

Ryan Crosby

mappingzip.txt (175.5 kB)
0
George Applegate Nov 04, 2016 at 11:00 AM
0

Hi Ryan

I appreciate your response, I will review this asap. I've got another, pressing issue I've gotta sort first.Many thanks, George.

Share
10 |10000 characters needed characters left characters exceeded