on 03-18-2004 5:18 PM
Hi all, I am working on an Interface program. The Output is to be written to a file. The file has a particulat structure and I need to write the data to the file in the TAB DELEMETED format. I 'll be using Open dataset to write to the file.
I would like to know is there any way by which we can write (rather leave) a tab space in ABAP.
Thanks
Amit
For previous releases of SAP, you should insert the hexadecimal code of TAB.
To do so, concatenate your text with a hex variable (type x) containing '09'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
looks like you have got the answer to your question but here is some additional info regarding uploading and downloading files to/from PC or SAP, along with a few examples, http://www.sapdevelopment.co.uk/file/file_updown.htm
hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What release of SAP are you working with? If you have a WebAS 620 or higher you probably want to use class: cl_abap_char_utilities. This is a great little class that has constants such as horizontal_tab, vertical_tab, newline, form_feed, etc. The values for these constants come from the Kernel (I assume) and adjust based upon what code page you are running in (Unicode/Non-Unicode). Before 620 we used to always declare our own hexidecimal constants with the hex code for the character we wanted. Eithor way you just concatenate your data together with these constants into a string and then write out that string. The following is a little example:
****Title Line
concatenate me->user_model->project
': '
proj_name
cl_abap_char_utilities=>newline
into r_content.
****Blank Line
concatenate r_content
cl_abap_char_utilities=>newline
into r_content.
****Header Line
concatenate r_content
'CO.'(h01)
cl_abap_char_utilities=>horizontal_tab
'COST CTR'(h02)
cl_abap_char_utilities=>horizontal_tab
'NAMES'(h03)
cl_abap_char_utilities=>horizontal_tab
into r_content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.