2006 Oct 04 8:27 AM
Hi I am writing a file using data set.
But the each line doesnot start in a new line. how do i make it possible?
Points will be rewarded
thanks
My code is ...
OPEN DATASET p_unixfile FOR OUTPUT IN text mode ENCODING DEFAULT.
LOOP AT i_opfile INTO wa_opfile.
TRANSFER wa_opfile TO p_unixfile.
CLEAR wa_opfile.
ENDLOOP.
CLOSE DATASET p_unixfile.
2006 Oct 04 8:40 AM
that logic sholud work.i am not getting why its not working.
your Itab record will be transferred record by record to your file.
check it again or download that file to presentation server using <b>CG3Y</b> transction and check it.
Regards
Srikanth
Hi I am writing a file using data set.
But the each line doesnot start in a new line. how do i make it possible?
Points will be rewarded
thanks
My code is ...
OPEN DATASET p_unixfile FOR OUTPUT IN text mode ENCODING DEFAULT.
LOOP AT i_opfile INTO wa_opfile.
TRANSFER wa_opfile TO p_unixfile.
CLEAR wa_opfile.
ENDLOOP.
CLOSE DATASET p_unixfile.
2006 Oct 04 8:30 AM
hi,
use this.
CL_ABAP_CHAR_UTILITIES=>NEWLINE
Data: data_string type string.
data_string = '123456789'.
concatenate data_string cl_abap_char_utilities=>NEWLINE
into data_string.
rgds
anver
pls mark hlpful asnwers
Message was edited by: Anversha s
2006 Oct 04 8:32 AM
Hi,
Alternatively, you can use CL_ABAP_CHAR_UTILITIES=>CR_LF
Eddy
2006 Oct 04 8:35 AM
Hi,
OPEN DATASET p_unixfile FOR OUTPUT IN <b>BINARY MODE</b> ENCODING DEFAULT.
LOOP AT i_opfile INTO wa_opfile.
TRANSFER wa_opfile TO p_unixfile.
CLEAR wa_opfile.
ENDLOOP.
CLOSE DATASET p_unixfile.
Regards
Sudheer
2006 Oct 04 8:40 AM
that logic sholud work.i am not getting why its not working.
your Itab record will be transferred record by record to your file.
check it again or download that file to presentation server using <b>CG3Y</b> transction and check it.
Regards
Srikanth
2006 Oct 04 8:41 AM
Hi s kantheri,
1. Your code is ok.
2. Since we are opening in TEXT mode,
new line will go automatically.
regards,
amit m.
2006 Oct 04 8:52 AM
Then when i open it in notepad using wordwrap..some of the lines are in same line.
Each opline should be displayed in different lines in the file right
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |