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: 

ddic

Former Member
0 Kudos

pls tell me how can we modify data in internal table.pls send it usefull.

1 ACCEPTED SOLUTION

former_member404244
Active Contributor
0 Kudos
6 REPLIES 6

Former Member
0 Kudos

Hi,

Use Modify statement.

Reward if helpful.

Regards,

Umasankar.

0 Kudos

Hi,

Suppose you have internal table ITAB.

FIELD-SYMBOLS: <record> like line of ITAB.

LOOP AT ITAB ASSIGNING <record>.

<record>-field1 = (Change it here).

ENDLOOP.

or

READ TALE ITAB ASSIGNING <record> INDEX or WITH KEY...

change <record>.

Regards,

Sesh

Former Member
0 Kudos

Hi,

If u want to modify few fields use

Modify transporting <field1> <field2>....

Regards,

Former Member
0 Kudos

hi,

try like this

itab is a internal table with header line.

if itab is not initial

loop at itab.

read table itab with index sy-tabix.

itab-fld1 = 'new value'.

itab-fld2 = 'new value'.

...................

..........

modify itab.

endloop.

else

write:/10 'no data in internal table'.

endif.

this will modify all records in internal table. but if u want only for one record write READ TABLE statement outside of the loop and modify that record . while reading u can do in two ways

1. using INDEX

2. using KEY FILEDS

IF HELPFUL RREWARD SOME POINTS.

with regards,

Suresh.A

former_member404244
Active Contributor
0 Kudos

Former Member
0 Kudos

LOOP AT it_tab.

it_tab-field3 = it_tab-field1 + it_tab-field2.

<b> MODIFY it_tab INDEX sy-tabix.</b>

ENDLOOP.

CLEAR it_tab.