2008 Dec 08 11:10 AM
Hi Gurus ,
i have records in my internal table , now i want to insert '#' tab delimiter into each records. i mean that
my internal table should contains records coloumn instead of '|' it should be replaced by '#'.PLease
help me on this .
Thanks and regards,
Rajeshwar
Hi Gurus ,
i have records in my internal table , now i want to insert '#' tab delimiter into each records. i mean that
my internal table should contains records coloumn instead of '|' it should be replaced by '#'.PLease
help me on this .
Thanks and regards,
Rajeshwar
2008 Dec 08 11:17 AM
Hi,
Assuming that the internal table is of type string :
loop at itab into watab.
concatenate wa_tab-field1 wa_tab-field2 wa_tab-field3 into wa_output-field1
separated by cl_abap_char_utilities=>horizontal_tab.
append wa_output to gt_output.
endloop.Best regards,
Prashant
2009 Feb 20 12:25 PM
Hi,
Using this method we can include Horizontal tab as '#'.
but can we include the TAB as we are getting when we are using FM 'GUI_DOWNLOAD'.
Thanks....
2009 Feb 20 12:35 PM
2008 Dec 08 11:18 AM
Hi rajeshwar,
Please go through Th link In which You have the sample code for this:
http://www.sap-img.com/abap/insert-a-special-tab-delimited-character.htm.
I think it should solve ur problem.
Regards,
Rahul
2008 Dec 08 11:33 AM
Hi Rajeshwar,
Try the following snippet for delimiter.
DATA: w_deli(1) TYPE c, "delimiter
w_text(50) TYPE c,
w_hex TYPE x.
FIELD-SYMBOLS: <fs> .
ASSIGN w_deli TO <fs> TYPE 'X'.
w_hex = 09.
<fs> = w_hex.
CONCATENATE 'Testing' 'Tab' 'Delimiter' INTO w_text SEPARATED BY w_deli.
WRITE: w_text.Use w_deli as delimiter.
Hope this will help you.
Regards,
Manoj Kumar P
2009 Feb 20 12:28 PM
Hi,
as you have mentioned. we are able to include a special character while writing, do you know how to include proper TAB as we can see in text file.
Thanks....
2009 Feb 20 12:30 PM
Hi,
Tab wud b displayed as # if you open the file in application server ( AL11).
Download the file to presentation server using transaction CG3Y / CG3Z & then check.
wud b replaced by TAB.
Best regards,
Prashant
2009 Feb 20 12:35 PM
Hi Rajeshwar,
Actually hash is nothing but tab delemeted file on application server.
So you have to loop at each record and concatenate all the fields with '#' as seperator.
data : wa_output(200) type c.
loop at itab into watab.
concatenate wa_tab-field1 wa_tab-field2 wa_tab-field3 into wa_output-field1
separated by cl_abap_char_utilities=>horizontal_tab.
append wa_output to gt_output.
endloop.
Then probably you can download the file at application server if you have such requirement.
Regards,
Anil Salekar
2009 Mar 03 6:40 PM
2015 Sep 23 1:27 PM
Hi Raj,
Ca you tell me how you solved this case, I have a same requirment to add Delimiter "|" to each records in the internal table.
Thanks
Rufus
2015 Sep 23 1:37 PM
concatenate wa_tab-field1 wa_tab-field2 wa_tab-field3 into wa_output-field1
separated by '|'.
append wa_output to gt_output.
2015 Sep 23 7:25 PM
Hi Peter,
Thanks for the info, But inorder to achieve this we need to loop the internal table, in my scenario my internal table has 50 lakh records, so its not possible to do with a loop.
Is there any other alternative way of FM to achieve this.
Thanks
Rufus
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |