Skip to Content
author's profile photo Former Member
Former Member

Modify only a single field of a z-table

Hi,

I would like to update a particular field of a z-table which is in database

and growing everyday by comparing it with a internal table matching

the key fields

Please give me the steps.

Ekadevi.S

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 05, 2007 at 06:30 AM

    Hi,

    Use modify or update statement

    Refer this code

    &----


    *& Form SUB_READ_UPDATE_BSEG

    &----


    • text

    ----


    FORM sub_read_update_bseg.

    IF NOT it_final[] IS INITIAL.

    LOOP AT it_final INTO wa_final.

    UPDATE bseg SET zuonr = wa_final-ccnum

    WHERE bukrs EQ wa_final-bukrs

    AND belnr EQ wa_final-vbeln

    AND rfzei EQ wa_final-rfzei

    AND saknr NE ' '.

    ENDLOOP.

    *--Message data updated successfully

    MESSAGE i888 WITH text-002.

    LEAVE LIST-PROCESSING.

    ELSE.

    *--Message No data found

    MESSAGE i888 WITH text-003.

    LEAVE LIST-PROCESSING.

    ENDIF.

    ENDFORM. " SUB_READ_UPDATE_BSEG

    Reagrds,

    prasdhant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 06:31 AM

    create a program...and schedule it at a background job with interval daily..

    in that program...

    use the statement...

    update ztable set field1 = itab-field1 where key1 = itab-key1.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.