Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Modified fields in table control

Former Member
0 Kudos

Hi ,

Is there anyway to find the modified fields in a table control ?

Thanks & Regards ,

Joby

1 ACCEPTED SOLUTION

Former Member
0 Kudos

take a copy of the internal table before displaying....

compare the values of two internal tables u will find the modified one...

7 REPLIES 7

Former Member
0 Kudos

In the screen painter, u just make the field as input enable

regards.

lavanya

former_member195383
Active Contributor
0 Kudos

please elaborate ur question...do u mean u want to find the fields in the tablecontroll which were changed?

Former Member
0 Kudos

take a copy of the internal table before displaying....

compare the values of two internal tables u will find the modified one...

0 Kudos

How will I know it is a newly inserted record or modified existing one ?

Thanks ,

Joby

0 Kudos

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

former_member182346
Active Contributor
0 Kudos

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

former_member491305
Active Contributor
0 Kudos

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