Skip to Content
0
Former Member
May 12, 2008 at 03:55 AM

GUI_DOWNLOAD problem

222 Views

Hi

i am using FM GUI_DOWNLOAD to download Material master data to excel file into local drive. program is working fine.when i run this program in Background, job was cancelled. pls help me.

following is my coding

FORM download_data_pc .

DATA: lv_filename TYPE string.

CLEAR lv_filename.

MOVE p_pcfile TO lv_filename.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = lv_filename

filetype = 'DBF'

write_field_separator = 'X'

  • append = 'r'

  • IMPORTING

  • filelength = lv_file_len

TABLES

data_tab = it_material

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.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM. " DOWNLOAD_DATA_PC