Skip to Content
0
Former Member
Dec 04, 2007 at 06:46 AM

finding length of variable at run time

18 Views

Good Morning to all Guru's,

can anybody explains me how i can find out the total length of one field from the internal table at run time?

example.

i wanted to some thing like this.

TYPES:BEGIN OF text12,

text1 TYPE string,

num(4) TYPE n,

calc TYPE i,

off TYPE i,

off1 TYPE i,

END OF text12.

DATA:wa TYPE text12.

DATA:itab TYPE TABLE OF text12.

MOVE 'i know you know' TO wa-text1.

MOVE 1234 TO wa-num.

MOVE 5678 TO wa-calc.

APPEND wa TO itab.

LOOP AT itab INTO wa.

FIND 'you' IN wa-text1 MATCH OFFSET wa-off.

  • FIND (wa-num) MATCH OFFSET wa-off1 . "here i am strucked

SHIFT wa-text1 BY wa-off PLACES.

SHIFT wa-num BY 2 PLACES.

SHIFT wa-num BY wa-off1 PLACES.

WRITE:wa-text1,wa-num,wa-calc.

ENDLOOP.

Please help me out.

Thanks

Priyalatha