cancel
Showing results for 
Search instead for 
Did you mean: 

Setting domain of dynamically created input field

d060155
Employee
Employee
0 Kudos

Hi!

I am creating input fields in my webdynpro application and I need to attach a DDIC domain name to the field. Can you help me how this can be done? I found the method  SET__DDIC_BINDING but I do not know how to do use it.

Thank you!

Regards,

Royce

Accepted Solutions (1)

Accepted Solutions (1)

harsha_jalakam
Active Contributor
0 Kudos

Hi Pinto,

Normally when you are creating the UI element, all the properties will be inherited from the binding context attribute type. And if you want to change the field properties apart from that, then we can go for using SET__DDIC_BINDING method. For instance if the bound value is Long and you want it to appear  as short for the end user, then this method can be best made use of.

lr_input->SET__DDIC_BINDING( PROPERTY = 'LENGTH'

                                 DDIC_element = 'Z*****'

                                 ).

Please check this link, which would explain in detail, associated with the usage of this method.

CL_WDR_VIEW_ELEMENT->SET__DDIC_BINDING ,Sets the Dictionary Binding of a Property -Detail&nbs...

Regards,

Harsha

Answers (1)

Answers (1)

Former Member
0 Kudos

What exactly are you trying to do?

Dynamically create the input field on the view? If so, you will find many examples on the web. You normally do not work with domains, but with the data element.

d060155
Employee
Employee
0 Kudos

Hi Jozef,

I am able to create the input fields dynamically using new_input_field. But I want to attach a domain value ranges to them.

former_member197475
Active Contributor
0 Kudos

Hi Royce,

Please have a look foe the below wiki.

Creating UI Elements Dynamically in Abap Webdynpro Application - Web Dynpro ABAP - SCN Wiki

You can use cl_wd_input_field=>new_input_field and pass your structure field in the bind_value parameter. It will automatically picks up the value from domain.

BR,

RAM.