2006 Sep 12 8:23 AM
Hi all
i m downloading a table T_itab to unix file.T_ITAB has all fields of char type.
Let matnr is of type c lenghth 18.
but if mtanr value is only of 10 char 1234567890
in that case after dowmload i m not able to get 8 spaces.
I have to downlaod the data with it,s size ,it any field is blank then space shoul appear .
how can i do it.
thanks
Saurabh Tiwari
Hi all
i m downloading a table T_itab to unix file.T_ITAB has all fields of char type.
Let matnr is of type c lenghth 18.
but if mtanr value is only of 10 char 1234567890
in that case after dowmload i m not able to get 8 spaces.
I have to downlaod the data with it,s size ,it any field is blank then space shoul appear .
how can i do it.
thanks
Saurabh Tiwari
2006 Sep 12 8:28 AM
Saurabh,
If u are downloading the table t_itab which has got fields like matnr, erktx and some others, use the following statements.
concatenate t_itab-matnr t_itab-arktx t_itab-xyz into string separated by space (or a tab delimiter).
And then download this string.
2006 Sep 12 9:00 AM
How are you downloading the table, the solution would depend on that but one general solution can be to write the information using offset and length. Check the below example...
itab -->
matnr(18)
descr(40)
do 2 times. "2 is the number of fields in itab
offset = 0.
write itab-matnr to ltab-text+offset(18).
offset = offset + 18 + 1.
write itab-descr to ltab-text+offset(40).
enddo.
==>ltab-text has the data !!
--> surely you can even use describe statement to get the length of the field.
Regards
Anurag
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |