on 07-12-2011 1:39 PM
Hello,
I am not sure if this is possible, but I would like to know if an action can be created at runtime, or on the contrary it must be defined in the 'Actions' tab.
Best regards
Hello,
but I want to create an action not for a button but to be used in a context menu, so I think your solution doesn't work for me.
I am almost sure that it cannot be done, but just to see if anybody else had the same problem in the past.
Best regards,
Javi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi javier,
Yes you can create action at runtime...
Write below code in WDDOMODIFY method..
DATA: lr_container TYPE REF TO cl_wd_uielement_container,
lr_button TYPE REF TO cl_wd_button.
CHECK first_time = abap_true.
lr_container ?= view->get_element( id = 'ROOTUIELEMENTCONTAINER' ).
cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
lr_button = cl_wd_button=>new_button( id = 'BUTTON'
text = 'My Button!'
on_action = 'ACTION' ).
cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_button ).
lr_container->add_child( the_child = lr_button ).
Create an action by name ACTION under the "Actions" tab of your component.
cheers,
Kris.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.,
check this tutorial by thomas sir: [Dynamic Context, Mapping , Binding|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89]
this helps u.,
also check this wiki: http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=141263105
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.