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

internal table issue

Former Member
0 Likes
556

Suppose there r 500 records in a Internal Table.

emp idadb, emp namePriya, emp-addres--E Sector, emp-Location --Noida.

A particular record of no 98, is to b upgraded / modified.

with emp-addressAndheri,emp-Location-Mumbai.

Nothing to b changed only location and address to b changed.

Plz give me the logic.

Plz do mention how to give points for the best replies.

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
527

Hi shilpa,

you can give points for replies by clicking on one of the alternatives shown on the left of the answer box.

I don't know if this is what you need, try this:


field-symbols:
  <itab> like itab. "your internal table
read table itab assigning <itab> index 98.
<itab>-address = 'Andheri'.
<itab>-location = 'Mumbai'.

It could have been more helpful if you post existing code.

Regards,

Clemens

4 REPLIES 4
Read only

Clemenss
Active Contributor
0 Likes
528

Hi shilpa,

you can give points for replies by clicking on one of the alternatives shown on the left of the answer box.

I don't know if this is what you need, try this:


field-symbols:
  <itab> like itab. "your internal table
read table itab assigning <itab> index 98.
<itab>-address = 'Andheri'.
<itab>-location = 'Mumbai'.

It could have been more helpful if you post existing code.

Regards,

Clemens

Read only

Former Member
0 Likes
527

You can try this if you want to read for particular emp id,


field-symbols:
  <fs_wa> like <internal table>. 
read table <internal table> assigning <fs_wa> with key emp_id = '98'.
if sy-subrc eq 0.
<fs_wa>-address = <New address>.
<fs_wa>-location = <new location>.
endif.

To reward point you can click the radio buttons to award points appropiately.

Regards

Kathirvel

Read only

Former Member
0 Likes
527

Hi Priya,

read the internal table with that 98 index and do this

it_tab-address = 'Andheri'.

it_tab-location = 'Mumbai'.

then moddify the internal table.

Thanks

Vikranth khimavath

Message was edited by:

Khimavath Vikranth

Read only

0 Likes
527

HI Priya,

check this code...

Read table itab index 98.

itab-address = 'Andheri'.

itab-location = 'Mumbai'.

modify itab index 98 transporting address location.

Regards