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

GUI_UPLOAD error

Former Member
0 Likes
2,378

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,519

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.

5 REPLIES 5
Read only

Former Member
0 Likes
1,520

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.

Read only

Former Member
0 Likes
1,519

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?

Read only

Former Member
0 Likes
1,519

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

Read only

Former Member
0 Likes
1,519

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.

Read only

Former Member
0 Likes
1,519

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