05-21-2007 10:14 PM
hi,
How do i know that <b>user has changed something</b> on a dialog screen?
05-21-2007 10:17 PM
HI,
by validating the fields u might know the user changed or not... use CHAIN.....ENDCHAIN FOR VALIDATION IN PAI MODULE.
MARA-MATNR = ' '.
IF USER CHANGED ANYTHING...
IF NOT MARA-MATNR IS INITIAL.
USER CHANGED..
ENDIF.
Regards
SAB
05-21-2007 10:17 PM
HI,
by validating the fields u might know the user changed or not... use CHAIN.....ENDCHAIN FOR VALIDATION IN PAI MODULE.
MARA-MATNR = ' '.
IF USER CHANGED ANYTHING...
IF NOT MARA-MATNR IS INITIAL.
USER CHANGED..
ENDIF.
Regards
SAB
05-21-2007 10:24 PM
Hi,
Try this..
IF SY-DATAR = 'X'.
User has changed something
ELSE.
User didn't change ..
ENDIF.
OR
Before displaying the screen..Store the values in temporary work area..
Then in the user command check compare the temporary work area with the current screen values..
Thanks,
Naren
05-21-2007 11:38 PM
In your Process After Input use "ON CHAIN-REQUEST" using the fields that you want to check for a change. Inside the "CHAIN", include the fields you want to check for a change after input then specify a module to be triggered.
Example:
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP AT MY_TABLE.
CHAIN.
FIELD MY_TABLE-FIELD1.
FIELD MY_TABLE-FIELD2.
MODULE VALIDATE_INPUT on CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
In the example above, you are checking for two fields of a table control. If either of them are changed/input, a module is called.