‎2009 Feb 19 9:57 AM
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.
‎2009 Feb 19 10:00 AM
in using function module i think u cant use ur own defined messages.
u should use the messages which are defined itself by FM
‎2009 Feb 19 10:02 AM
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.
‎2009 Feb 19 10:02 AM
if the given filename or path is invalid,the error message is triggered...i just checked it...
‎2009 Feb 19 10:07 AM
Hi,
IF suppose my file path is like this :
Output file : xyz
then i am not getting error message .
‎2009 Feb 19 10:19 AM
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...
‎2009 Feb 19 10:05 AM
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
‎2009 Mar 04 1:14 PM