cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver file adapter creates an innecesarry extra line

Former Member
0 Kudos

Hi,

I have an issue with an extra line that add the receiver file adapter with the content conversion.

The file XML that the file adapter has to convert, is the next;

<root>

<cofig>

<FileName>NameOfTheFile.txt</FileName>

</cofig>

<lines>

<line>

<data>BBBBBBBBBBBBBBBBBBBBBB</data>

<data>Aaaaaaaaaaaaaaaaaaaaaa</data>

</lines>

</root>

Because FileName is not necessary, I remove it with:

cofig.fieldFixedLengths 0

cofig.fixedLengthTooShortHandling CUT

but it leaves an empty line that i don't want. that is, the text in the file start in the second line.

Any help?

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

Can you do a small change in your mesg. structure ?

change it to....

<root>

<lines>

<line>

<data>BBBBBBBBBBBBBBBBBBBBBB</data>

<data>Aaaaaaaaaaaaaaaaaaaaaa</data>

</lines>

<i><b><cofig>

<FileName>NameOfTheFile.txt</FileName>

</cofig></b></i>

</root>

and then use

cofig.fieldFixedLengths 0

cofig.fixedLengthTooShortHandling CUT

followed by

endSeparator 0

Ref: for more details.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Martina / Vijay,

I have also the same problem with the header.

I tryied with the option given by you... i.e shifting the header after the data.

Then also after writing the data the cursor is going to next line to print the header which is not needed in our case. By using the Cut .. paramter. I could remove the header but the problem is the cursor is lying in that line only.. which is appearing as extra CR/LF line in the file. Hope the problem is clear to you.

My doub't is , weather it is possible to remove this or not?

I tried with various parameters. but in vain. Here we need to bring the cursor back to the previous line. i.e; end of data record.

Early response is highly appreciated.

Many Thanks in Advance.

Jitender

Former Member
0 Kudos

HI,

Also check,

Fixed Column Width of the Text Document:

NameA.absoluteRowWidth=<noOfColumns>

If the separators do not contain any line breaks, the text document is generated as a single line of text. To restrict the width of the text, use this parameter. <noOfColumns> represents the maximum number of columns in this case. This parameter also functions together with the specification of a line break for xml.endSeparator.

This value requires NameA.addHeaderLine=0 to be specified.

Regards

Chilla..

Former Member
0 Kudos

Hi,

check NameA.fixedLengthTooShortHandling = cut / ignore

http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

Regards

Chilla..