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

Call_conflict_function_type runtime error when calling GUI_upload

Former Member
0 Likes
1,157

I am trying to upload a csv file into an itab to insert into a database table, but I am getting the call_conflict_function_type runtime error, saying "the function module interface allows you to specify only fields of a particular type for "filename". The field d_file (the filename i am using) specified here is a different type. How can i rectify this???

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,038

check out the definition of the filename parameter (importing) in gui_upload

REFERENCE(FILENAME) TYPE  STRING

its type string.

if your variable d_file is of any other type you will get that error.

change the definition of d_file to type string .

Regards

Raja

7 REPLIES 7
Read only

Former Member
0 Likes
1,038

check the file type as 'BIN' or 'DAT' or 'ASC'...

Read only

0 Likes
1,038

file type is already 'ASC', so that is not the issue

Read only

0 Likes
1,038

1ST capture file from application server to internal table using open dataset and close data set.

Use the Function Module SAP_CONVERT_TO_CSV_FORMAT to convert the internal table into Comma separated format then download this internal table using the Function Module GUI_DOWNLOAD.

EX-

Coding -

TYPE-POOLS: truxs.

TYPES:

BEGIN OF ty_Line,

vbeln LIKE vbap-vbeln,

posnr LIKE vbap-posnr,

END OF ty_Line.

TYPES: ty_Lines TYPE STANDARD TABLE of ty_Line WITH DEFAULT KEY.

DATA: itab TYPE ty_Lines.

DATA: itab1 TYPE truxs_t_text_data.

SELECT

vbeln

posnr

UP TO 10 ROWS

FROM vbap

INTO TABLE itab.

CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'

EXPORTING

i_field_seperator = ';'

TABLES

i_tab_sap_data = itab

CHANGING

i_tab_converted_data = itab1

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION 'GUI_DOWNLOAD'

EXPORTING

filename = 'C:TEMPtest.txt'

TABLES

data_tab = itab1

EXCEPTIONS

OTHERS = 1.

Read only

0 Likes
1,038

Hi Daniel,

when u get the dump scroll down to check the error analysis..

u will actuall get the details of the dump over there...

kindly check the header table u are passing is of the same type specified in FM...

type conflict generally occues due mismatch in the field type or table type u are passing

Regards,

Sai

Read only

athavanraja
Active Contributor
0 Likes
1,039

check out the definition of the filename parameter (importing) in gui_upload

REFERENCE(FILENAME) TYPE  STRING

its type string.

if your variable d_file is of any other type you will get that error.

change the definition of d_file to type string .

Regards

Raja

Read only

0 Likes
1,038

That was the issue, thanks a million!

Read only

0 Likes
1,038

Hi Daniel,

if you had searched the forum with the key word "call_function_conflict_type" (the error thrown by the system) you would have got 100s of threads on this subject. i had only decided to answer your query , because others didnt read your question properly and the answers weren't right.

In future, i suggest you to search the forum before posting your questions.

Thanks for understanding.

Regards

Raja