2007 Aug 29 6:36 AM
I want a concatenate two fields (Matnr, Kebtr) into a string of 100 characters.
But my requirement is to concatenate 1 Matnr, 1 Tab, and 1 Kebtr.
Is there any ways to add a tab while concatenating.
I have done for a comma like
Concatenate matnr , kbetr into output.
Instead of comma how to add a tab there .
2007 Aug 29 6:39 AM
Report ztest.
constants: c_a type x value '09'.
data: g_file like rlgrap-filename.
g_file = 'Test.txt'.
OPEN DATASET g_file FOR APPENDING IN BINARY MODE.
if sy-subrc = 0.
transfer 'AA' to g_file.
TRANSFER c_a TO g_file.
transfer 'ZZ' to g_file.
endif.
CLOSE DATASET g_file.
I want a concatenate two fields (Matnr, Kebtr) into a string of 100 characters.
But my requirement is to concatenate 1 Matnr, 1 Tab, and 1 Kebtr.
Is there any ways to add a tab while concatenating.
I have done for a comma like
Concatenate matnr , kbetr into output.
Instead of comma how to add a tab there .
2007 Aug 29 6:39 AM
Report ztest.
constants: c_a type x value '09'.
data: g_file like rlgrap-filename.
g_file = 'Test.txt'.
OPEN DATASET g_file FOR APPENDING IN BINARY MODE.
if sy-subrc = 0.
transfer 'AA' to g_file.
TRANSFER c_a TO g_file.
transfer 'ZZ' to g_file.
endif.
CLOSE DATASET g_file.
2007 Aug 29 6:39 AM
hI..
Concatenate field1 field2 Field3
into TargetField
separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
<b></b>
<b>Reward if Helpful</b>
2007 Aug 29 6:40 AM
hi,
Check out the following link:
http://www.sapdevelopment.co.uk/file/file_ascii.htm
Or
You can try defining the following and use it as the tab delimiter.
data: tab(1) type x value '09'.
2007 Aug 29 6:41 AM
Hi,
You can do it by first declaring a constant:
<b>CONSTANTS: c_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab.</b>
and then concatenate:
<b>concatenate matnr c_tab Kebtr into string.</b>
<b>Reward with points for helpful answers.</b>
Regards,
Amit
2007 Aug 29 6:50 AM
Concatenate matnr ' ' kbetr into output SEPERATED BY SPACE.
This will insert a TAB.
Reward points if useful, get back in case of query...
Cheers!!!
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |