Skip to Content

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

File content conversion - keyFieldValue with spaces only

Hello

I´m configuring MessageTransformBean module to convert a text flat file to XML file.

My flat file has fixed lengths and I´m using keyFieldValue to get the correct structure. The problem is that the header structure has '    ' (4 spaces) value at the keyFieldValue and I´m unable to make it work.

To clarify, this is the header line:

920       201505011635HEAD0001    03

                                                                        ^   4 spaces key field value

I already tried it many ways:

xml.Header.keyFieldValue:     (4 spaces)

xml.Header.keyFieldValue:'0x20''0x20''0x20''0x20'

I also have xml.fieldContentFormatting = nothing

If I change the source text file to:

920       201505011635HEAD0001aaaa03

and configure the module as:

xml.Header.keyFieldValue:aaaa

It works perfectly. So my configuration of fields and everything else is correct, the only problem are the spaces. I made some tests trying to use hex code for aaaa testing like '0x61''0x61''0x61''0x61' but hex code doesn´t work anyway. Woking on PI 7.11.

Any ideia?

Thanks

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