2008 Aug 12 9:41 PM
Greetings,
I have a simple table which I am writing to a flat file the table has a single field record structure that is 300 long, my data occupies the beginning of the record. I need to fill each record to 300 long though no matter what, filling the empty space at the end with spaces so that each record is 300 long no matter of the variable content in the beginning.
Ideas?
Greetings,
I have a simple table which I am writing to a flat file the table has a single field record structure that is 300 long, my data occupies the beginning of the record. I need to fill each record to 300 long though no matter what, filling the empty space at the end with spaces so that each record is 300 long no matter of the variable content in the beginning.
Ideas?
2008 Aug 12 9:50 PM
some thing like this you cna do...
data: text(300).
text+0(300) = 'this is test'.
2008 Aug 12 9:51 PM
I think if you move the contents of the table directly, you will still have the entire length with space in the file. Just dont use Concatenate as it will remove the spaces.
Something Like:
Open dataset ........
Loop at itab.
Transfer itab TO dataset.
Endloop.
2008 Aug 14 9:40 PM
I found that in my open dataset routine I was calculating the record length and only transfering filled lengths.
Old Code
open dataset .....
v_strlen = strlen( wa_rev ).
transfer wa_rec to v_serfile length v_strlen.
New Code
open dataset
TRANSFER wa_rec TO v_serfile LENGTH 2500.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |