Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Downlaod with fields size

Former Member
0 Likes
475

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

2 REPLIES 2
Read only

Former Member
0 Likes
449

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.

Read only

Former Member
0 Likes
449

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