10-26-2006 1:26 PM
Hi,
i have a requirement where in a transaction i have 15 fields. if someone changes one field and tries to exit the program without saving it i need to populate a message.
is there any system variable which can give information that some change has happneed in the screen
awaiting reply and thanks in advance
regards
Sai easwar
10-26-2006 1:31 PM
Try sy-datar.
Otherwise you have to check old and new vvalues individually
10-26-2006 1:32 PM
hi SAi,
SY-DATAR <> 0 implies, some changes have been done to the screen fields.
Sajan.
10-26-2006 1:34 PM
HI,
I tried to use SY-DATAR. but it is giving SPACE always. is there anything i need to do to be set automatically?
regards
Sai easwar
10-26-2006 1:41 PM
hi,
there is no sy-field.
try this:
organize your input-fields that they are in one structure.
e.g. in-bukrs,
in-gsber,...
define structure old like in (as copy).
at PBO save structure "IN" in OLD
after PAI compare "IN and "OLD"
if IN = OLD...
A.
Message was edited by: Andreas Mann
10-26-2006 1:39 PM
Hi Sai,
The sy-datar field will be initial, if no changes occur in the screen fields. It is character field (and hence please dont check for sy-datar <> 0 as i mentioned in my previous reply).
Sajan.
10-26-2006 2:33 PM
Hi,
follow below logic
itab_old-matnr = '10'.
itab-new-matnr = '20'.
case ok-code
when 'EXIT'
if itab_old-matnr <> itab_new-matnr.
message i000(zz) with 'Save entries'
endif.
Regards
amole