You would need to create one more method in the class as part of your enhancement. In this method, add one parameter ES_DATA with the same type as MS_DATA. Inside the method, set MS_DATA from ES_DATA.
Now, call this method from where you want to update the attribute.
There is a similar discussion - Refer it for more info:
Thanks,
Naimesh Patel