Hello Venkat,
Please try this code in your module pool prog.
In your PAI of screen keep the fields of internal table in chain
for example.
LOOP AT ITAB
CHAIN.
FIELD:
hd1,
hd2,
hd3,
hd4,
hd5.
MODULE modify_itab ON CHAIN-REQUEST.
*** Here you can check the record (if required ) is fresh or already in
database and you can be able to do any arithmetic function here (if required)
ENDCHAIN.
ENDLOOP.
check the value of (table control current line) tc-current_line
and OK_CODE
in user commond write the code
CHECK ok_code = 'SAVE'.
PERFORM save.
now loop your internal table with work area . If the record are
already available in table then write update statement or else insert the
record into the data base