12-16-2007 11:40 AM
Hi Gurus,
I have to read business partner data from the binary format of an excel file in application server. I searched in forums but only found solutions about using ole2 objects, but in ABAP application server there is no excel APIs, so I have to read binary directly. You know it is rather difficult, do you have any clues or sample function modules? Thanks!
Best regards,
Hao
12-16-2007 2:23 PM
Hi Deng,
I never heard of a method to achieve it. It will be easier to load the file into excel and save it as tab-delimited or CSV text file.
You can use the function modules from SE37 to get your files from and to server:
ARCHIVFILE_CLIENT_TO_SERVER
ARCHIVFILE_SERVER_TO_CLIENT
Don't forget to mark the lowercase checkbox in SE37.
Regards,.
Clemens
12-17-2007 2:47 AM
Hi Clemens,
Thanks for your quick reply!
But my requirement is to run a job in an application server periodically without the help of any client. So I'm afraid your solution wouldn't work. I guess I have to go a tedious way to deal with xls files.
Regards,
Hao
12-17-2007 8:18 AM
Hi Deng,
I think there are two possible solutions:
1. Get the file created as tab-delimited or CSV as recommended earlier
2. Excel files are BIFF (Binary Interchange File Format). The Microsoft office 97 developer kit has tools for analysis and access. You may search for existing interface software or create your own ABAP code. Publish it on SDN and win great merits.
Regards,
Clemens
12-18-2007 4:35 PM
Hi Clemens,
You know it is a big challenge for me and even for some experts. Hope I can do it.
Thanks!
Best regards,
Hao
08-30-2010 10:06 AM
Solution:
1. Use function module ARCHIVFILE_SERVER_TO_CLIENT to transfer an excel file from an application server to a client workstation (use some temporary directory as a target path, for example from environment variable TEMP).
2. Use function module ALSM_EXCEL_TO_INTERNAL_TABLE, specify a path to the file on the client workstation.
3. Delete the file on the client workstation using CL_GUI_FRONTEND_SERVICES class (FILE_DELETE method).
Done.
04-24-2015 1:46 PM