Skip to Content
0

SAP HCI - Groovy Script code to process Fixed Field Length text file

Oct 05, 2017 at 09:53 AM

271

avatar image

Hello Everyone,

I have a requirement to parse the source Fixed Field Length text file and convert to XML.Parsed XML will split into two different structures and routing to SFSF EC to two different entities.

I am looking for the groovy script code to do this.Please If anyone already did this kindly share the code.I never did groovy script coding.

Thanks

Pavan

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

2 Answers

Sriprasad Shivaram Bhat
Oct 06, 2017 at 06:27 AM
1

Hello Pavan,

Could you please share sample input file with few liner of specification.

Regards,

Sriprasad Shivaram Bhat

Share
10 |10000 characters needed characters left characters exceeded
Pavan kumar Oct 06, 2017 at 08:22 AM
0

Hi Sriprasad,

Thank you so much for the response.Please find attached sample file and also find the attached image which converted using PI for better understanding.Some fileds does not have the data and comes with spaces which you can find in the sample text file.Below are the field lengths which used in PI for the content conversion for your reference.

11,9,41,11,5,11,15,7,7,6,6,5,6,5,5,5,5,5,5,11,42

Thanks In Advance

Pavan

capture.jpg

sample-file.txt

Share
10 |10000 characters needed characters left characters exceeded