Skip to Content
0
Former Member
Dec 26, 2007 at 06:36 PM

Modify statment - urgent

19 Views

Hi SAP experts,

I have a requirement as below:

I have 4 feilds in my internal table as below :

Begin of itab occurs 0,

a type i,

b type i,

c type i,

d type i.

end of itab .

Intitially i am populating the fields a and b in the above table leaving the fields c and d as initial :

Now the table itab is as follows :

a b c d

10 10

20 20

30 30

Now I am calculating the values c and d based on the values of a and b as follows :

I have another table itab1 with only one field 'a' and i am modifying the table itab based on the values in itab1.

Internal table itab1:

a

10

20

30

loop at itab1.

read table itab with key a = itab1-a.

if sy-subrc eq 0.

c = a + b.

d = a - b.

modify table itab transporting c d.

endif.

endloop.

My question is whether my table itab modifies accordingly.Will my values c and d get populated accordingly .

Please clarify.

Regards,

Susmita.