cancel
Showing results for 
Search instead for 
Did you mean: 

Tags for UI elements / How to create a dynmic menu

faebulicious
Explorer
0 Kudos

Hi everybody

We currently do a lot with WD and are building a huge framework. this means that we mostly using dynamic programming for the ui but also for contexts an so on.

Known from other architectures (e.g. java swing, android sdk) every ui element supports an attribute "tag" with a generic type (normally type object). Here you can store additional information for each ui element. WD for ABAP has no such additional attribute, we can use for own purposes.

I'd like to define some popup menu for trays at runtime, but i just want to have one menu action. in this menu action handler i'd like to have a switch/case statement for the corresponding functions. At this point the only information i have is the ID, but what i need is something like a functioncode, i'd like to store anywhere in the action item using such a "tag". I cannot use the ID for my switch/case because the id is generated at runtime an i cannot use the functioncode as ID, because the functioncode can be used in severel menus and the id would not be unique.

Since im used to work with such tags (escpecially for action handler), i get restricted a lot when working with WD and dynamic ui generation.

How do you handle that?

Thx!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear Fab,

I may not be 100% accurate with the solution, but each method or action handler has a default parameter called "WDEVENT". From this parameter you can get the details of the actions being performed during the runtime, as you said, the Function Code could be the NAME attribute of WDEVENT parameter.

Please check the same, else, if you get to know the answer please do suggest me the same.

Regards,

-Syed.