‎2006 Nov 06 4:54 PM
Hi All,
I m doing dialog program with table control for editing some data.
When user enters something in the field and he want to exit then it should give the message that data will be lost and do u want to save. I m using a function which working everytime and not if the user doesn;t change anything then also it is asking because i m not able to get where to check whether the user has changed something or not.
Also i want to do some inactive field according to condition.
Any clue then let me know.
Thanks
‎2006 Nov 06 4:57 PM
Hi
Use a internal table like the table for table control, where you store the initial data, and so when the user exit:
IF ITAB_OLD[] <> ITAB[].
-
> Message
ENDIF.
Max
‎2006 Nov 06 4:58 PM
Hi,
Try checking the variable SY-DATAR for any changes in the screen..IF SY-DATAR 'X' then the data has been changed..
Otherwise..Before getting into the screen store the values in another internal table (T_ORIG)...
Before exiting check the current table control internal table (T_CURR) with the internal table (T_ORIG)..if there are not equal raise a popup..
For inactivating a field..Assign the field to a group..
CHECK CONDITIONS..
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'G1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks,
Naren
Message was edited by: Narendran Muthukumaran