Use code generator as much as you can expeciall for context node references. Once generated, remove unwanted code elements and add whatever custom code you may want to add. You can also dynamically read domain values using FM 'DD_DOMA_GET' and set the dropdown internal table values.