cancel
Showing results for 
Search instead for 
Did you mean: 

File transfer from Windows to Unix

Former Member
0 Kudos

Hey Guys,

I am using a BAPI called BAPI_DOCUMENT_CHECKOUTVIEW2 to checkout documents from the SAP server to a remote Unix(HP-UX) server. A C++ program in the target unix server calls this BAPI which internally calls HTTP_GET_FILE to do this transfer. This BAPI works fine if the SAP is on a UNIX environment, but doesnt work when I use the same BAPI which is on a different SAP instance on Windows environment. Any input on transfering a file from a windows to a unix environment will be very helpful.

Thanks,

Rohit

Accepted Solutions (0)

Answers (1)

Answers (1)

markus_doehr2
Active Contributor
0 Kudos

Please specify "doesn´t work". Do you get any error messages? Do you have saphttp.exe on that windows box?

--

Markus

Former Member
0 Kudos

Thanks for your reply. I will exaggerate a little bit. 'Doesn't work' means the BAPI does not copy the file from the SAP server(Windows) to the UNIX server. 'IT works' means the BAPI copies the file from SAP Server (UNIX) to Unix Server. we do have the executable on all the servers at the required locations.

Former Member
0 Kudos

Error message is " Cannot create "the specifiedfile""

Former Member
0 Kudos

just to add we have also made sure the directory we are saving the file into has 777 access, so definately not an authorisation issue

Former Member
0 Kudos

Hi Rohit,

I would recommend you to use any FTP tool and try transferring the files manually and test it with the same user id.

Also, ensure that the ASCI mode is switched on while transferring files from windows to unix environ.

regards,

VInodh.

markus_doehr2
Active Contributor
0 Kudos

It depends which file he transfers. If it´s a binary file ASCII would destroy the content.

Another issue that comes to my mind is the fact, that HP-UX is a BigEndian platform, Windows is LittleEndian.

Is your program aware of that?

--

Markus

Former Member
0 Kudos

Hi vinod,

I have tried using regular FTP tools and it works fine. I can add that code to the BAPI and make a custom BAPI and solve the issue, but first, i dont want to create a custom BAPI and second, if the BAPI does it from unix to unix it should definately do it from windows to unix also. I am just missing something in between.

Rohit

Former Member
0 Kudos

Hey Marcus,

Thank you for your reply. Can you exagerrate more about the big endian and little endian and how would it affect the transfer?

Thanks,

Rohit

markus_doehr2
Active Contributor
0 Kudos

if you use binary FTP it won´t be a matter. If you use "your own" method, it can be tricky.

For endianess see here:

http://en.wikipedia.org/wiki/Endianness

That is also the reason why you e. g. can´t copy database files created on HP-UX to a Windows box but you can copy them to Solaris/SPARC or AIX.

--

Markus

Former Member
0 Kudos

I am not using my own method . The FTP or HTTP is carried out by standard SAP code which i think and hope should be platform independent.

Thanks,

Rohit