Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP: dynamic context node + attribute for DROP_DOWN_BY_KEY

Hello,

I need to create a Node with attributes dynamically and than assign it to a DROP_DOW_BY_KEY element in ABAP.

I create drop down this way:

drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
  cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
  ui_container->add_child( drop_down_figure ).

However, here I bind to REPOSITORY.FIGURES. Instead of doing this I need to bind it to an attribute that I create.

I can access wd_context but I am not sure how to create a node in wd_context, then attribute for that node that will contain items for drop down.

bind_selected_key is type of String. If I create a node with attribute how do I cast it to a String so I can pass it to a constructor of a drop down?

Thank you.

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question