Skip to Content
0
Former Member
Nov 29, 2006 at 05:25 PM

File Content Conversion Removes Leading Blank/Space

534 Views

I'm having a problem where file content conversion is trimming leading blanks/space/whitespace from fields when reading in the inbound file. I've seen where people have posted that you need to use fieldContentFormatting to prevent content conversion from stripping the leading/trailing whitespace. I added that parameter to my list (see below example) but it still appears to be trimming the leading whitespace. Look forward to hearing your thoughts. Here are the details:

I'm using fixed length file content conversion for Sender File Adapter (SP15). I have the following parameters set:

Document Name = MaterialData

Recordset name = item

Recordset Structure = MaterialLine, 1

I have:

MaterialLine.fieldNames = matno_external, mat_description

MaterialLine.fieldFixedLengths = 40, 40

MaterialLine.fieldContentFormatting = nothing, nothing

The following is the input file (notice spaces prior to second occurrence of material numbers)

ZED00000001 AIMS LIGHT A

ZED00000001 AIMS LIGHT B

ZED00000002 AIMS SWITCH A

ZED00000002 AIMS SWITCH B

ZED00000003 AIMS SEMICONDUCTOR A

ZED00000003 AIMS SEMICONDUCTOR B

The following is the source XML after file content conversion from SXMB_MONI (note spaces no longer exist in matno_external tag).

<?xml version="1.0" encoding="utf-8" ?>

- http://xxxxxxx.com/yyy/test">

- <item>

- <MaterialLine>

<matno_external>ZED00000001</matno_external>

<mat_description>AIMS LIGHT A</mat_description>

</MaterialLine>

</item>

- <item>

- <MaterialLine>

<matno_external>ZED00000001</matno_external>

<create_date>10/09/06</create_date>

<mat_description>AIMS LIGHT B</mat_description>

</MaterialLine>

</item>

- <item>

- <MaterialLine>

<matno_external>ZED00000002</matno_external>

<mat_description>AIMS SWITCH A</mat_description>

</MaterialLine>

</item>

- <item>

- <MaterialLine>

<matno_external>ZED00000002</matno_external>

<mat_description>AIMS SWITCH B</mat_description>

</MaterialLine>

</item>

- <item>

- <MaterialLine>

<matno_external>ZED00000003</matno_external>

<mat_description>AIMS SEMICONDUCTOR A</mat_description>

</MaterialLine>

</item>

- <item>

- <MaterialLine>

<matno_external>ZED00000003</matno_external>

<mat_description>AIMS SEMICONDUCTOR B</mat_description>

</MaterialLine>

</item>

</ns:MaterialData>