cancel
Showing results for 
Search instead for 
Did you mean: 

File to File scenario

Former Member
0 Kudos

Hello,

I have on file to file scenario.

The file sender is nfs and file receiver is ftp.

I just want to move a txt file.

The file in the sender side has '0x0A' as end of file, but when it moves to the ftp server the end of file disappears and looks, everything in the same line.

Any ideas?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Finally I changed the scenario to proxy to SFTP and with the adapter XML2Plain

I could do everything I need.

localejbs/AF_Modules/MessageTransformBean

http://caihemm2.blog.163.com/blog/static/209765083201210522427135

Thanks to everyone.

Answers (3)

Answers (3)

former_member208396
Participant
0 Kudos

Hello Alejandro,

Are you using mode: append in receiver adapter..??

If Yes, then try to create file of type  ".xls" rather ".txt". You will be able to see the required changes.

Regards,

Vishnu

Former Member
0 Kudos

The write modus is Direct and the file should not have any extension.

diego_gabriel
Participant
0 Kudos

Hello Alejandro,

Try to use Transfer Mode Binary in your Sender and Receiver Channel.

Regards,

Diego

Former Member
0 Kudos

Where can I found the transfer mode?

I can only set to binary the file type.

Thanks

former_member186851
Active Contributor
0 Kudos

That option only.Try using Binary

Former Member
0 Kudos

With this option, it does not work.

engswee
Active Contributor
0 Kudos

You are using SFTP receiver and not FTP, and that's why there is no such option on the SFTP channel and therefore it will not work.

Before trying to fix this, have you tried viewing the file on Notepad++ to see if the contents are on one line or not? '0x0A' is a line feed (LF) character which most likely means that your sender system is on a Unix file system. If you view a file with a Unix EOL character on regular Notepad on Windows, it will all appear in the same line. This is because Windows EOL requires both carriage return (CR) and line feed (LF).

If you can see the content properly on Notepad++, the next question would be whether your target system requires just LF or CRLF. It could be that it just affects your viewing of the file on your laptop, but the target system can still process it correctly.

If you really need CRLF in the target system, then you can add the module SAP XI Sample/ConvertCRLFfromToLF to your SFTP receiver channel with the following parameter:

mode = any

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng,

I have tried your solution but it does not work. Probably I do something wrong.

I have change the end of the file origin to '0x0D''0x0A'

So the receiver that creates the file has this content conversion

Now in the scenario from file to SFTP, I write the module conversion that you said.

The file that is created in the SFTP receiver has CRLF and not LF only.

Any idea?

Thanks.

engswee
Active Contributor
0 Kudos

Alejandro

You haven't answered my questions above. Without answering them properly we might all be going on a wild goose chase.


Before trying to fix this, have you tried viewing the file on Notepad++ to see if the contents are on one line or not? '0x0A' is a line feed (LF) character which most likely means that your sender system is on a Unix file system. If you view a file with a Unix EOL character on regular Notepad on Windows, it will all appear in the same line. This is because Windows EOL requires both carriage return (CR) and line feed (LF).

If you can see the content properly on Notepad++, the next question would be whether your target system requires just LF or CRLF. It could be that it just affects your viewing of the file on your laptop, but the target system can still process it correctly.

former_member186851
Active Contributor
0 Kudos

Hello Alejandro,

you have used any File content conversion?

'0x0A'- Means new line.

Former Member
0 Kudos

The file in the sender side was created with another interface, with content conversion and on there was set the '0x0A' as the endSeparator.

The problem is when I want to move this file with the endSeparator '0x0A' to the file receiver.

For this scenario I don´t want to do any file content conversion, just move the file as it is in the sender side.

former_member186851
Active Contributor
0 Kudos

you have any mappings or just a by pass scenario?

Former Member
0 Kudos

pass scenario

former_member186851
Active Contributor
0 Kudos

Hello.

Try changing the mode as Diego discussed.