‎2008 Jul 26 12:48 PM
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???
‎2008 Jul 26 1:07 PM
check out the definition of the filename parameter (importing) in gui_upload
REFERENCE(FILENAME) TYPE STRINGits 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
‎2008 Jul 26 12:58 PM
‎2008 Jul 26 12:59 PM
‎2008 Jul 26 1:01 PM
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.
‎2008 Jul 26 1:02 PM
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
‎2008 Jul 26 1:07 PM
check out the definition of the filename parameter (importing) in gui_upload
REFERENCE(FILENAME) TYPE STRINGits 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
‎2008 Jul 26 1:26 PM
‎2008 Jul 26 1:58 PM
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