Skip to Content
avatar image
Former Member

update internal table

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 10, 2007 at 01: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 01: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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 01:56 PM

    HI,

    try this:

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

    regs 😊

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 01: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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 10, 2007 at 01:57 PM

    LOOP AT ITAB WHERE FIXKZ = 'X'.

    ITAB-FIXKZ = SPACE.

    MODIFY ITAB INDEX SY-TABIX.

    ENDLOOP.

    Add comment
    10|10000 characters needed characters exceeded