‎2008 Jul 01 5:03 PM
Hi,
I am getting a dump error while using the FM GUI_UPLOAD, i am using the FM KD_GET_FILENAME_ON_F4 to get the file name and the Parameter is defined as parameters: p_pcfile type rlgrap-filename. The error is CALL_FUNCTION_CONFLICT_TYPE
CX_SY_DYN_CALL_ILLEGAL_TYPE
Is there any other way to over come this issue.
Thanks
Kumar
‎2008 Jul 01 5:09 PM
In FM GUI_UPLOAD parameter FILENAME is of TYPE STRING but u r passing p_pcfile which is of type rlgrap-filename thats why u r getting dump.
take a variable like :
data: l_file type string.
Move p_pcfile to this variable
l_file = p_pcfile.
Now pass l_file to the FM GUI_UPLOAD.
Regards,
Joy.
‎2008 Jul 01 5:09 PM
In FM GUI_UPLOAD parameter FILENAME is of TYPE STRING but u r passing p_pcfile which is of type rlgrap-filename thats why u r getting dump.
take a variable like :
data: l_file type string.
Move p_pcfile to this variable
l_file = p_pcfile.
Now pass l_file to the FM GUI_UPLOAD.
Regards,
Joy.
‎2008 Jul 01 5:10 PM
Is the error happening in KD_GET_FILENAME_ON_F4?
Can yo ushow ho are you calling it?
Wich sentence does the dump marks as the conflict?
‎2008 Jul 01 5:12 PM
Hi Ram,
Welcome to SDN...
The reason behind your dump is GUI_UPLOAD function module exporting FILENAME parameter is of type STRING and you are passing the result filename coming from KD_GET_FILENAME_ON_F4 function module which is of type RLGRAP-FILENAME.
Please take an intermediate variable which is of type string and move the value of KD_GET_FILENAME_ON_F4 filename to this variable before passing to GUI_UPLOAD function module.
DATA V_FILENAME TYPE STRING.
V_FILENAME = Result of KD_GET_FILENAME_ON_F4 filename.
CALL FUNCTION 'GUI_UPLOAD'
FILENAME = V_FILENAME.
Thanks,
Vinay
‎2008 Jul 01 5:57 PM
hi check this simple example.....
send the file to a string before giving it to the gui_upload.
REPORT ZVENKATTEST0.
data: begin of itab occurs 0,
a type c,
c type c,
b type i,
end of itab.
itab-a = 'a' .
itab-c = ':'.
itab-b = 1 .
append itab .
itab-a = 'b' .
itab-c = ':'.
itab-b = 2 .
append itab .
itab-a = 'c' .
itab-c = ':'.
itab-b = 3 .
append itab .
data: file type string .
file = 'C:\Documents and Settings\venkatapp\Desktop\testing1.txt'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = file
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = ':'
TABLES
DATA_TAB = itab.
‎2008 Jul 02 5:45 AM
Hi,
Try this coding..hope it works
DATA : FILE_STR TYPE STRING.
PARAMETERS : P_FLNME LIKE RLGRAP-FILENAME. "File Name
FILE_STR = P_FLNME.
*UPLOADING FILE INTO INTERNAL TABLE
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE_STR
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
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.
Thanks & Regards,
Y.R.Prem Kumar