2005 Sep 05 8:14 AM
Friends,
I just wanted to concatenate 2 fields by a tab.
Below is the code for the same.
concatenate lv_data CL_ABAP_CHAR_UTILITIES=>horizontal_tab
lv_data1 into lv_final.
My Problem :
The values are separated by # and not by space!!
How to resolve it.
Regards,
Usha
2005 Sep 05 9:38 AM
Hi Raja,
Can you explain me where can we use these class attributes?
Usha
2005 Sep 05 8:16 AM
Hope in debug mode it will look like # & not in output or in excel.
regards
gv
2005 Sep 05 8:20 AM
as Venkat said, in the debug mode it will show as # but in the file it will be a tab.
Regards
Raja
2005 Sep 05 8:34 AM
Given below is my code & output - I don't know the actual cause of the wrong output.
data : lv_data(15) type c value 'Test with Tab',
lv_data1(15) type c value 'Working Good!',
lv_final type string.
concatenate lv_data CL_ABAP_CHAR_UTILITIES=>horizontal_tab
lv_data1 into lv_final .
write 😕 lv_final.
Output
Test with Tab#Working Good!
2005 Sep 05 8:44 AM
you cannot use CL_ABAP_CHAR_UTILITIES=>horizontal_tab in ABAP lists. if you want a tab in ABAP list you have to simulate the same using position (WRITE: /10 ).
Regards
Raja
2005 Sep 05 9:12 AM
Try with 'SEPARATED BY space' addition to get space between the strings to concatenate.
regards,
suresh
2005 Sep 05 9:37 AM
Create an extra variable(constant) which is empty and has the desired length and concatenate this with the first variable before concatenating the second.
2005 Sep 05 9:38 AM
Hi Raja,
Can you explain me where can we use these class attributes?
Usha
2005 Sep 05 9:44 AM
for example if you want to download your internal table to a local pc as <b>text tab delimited file</b> then you can use this.
this and the others like cr_lf, etc are primarly used when you want to dump data from SAP into filesystems.
Regards
Raja