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

record changes in table control

how do i record changes to an existing record in a table control..

and how do i record insert or delete rows?

i believe i can do the latter by comapring with the old records but what abt the former...

in chain and endchain do i have to place module for all the field names that could be potentially changed?

but how do i validate and keep those changes..

thanks a lot...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 04, 2005 at 08:36 PM

    If you used the table control wizard, it should have written some code in the flow logic of the screen. Inside the LOOP in the PAI module, there should be a module with the word MODIFY in it. Double click it, now you should be in the code of the MODULE. There should be a line of code already there that is updating the internal table. Here is where you can write the record to another internal table with the same structure, for example.....

    ITAB is the main table

    ITAB_CHG is the table which will hold the changed records.

    For deleting, you can do something simular, have an ITAB_DLT, where you are adding records that are being deleted from the main ITAB. When saving at the end of the transaction you would process these ITABs accordingly. Make sense?

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 05, 2005 at 03:16 PM

    hi,

    in the table control you can add two flags at the end of the internal table, one for modified lines and one for deleted lines. Mark the flags in a PAI module when data is changed or data is selected to being deleted.

    PROCESS AFTER INPUT.

    LOOP AT I_TABLE.

    CHAIN.

    FIELD: D_XXX,

    D_YYY,

    D_ZZZ.

    MODULE FLAG_TABLE.

    ENDCHAIN.

    ENDLOOP.

    It would be easier to save data if you only select modified and deleted lines to update your table.

    Regards.

    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.