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

ddic

Former Member
0 Likes
833

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

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
807
6 REPLIES 6
Read only

Former Member
0 Likes
807

Hi,

Use Modify statement.

Reward if helpful.

Regards,

Umasankar.

Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
807

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

Read only

Former Member
0 Likes
807

Hi,

If u want to modify few fields use

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

Regards,

Read only

Former Member
0 Likes
807

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

Read only

former_member404244
Active Contributor
0 Likes
808
Read only

Former Member
0 Likes
807

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.