Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Data missing while downloading using gui_download

former_member599682
Discoverer
0 Kudos

Hello,

My program downloads excel data using function GUI_DOWNLOAD,
and some user have downloaded excel that data is missing after second header line.
If there are 1235 line data with second header on 1181 line,
then for me excel is downloaded full 1235 line.
But for some user, excel is downloaded only 1180 line.
_I fixed repeated header and tested, but the problem was not solved.

_Downloaded excel have data until BT column.

Any idea what is wrong for this case? (maybe some sapgui settings?)

Thanks & Regards.

3 REPLIES 3

DoanManhQuynh
Active Contributor
0 Kudos

I dont think GUI_DOWNLOAD have such that small limitation. It could be issue in coding, can you provide more detail?

0 Kudos


Hello Quynh Doan Manh
I agree about GUI_DOWNLOAD cause for me there is no problem.
Only for some user data is missing.
So.... I think there is no issue in coding.
Please check below.

Regards.

*-------------------------------------------------------------*
CALL METHOD cl_gui_frontend_services=>file_save_dialog
EXPORTING
default_extension = 'XLS'
CHANGING
filename = lv_filename
path = lv_path
fullpath = lv_fullpath
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.

IF lv_fullpath IS INITIAL.
RETURN.
ENDIF.

CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_fullpath
filetype = 'DAT'
codepage = '8500'
TABLES
data_tab = <gt_excel>
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
*-------------------------------------------------------------*


0 Kudos

OK, those above dont have issue for sure, what im asking about is how did you process <gt_excel>. is the missing always happended with specific user? maybe there are some special treatments or conditions you didnt think about yet. It better to debug with watch point and see what happended at the time of second header processed.