Application Development 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: 

update column value

Former Member
0 Kudos

hi experts

i have an internal table and i want to put a zero value in a certain field in all rows

how can i do that.

thanks

amit

3 REPLIES 3

Former Member
0 Kudos

Hi

Try this

loop at itab.

itab-field1 = '0'.

itab-field2 = '0'.

modify itab transporting field1 field2.

endloop.

Regards

MD

Former Member
0 Kudos

use

data : aindex like sy-tabix.

Loop at itab into wa_itab.

aindex = sy-tabix.

wa_itab-field1 = 0.

wa_itab-field2 = 0.

modify itab from wa_itab index aindex transporting field1 field2.

endloop.

Regards,

Alpesh

Former Member
0 Kudos

Hi,

var1 = 0.

LOOP AT itab.

itab-fld2 = var1.

MODIFY itab.

ENDLOOP.

I hope the above coding will help you to solve your problem.

Regards,

Harish