Check if a field has been changed
Mario Byttebier
Is it possible to check if a field has been changed ?The reason why i need this is to prevent that a customer record, which has already been assigned to a number, can be overwritten in an update event.
Can somebody help me, please ?
Manuel Marhold
Read the current value from db and check if i it the same in the edittextfield or not.or catch the validate-event
Mario Byttebier
Manuel,Your first answer is a possibility, but in which event would you do this ?
Sometimes you don't have a unique key to read the current value from db.
Using the validate-event is not always sure.
For instance when you change tha customer number while you are changing the customer-record and you press ENTER of ACTUALISE, the validate event is not executed !!!
Is the a possibility to prevent changing the customer number when you have queried a customer record ?
Manuel Marhold
Is the a possibility to prevent changing the customer number when you have queried a customer record ? -> yes, catch the validate-event for the CardCode field, run your check and set bubbleevent to true or falseSometimes you don't have a unique key to read the current value from db. -> maybe the CardCode in the bounded -datasource is different.
Else: catch the event data_load an write the current cardcode into an UserdataSource. then you have the primary key of the db
Mario Byttebier
Manuel,thanks again, i am going to use the dataload event together with a global variable.
Concerning the bubbleevent, i never used it.
Is it possible to give me an example ?
thx,
Mario
Manuel Marhold
Hibubbleevent is a boolean variable that indicates, wheater SAP should run further after your own "BeforeAction"-event.
0
Please sign in to leave a comment.
Comments
0 comments