‎2006 Apr 06 12:56 PM
hi,
I use the fm 'GUI_DOWNLOAD' to download some information in a file. Now I call the fm in my program:
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
* BIN_FILESIZE =
FILENAME = p_file
FILETYPE = 'ASC'
* IMPORTING
* FILELENGTH =
CHANGING
DATA_TAB = tab[]As importing-parameter I use following tab:
DATA: BEGIN OF st,
line(1000),
END OF st.
DATA: tab LIKE standard TABLE OF st WITH HEADER LINE.Now if I call the fm like:
.....
DATA_TAB = tab
I get an error. If I call it with "DATA_TAB = tab[]" -> there is no error --> why???
Thanks
markus
‎2006 Apr 06 1:02 PM
because <b>tab</b> means header line not the internal table.
<b>tab[]</b> means internal table.you need to pass the internal table not the header line..
Cheers,
Abdul Hakim
‎2006 Apr 06 1:01 PM
Hi,
The size of the field string used in Data_tab is 255 characters and you have declared the tab as 1000 characters. That is the reason for the problem.
‎2006 Apr 06 1:02 PM
Hi,
U have to use FunctionModule GUI_DOWNLOAD to download data.
hope this helps,
priya
‎2006 Apr 06 2:35 PM
Nonsens. Regarding ERP 2005/2004 and Unicode you have to use Methods of the class cl_gui_frontend_services.
‎2006 Apr 06 1:02 PM
because <b>tab</b> means header line not the internal table.
<b>tab[]</b> means internal table.you need to pass the internal table not the header line..
Cheers,
Abdul Hakim
‎2006 Apr 06 1:03 PM
Markus,
That is because you have declared the table with header line. So, just tab means the header line and is nothing a single record. tab[] means the body of the table and that is what is expected in the parameter.
Regards,
Ravi
Note : Please mark the helpful answers
‎2006 Apr 06 1:04 PM
Hi
when you r passing the parameter as tab the table is not inatializing properly so that you r getting the error but when you are giving as tab[] the table is getting initialized and value is now store in the fields of the table so it is not giving the error.
I hope this will help you to solve your problem.
Thanks
Mrutyunjaya Tripathy
‎2006 Apr 06 1:06 PM
DATA: ITAB like vbak occurs o with header line. CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = pc_filename
filetype = 'ASC'
write_field_separator = 'X'
append = 'X'
CHANGING
data_tab = ITAB[]
EXCEPTIONS
OTHERS = 1.Regards
vijay