cancel
Showing results for 
Search instead for 
Did you mean: 

Trailing blank line when writing file

Former Member
0 Kudos

Hi All!

I'm having a little trouble with the file adapter. I have an interface, which picks up a file with the file adapter, and then in a business process goes through some steps.

First it is converted to an XML file, with some mapping (XSLT). Then, through RFC, additional data is requested from an R/3 system. The R/3 data and the data from the file are then merged through yet another mapping (XSLT). This all goes fine, no problems here.

Then, at the end, the merged message is written to a server, with the file adapter again, as a CSV file. This works also, but every time there is a carriage return at the end of the file. You have several lines of data, and then a return, so you get a blank line at the end of the file. I have done nothing in the configuration that justiefies this, and have no idea where this return comes from.

Can anyone please give me some pointers on this? It seems that every interface that writes files in our company suffers from the same problem...

Please, be gentle, because I am quite new to SAP XI

Thanks in advance!

(I am sorry, but I will go home in 15 minutes, but I thought I could post it for all of you who are in a different time zone. I will see if I can check again later tonight from home...)

Accepted Solutions (1)

Accepted Solutions (1)

STALANKI
Active Contributor
0 Kudos

Yordy..Do give the endserator for only last structure..are u using variable substitution?why a blank line is written always?..some thing wrong in ur configuration parameters..Can u paste the structure and configuration parametter so that we can help n a better fashion?

Former Member
0 Kudos

The message looks like this:

ROOT
 - Actualsales
    - data1
      data2
      data3
      data4

In my configuration, I have set the following Content Conversion parameters (originally):

Recordset Structure: ROOT,Actualsales

ROOT.fieldSeparator '0x20'

Actualsales.fieldSeparator ;

So this is no standard Recordset - Row structure. This interface was here long before me, so changing the structure of the data type is not really an option, or at least not one my boss is gonna like.

I experimented with setting the endSeparator for Actualsales to nothing, or zero, and then all my data was written to the file in a single line.

This is some frustrating stuff! But fun, none the less.

Answers (1)

Answers (1)

moorthy
Active Contributor
0 Kudos

Hi,

check with .endSeparator = 0.

This works if your data type is of generic type. i.e Row format

Check this-

REgards,

Moorthy

Former Member
0 Kudos

Hi Moorthy,

thank you for your reply. This method does help a little, but now all my data is displayed on a single line.

I will do some more fiddling with the configuration, and will keep you posted...

Regards,

Yordy