Application Development and Automation 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: 
Read only

Modified fields in table control

Former Member
0 Likes
952

Hi ,

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

Thanks & Regards ,

Joby

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
907

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
Read only

Former Member
0 Likes
907

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

regards.

lavanya

Read only

former_member195383
Active Contributor
0 Likes
907

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

Read only

Former Member
0 Likes
908

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

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

Read only

0 Likes
907

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

Thanks ,

Joby

Read only

0 Likes
907

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

Read only

Former Member
0 Likes
907

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

Read only

former_member491305
Active Contributor
0 Likes
907

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