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 internal table

Former Member
0 Kudos

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

abdulazeez12
Active Contributor

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

Former Member

HI,

try this:


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

regs

Former Member
0 Kudos

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.

abdulazeez12
Active Contributor

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.

Former Member
0 Kudos

LOOP AT ITAB WHERE FIXKZ = 'X'.

ITAB-FIXKZ = SPACE.

MODIFY ITAB INDEX SY-TABIX.

ENDLOOP.

Former Member

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