06-25-2008 7:55 AM
Hi ,
Is there anyway to find the modified fields in a table control ?
Thanks & Regards ,
Joby
06-25-2008 11:10 AM
take a copy of the internal table before displaying....
compare the values of two internal tables u will find the modified one...
06-25-2008 11:05 AM
In the screen painter, u just make the field as input enable
regards.
lavanya
06-25-2008 11:08 AM
please elaborate ur question...do u mean u want to find the fields in the tablecontroll which were changed?
06-25-2008 11:10 AM
take a copy of the internal table before displaying....
compare the values of two internal tables u will find the modified one...
06-25-2008 3:08 PM
How will I know it is a newly inserted record or modified existing one ?
Thanks ,
Joby
06-25-2008 3:11 PM
Actuall I wanted to update this into one databse table , how can we do it ? the fields modified can be keyfields also..
Thanks& Regards ,
Joby
06-25-2008 3:14 PM
Hi
Before PAI, take a copy of the table control table lets say ITAB_COPY
after chenging some values in the Table control, or on some event say ON SAVE
U need to check the two table entries.
CHECK itab = itab_copy.
if true , no changes has been done
else.
changes done
<REMOVED BY MODERATOR>
Thanks & Regards
vinsee
Edited by: Alvaro Tejada Galindo on Jun 25, 2008 4:34 PM
06-25-2008 11:26 PM
Hi,
I will give you one more way of identifying modified entry in table control.
In PAI,Have all editable fields of table control under one Chain... Endchain.. Block.And then call one module within that chain Endchain block with an additional option "ON CHAIN-REQUEST".This means that this module will be called only if you make changes in any one of the changeable fields in table control.Otherwise the module will not be called.In that module you can write the code to set the modif_flag = 'X' to identify the changed entry in the table control.This logic will work only for Change and Insert,but not for delete.
PAI.
Loop at itab.
CHAIN.
FIELD wa_itab-key.
FIELD wa_itab-matnr.
MODULE tc_pg_modify ON CHAIN-REQUEST.
ENDCHAIN.
*--Chain block for Changeable fields in Table control
CHAIN.
FIELD wa_itab-changeable_f1.
FIELD wa_itab-changeable_f2.
Module Modify_Changed_data ON CHAIN-REQUEST.
ENDCHAIN.
*---End of Chain Block
Endlloop.
Module Modify_Changed_data Input.
wa_itab-ch_flag = 'X'.
Modify itab from wa_itab transporting ch_flag index tc-current_line.
Endmodule.
Reward If it helps,
Regards,
Vigneswaran S