06-19-2007 1:56 PM
Hi all,
Iam using the class CL_GUI_FRONTEND_SERVICES and method GUI_UPLOAD
instead of directly calling the GUI_UPLOAD FM
Please note the difference marked star against it
Let me know what i have to pass
DATA: INP TYPE STRING.
clear : inp.
MOVE in TO INP.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
EXPORTING
FILENAME = INP
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = SPACE
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = SPACE
CODEPAGE = SPACE
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
VIRUS_SCAN_PROFILE =
IMPORTING
FILELENGTH =
HEADER =
CHANGING
DATA_TAB = cr *******************************
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
NOT_SUPPORTED_BY_GUI = 17
ERROR_NO_GUI = 18
others = 19
.
The above code gives me an error
"CR" is not type-compatible with formal parameter "DATA_TAB".
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = INP
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = cr *****************************
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
When you see carefully CR is passed to DATA_TAB under Tables for FM
But it is passed under CHANGING in class.
Please let me know because iam bound to use the class and method not the fm directly
Thanks
06-19-2007 2:07 PM
06-19-2007 2:07 PM
06-19-2007 2:12 PM
Hi Rich,
Yes you are right. I don't see any errors.
Can you also tell what is the transaction to check for class and methods
I awrded full points to you
Thanks
06-19-2007 2:16 PM
06-19-2007 2:27 PM
Hi,
I selected gui_method from se24 from classCL_GUI_FRONTEND_SERVICES
and did a where used list.
For some reasons it doesnot return anything , is there a particular reason
Thanks
06-19-2007 2:32 PM
how did you checked the where-used-list..
Double click on the method GUI_UPLOAD in that class, now place the cursor on the method name and check out the where-used-list..you will get many programs..some of them
RCSBI010
RFDWZFF0
RFEBBE00
RFEBJP20
RFEKA700