Dropdown by key ABAP Web Dynpro
I am new to SAP and currently working on little project in ABAP Web Dynpro. I am struggling with dropdown by key - I created a dropdown by key, populated it with values, but when I tried getting the value from the context and assigning it to a string, nothing would be stored in the local value in ONBUTTONCLICKACTION method, and also nothing would be saved to the db. Can I please ask somebody to explain this to me step by step? I tried the tutorials online, but none of them would help at all. This is vital part for the application as I plan on using quite a few dropdowns, because I do not want user to be typing the same values i.e. 20 times manually.
Thank you in advance,