Question:
I'd like to create a TAB-delimited text file so I've tried to use :
constants: c_tab type x value '09'.
But the concatenate command doesn't allow you to concatenate an x type constant.
CONCATENATE H02
H03
HEADER1
HEADER2
H06
INTO W_OUTPUT SEPARATED BY c_tab.
Gives me an error. "C_TAB" must be a character-type data object (data type C, N, D, T or STRING). field string).
I've tried the search but haven't found anything. Can somebody help me?
_________________
ABAP Analyst-Programmer
http://www.Pharmascience.com
Montreal, QC, Canada
Answer:
Why don't you just use a structure?
Answer:
All lines are different, the number of fields is never the same for a line. That's why I want to concatenate.
Anybody know how to concatenate texte with an hexadecimal value?
_________________
ABAP Analyst-Programmer
http://www.Pharmascience.com
Montreal, QC, Canada
Answer:
Unicode requirements have caused a change in this area. If your ABAP has unicode checks enabled, a syntax error will occur.
Use the following to get around the problem:
data: begin of c_tab,
x(01) type x value '09',
end of c_tab.
..and reference c_tab in your concatenate string.
Answer:
Unicode requirements have caused a change in this area. If your ABAP has unicode checks enabled, a syntax error will occur.
Use the following to get around the problem:
data: begin of c_tab,
x(01) type x value '09',
end of c_tab.
..and reference c_tab in your concatenate string.
I could be wrong but I would expect that this gives an unicode error, too. Since c_tab was considered as a char-structure before 4.7 (in a non-unicode system) but as a NON-CHARLIKE Structure in a Unicode system.
There has been the same question a few days or weeks ago. So search the forum for a class starting with cl_abap.
Christian
Answer:
You'll surely get a unicode error in enterprise .. here is the soluction:
CONSTANTS:
gc_hex TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.
..
concatenate lv_value1 gc_hex lv_value2 into lv_final.
Answer:
Thanks a lot wiraone, it works fine! I'm not using ABAP OO, that's why I did'nt know.
_________________
ABAP Analyst-Programmer
http://www.Pharmascience.com
Montreal, QC, Canada