Skip to Content
0
Former Member
Feb 09, 2011 at 04:13 PM

Setter method old value new value comparision

28 Views

Hi Experts,

Below is the code that i find in almost all setter methods. But, i am not able to understand the how the below code (italic) works. How a 'CREATE DATA copy LIKE <oval>' will fetch the new value that the user entered ? Can someone please explain ?

Best Regards,

Gaurav.

  • assure that attribue exists

CHECK dref IS BOUND.

* set <oval> to old value

ASSIGN dref->* TO <oval>.

* create a copy for new value

CREATE DATA copy LIKE <oval>.

* set <nval> to new value

ASSIGN copy->* TO <nval>.

  • only set new value if value has changed

IF <nval> <> <oval>.

current->set_property(

iv_attr_name = 'attribute_name' "#EC NOTEXT

iv_value = <nval> ).

ENDIF.