Application Development and Automation 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: 
Read only

Handle error message

Former Member
0 Likes
394

hi

How to handle error message for following FM?

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = lv_filename

filetype = 'DBF'

write_field_separator = 'X'

  • IMPORTING

  • filelength = lv_file_len

TABLES

data_tab = it_final

fieldnames = t_header

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
367

Hi,

use structure BDCMSGCOLL.

Pass parameters

MSGNR---MESSAGE NUMBER

MSGTYP----MESSAGE TYPE(A, E, I, S, X, W)

MSGSPRA----LANGUAGE

MSGID---BI MSG ID

MSGV1, MSGV2, ....MSGV4----VARIABLES/VALUES

After the DOWNLOAD.....

IF SY-SUBRC EQ 0.

LOOP....

call that BDCMSGCOLL....

ENDLOOP.

REWARD IF USEFUL......

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
367

Reward points..

Read only

Former Member
0 Likes
368

Hi,

use structure BDCMSGCOLL.

Pass parameters

MSGNR---MESSAGE NUMBER

MSGTYP----MESSAGE TYPE(A, E, I, S, X, W)

MSGSPRA----LANGUAGE

MSGID---BI MSG ID

MSGV1, MSGV2, ....MSGV4----VARIABLES/VALUES

After the DOWNLOAD.....

IF SY-SUBRC EQ 0.

LOOP....

call that BDCMSGCOLL....

ENDLOOP.

REWARD IF USEFUL......

Thanks.