‎2007 Oct 11 4:43 AM
Hi,
I tried to use this FM SAP_CONVERT_TO_TEX_FORMAT to convert my internal table's data to comma separator but it hit runtime error.
The runtime error says :-
Runtime Errors CALL_FUNCTION_CONFLICT_TAB_TYP
Exceptn CX_SY_DYN_CALL_ILLEGAL_TYPE
I tried to convert an internal table with two fields, it worked but it dont work when i was trying to convert the internal table with 53 fields. Please advice. It is not feasible to hardcode the comma into my structure or use concatenate way.
‎2007 Oct 11 4:51 AM
hi
good
go through this link
http://sap4.com/wiki/index.php?title=SAP_CONVERT_TO_TEX_FORMAT
reward point if helpful.
thanks
mrutyun^
‎2007 Oct 11 4:59 AM
Hi Mrutyun,
Thanks for the link but that doesn't solve my problem.
Hi Viji,
I'm using the same way as you suggested before i posted the question on this forum. It didn't work.
Hi Guys,
I realised that the main problem occurs because i have such data (as below) in my internal table which leads to runtime error. The table -> i_tab_converted_data cannot accept text that is non-character type.
Eg data : Siège
Is there any way that i can overcome the above? The runtime error explains as the below .
{ Only character-type data objects are supported at the argument
position "op1" for the statement
"IF ... op1 CO op2 ...".
In this case, the operand "op1" has the non-character-type "I". The
current program is flagged as a Unicode program. In the Unicode context,
type X fields are seen as non-character-type, as are structures that
contain non-character-type components. }
Please advise.
Thanks,
Loo
‎2007 Oct 11 4:51 AM
Hi,
Check this sample code,
CALL FUNCTION 'SAP_CONVERT_TO_TEX_FORMAT'
EXPORTING
i_field_seperator = '|'
TABLES
i_tab_sap_data = t_itab
CHANGING
i_tab_converted_data = w_text
EXCEPTIONS
conversion_failed = 1
OTHERS = 2.Thanks,
Reward If Helpful.
‎2007 Oct 11 9:59 AM
Hi Guys,
I realized that it wasn't the data problem, it was the structure that i'd declared. This FM SAP_CONVERT_TO_TEX_FORMAT @ SAP_CONVERT_TO_CSV_FORMAT
does not take data type of integer.
Hope this helps other too!
Cheers,
Loo