10-10-2007 2:49 PM
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
10-10-2007 2:57 PM
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.
10-10-2007 2:56 PM
HI,
try this:
SORT itab BY FIXKZ.
LOOP itab ASSIGNING <itab> WHERE FIXKZ EQ 'X'.
clear <itab>-FIXKZ.
ENDLOOP.
regs
10-10-2007 2:56 PM
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.
10-10-2007 2:57 PM
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.
10-10-2007 2:57 PM
LOOP AT ITAB WHERE FIXKZ = 'X'.
ITAB-FIXKZ = SPACE.
MODIFY ITAB INDEX SY-TABIX.
ENDLOOP.
10-10-2007 2:58 PM
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