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

update internal table

Former Member
0 Likes
73,874

Hi!

How can I change values from an existing internal table.

Itab has in the field named FIXKZ where are set. And

now they have been to be unset. Is it possible to make

that:

UPDATE itab

SET space

WHERE FIXKZ = 'X'.

reagards

erdem

1 ACCEPTED SOLUTION
Read only

abdulazeez12
Active Contributor
18,579

What other key fields u have in the internal table??

if u want to reset all the FIXKZ fields in the internal table then use:

loop at itab where FIXKZ = 'X'.

itab-FIXKZ = ' '.

modify itab.

endloop.

5 REPLIES 5
Read only

Former Member
18,579

HI,

try this:


SORT itab BY FIXKZ.
LOOP itab ASSIGNING <itab> WHERE FIXKZ  EQ 'X'.
clear <itab>-FIXKZ.
ENDLOOP.

regs

Read only

Former Member
0 Likes
18,579

Hi Erdem,

First declare the work area with same structure as internal table.

Loop at Itab into workarea.

Workarea-fixkz = ‘ ’.

Modify itab form workarea index sy-tabix.

Endloop.

Use the above logic, if you are facing any problems please let me know.

Regards,

Ramakrishna kotha.

Read only

abdulazeez12
Active Contributor
18,580

What other key fields u have in the internal table??

if u want to reset all the FIXKZ fields in the internal table then use:

loop at itab where FIXKZ = 'X'.

itab-FIXKZ = ' '.

modify itab.

endloop.

Read only

Former Member
0 Likes
18,579

LOOP AT ITAB WHERE FIXKZ = 'X'.

ITAB-FIXKZ = SPACE.

MODIFY ITAB INDEX SY-TABIX.

ENDLOOP.

Read only

Former Member
18,579

Hi,

U cannot use this.

Instead use this.

data: wa type same as itab.

wa-fixkz = ' '.

modify itab from wa transporting fixkz where fixkz = 'X'.

Thank you.

Award points if found useful