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

Error message not geting

Former Member
0 Likes
897

HI,

When i am downloading file, In selection scree file path given wrong also. It is not giving error message.

This is sample code for this.

CASE 'X'.

WHEN rb_eloc.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

  • BIN_FILESIZE =

filename = l_p_efile

FILETYPE = 'ASC'

tables

data_tab = i_file

  • FIELDNAMES =

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 e006.

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

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

ENDIF.

7 REPLIES 7
Read only

Former Member
0 Likes
876

in using function module i think u cant use ur own defined messages.

u should use the messages which are defined itself by FM

Read only

Former Member
0 Likes
876

hi ,

write the message as

if sy-subrc NE 0.

MESSAGE text-e01 TYPE 'E'.

endif.

you can use the message that the FM is giving by uncommenting them

thanks.

Read only

former_member242255
Active Contributor
0 Likes
876

if the given filename or path is invalid,the error message is triggered...i just checked it...

Read only

0 Likes
876

Hi,

IF suppose my file path is like this :

Output file : xyz

then i am not getting error message .

Read only

0 Likes
876

Hey..

if u are giving only file name and not any path .. for example..

xzy.txt

then..it will save the file in a default path.. it is either C: or 😧 or the SAP Work Directory folder.. either one amongst the three...

check for the files in these... you will get it...

Read only

Former Member
0 Likes
876

HI Srinu,

You have used this

IF sy-subrc = 0.

MESSAGE e006.

ENDIF.

istead use

IF sy-subrc NE 0.

MESSAGE e006.

ENDIF.

Edited by: Prakash Pandey on Feb 19, 2009 11:05 AM

Read only

Former Member
0 Likes
876

thanks