cancel
Showing results for 
Search instead for 
Did you mean: 

PI removes space from my flat file

Former Member
0 Kudos

Hello all

I have a scenario where PI picks up file, convert to xml, mapping, convert to file again. File --> XI --> File.

My issue is, in the source file, some fields have value with leading and ending spaces, when it is converted to XML, those leading and ending spaces get removed which is not what we want. We want all spaces preserved and put in the destination file.

Is there any way to not let PI remove the leading or ending spaces while converting to XML?

In my specific case, the file contains data objects with fixed length with leading or ending spaces to make up the length, because the spaces get removed, the receiver can NOT reconstruct the data object any more.

Thanks

Eric

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Eric,

You could ensure the content stays as it was input by explicitly defining this action using File Content Conversion parameters. Go to the url for Configuring the Sender File Adapter

http://help.sap.com/saphelp_NW04/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

Then page down to Content Conversion Parameters and select more information on Converting File Content in a Sender Adapter

Refer to the section Parameters for Recordset Structures

○ NameA.fieldContentFormatting

■ Enter trim to remove all the leading and subsequent blanks for a value found. This is the default.

■ Enter nothing to ensure that the value remains unchanged.

FYI - Viewing in SXMB_MONI can be misleading as the spaces are removed in this display view. Opening up the message in say Notepad will show physical content.

Regards,

Mike

Former Member
0 Kudos

Mike, you are genius. 10 points assigned

Former Member
0 Kudos

Hi Mike

you solved my problem with File adapter. Can you help me further on JMS (MQ) adapter?

I have scenario MQ (JMS) --> XI --> file. Same issue as in my original question, I want the leading and ending spaces not be removed when converting JMS file to XML. Apparently the parameter fieldContentFormatting only applies to File adapter, for JMS, this parameter is not applicable for the module localejbs/AF_Modules/MessageTransformBean. Do you have any idea how to solve this similiar issue?

Thanks

Eric

0 Kudos

Hi - I have the same issue with the JMS adapter too. Has anyone run into this and resolved?

Keith

Former Member
0 Kudos

Any updates? I'm facing the same problem with the MQ Adapter triming the white space.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

If you are checking the payload in SXMB_MONI it will not show you extra spaces there.

Try to see the output if it varies. Then you need to tweak FCC parameters.

Thanks

Gaurav