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

itab

Former Member
0 Likes
540

Folks...

i have quick question..........itab1 have 3 fileds.

filed1 field2 filed3

100 (D) company code 890

121 (D) Central 670

now iam moving this filed to itab2 with same structure

loop at itab1.

itab2-filed1 = itab1-filed1

itab2-filed2 = itab1-filed2

itab2-filed3 = itab1-filed3

endloop.

now my query while moving fileds from itab1 to itab2 , in filed2 i need cut out the part "(D)". it mean i need to pass "company code " intead of "(D) company code"

please tell which is the bestway.

regards

niru

2 REPLIES 2
Read only

Former Member
0 Likes
456

Hi,

itab2-filed2 = itab1-filed2+3(X)

(Where 'X' is the Length of the field..)

Regards,

KK

Read only

Former Member
0 Likes
456

Hi

Do like this :

itab1-filed2 = (D) Company Code, u want from Company Code thst is position 4

loop at itab1.

itab2-filed1 = itab1-filed1

itab2-filed2 = itab1-filed2+4(12)

itab2-filed3 = itab1-filed3

endloop.

Hope it helps .

Praveen