cancel
Showing results for 
Search instead for 
Did you mean: 

End of file should not be a new line

Former Member
0 Kudos

Hi All,

I am using file adapter with FCC.

The paremeters in my adapter are :

Header.fieldSeparator: ,(comma)

Header.endSeparator: 'nl'

Item.fieldSeparator: ,(comma)

Item.endSeparator: 'nl'

Item.fieldNames: <names of item fields>

Now when the file is been placed at FTP server, the cusrsor at the end of file is at new line.

My requirement is that I do not want end of my file as 'nl' but it should be end of last line Item.

That means when I open the file the cursor should be at the end of last line Item.

How is this possible?

Regards,

Sachi

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

There is one more thing you could try. Remove the Item.endSeparator: 'nl' parameter from your FCC configuration. This way, you will get the default end separator, which is a line break only, without a carriage return. See here for details:

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm

Maybe this will generate an output that is acceptable for you.

Hope this helps,

Greg

Former Member
0 Kudos

Hi Greg,

I have tried removing Item.endSeparator: 'nl' from my FCC parameters,

Still the output is same.

Actually what is happening, that when I am opening the file with Word Document and see the hidden characters,

I can see two enter/nl values, One at the end of last line Item and other just at first place of new line.

I want to suppress the second nl character.

Regards,

Sachi

former_member184681
Active Contributor
0 Kudos

Dear Sachi,

One more place to check - the output payload, that gets converted with FCC. Does it have an additional, empty Item node at the end? This would explain the additional new line character. Otherwise, I honestly can see no reason for it being created...

Greg

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Xi Support

As per you FCC parameters, you are defining the itemEndSeparator as 'nl'

This is the reason why you get nl as EOF.

Do you have any Footer element in you file?

If so you can define the EOF

Sourabh

Former Member
0 Kudos

Hi Sourabh,

I do not need any footer also in my file.

I just want that when the file is placed on FTP server. The cursor should be at end of last line item intead of new line.

Is there anyway by which I can suppress last new line at the end of the file??

Regards,

Sachi

Former Member
0 Kudos

Hi Sachi,

Try this. Open the file as a local copy. remove the last line. move the cursor at the begining. try to place this file again in the server. Let me know if it works.

Regards,

Lakshmi

Former Member
0 Kudos

Hi,

Thanks for your suggestion, but I will get hundereds of files every day.

so I cant change cursor position in each and every file.

pls suggest any other soution.

Thanks in advance.