on 10-03-2015 2:12 PM
Hello Friends ,
I am currently involved with dynamic programming and would like to know more about the wd_create_action method . I looked for documentation and discussion , but could not get anything concrete on the way to use it .
Basically I need to know , can we create ACTION and its corresponding ACTION HANDLER method dynamically through code placed in WDOINIT of the view controller. I am aware of declaring the ACTION and handler method statically , but need to know how can we do it using code.
thanks
S
Hi
While creating button we assign ACTION to the button ..but the
pre-requisite is that the action(TEST_ACTION) should already be there in
created mode.
Ex Code:-
DATA lr_button TYPE REF TO cl_wd_button.
CALL METHOD cl_wd_button=>new_button
EXPORTING
enabled = 'X'
id = 'B1'
on_action = 'TEST_ACTION'
text = 'My Dynamic Button'
RECEIVING
control = lr_button.
Create an action by name TEST_ACTION under the "Actions" tab of your component. You would then get the corresponding eventhandler ONACTIONTEST_ACTION. Write your desired coding in there and it should be fine.Hope this helps you.
Br,
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
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.