2013 Apr 02 4:19 PM
Hello everyone,
I think I read all the posts and no clear answer was given at this topic. I have a DBF file on the application server and I have to fill an internal table with the data from the file.
I tried using GUI_DOWNLOAD, but it seems it does not work in background. WS_DOWLOAD is obsolete.
ALSM_EXCEL_TO_INTERNAL_TABLE returns sy-subrc 2, I am not sure if it does not support download from application server or it does not understand DBF files.
Has anyone found a solution to this problem?
Thanks and regards,
Efren
2013 Apr 02 7:41 PM
Hi Efren,
Yes, you will not be able to use GUI_DOWNLOAD in background mode (once it needs an active frontend) so, as Azeem suggested above, will need to use OPEN/READ DATASET instead.
But I did some research about your dbf reading question and I'm affraid you can't read it directly though OPEN/READ and would need to first convert it to a flat text file.
Regards,
Edgar
Hello everyone,
I think I read all the posts and no clear answer was given at this topic. I have a DBF file on the application server and I have to fill an internal table with the data from the file.
I tried using GUI_DOWNLOAD, but it seems it does not work in background. WS_DOWLOAD is obsolete.
ALSM_EXCEL_TO_INTERNAL_TABLE returns sy-subrc 2, I am not sure if it does not support download from application server or it does not understand DBF files.
Has anyone found a solution to this problem?
Thanks and regards,
Efren
2013 Apr 02 6:22 PM
Please use :
Open dataset to open file.
Read dataset to read the file.
http://help.sap.com/saphelp_40b/helpdata/en/34/55cad198482bc0e10000009b38f91f/content.htm
2013 Apr 02 7:41 PM
Hi Efren,
Yes, you will not be able to use GUI_DOWNLOAD in background mode (once it needs an active frontend) so, as Azeem suggested above, will need to use OPEN/READ DATASET instead.
But I did some research about your dbf reading question and I'm affraid you can't read it directly though OPEN/READ and would need to first convert it to a flat text file.
Regards,
Edgar
2013 Apr 02 10:09 PM
Hi Edgar,
Thanks for your answer. I forgot to say that I tried also open/read dataset. First, I got an error with the codepage(# is not an accepted character). After I used binary legacy mode and it worked. The problem is that only the first line from the file is being read and even this line is not read completely. The target is a string or a char with 1024 characters, but only a part of the first line is read, and the other lines are not.
The conversion can be done by ABAP coding or are you reffering to external conversion? I need to do it in ABAP...
Regards,
Efren
2013 Apr 03 3:34 PM
Hi,
Solved:
CALL METHOD cl_rsan_ut_appserv_file_reader=>appserver_file_read
EXPORTING
i_filename = lv_file_name"dbf file on server
CHANGING
c_data_tab = lt_file_table.
Regards,
Efren
2013 Apr 03 7:16 PM
Hi Efren,
Sorry for delay in reply, having a bit busy day today...
Good to know you could solve that and, better, will keep your solution in my mind for future reference.
Regards,
Edgar