on 05-12-2010 10:45 AM
Hello,
In the content area of my FPM is an ALV with some buttons, e.g. clicking one of the button opens up certain ALV column for editing (for simplicity, I omit the details besides simply enable the columns).
With FPM, I want the button to be placed in the toolbar as a application specific button. How do I achieve the same functionality e.g. from PROCESS_EVENT method calling an action (to open up certain ALV column for editing) via the application specific button placed on the toolbar communicating with the action/method found in the view controller ? Thank you.
Regards
Kir Chern
Hi,
In PROCESS_EVENT mrthod you can get the ID of the Button Clicked.
When this buton is clicked fire an event in Component Controller.
in the view controller, instead of making it as a simple method, make it an EVENT HANDLER, and in the EVENT column press F4, than assign the event which u r firing in PROCESS_EVENT.
Hope it will work.
Regards,
Arvind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arvind,
I tried as follows :
- Create an event in the component controller, say 'MA'
- Within PROCESS_EVENT, raise the event as follows :
data : lo_fpm type ref to if_fpm,
lo_event type ref to cl_fpm_event.
create object lo_event
exporting
iv_event_id = 'MA'.
lo_fpm = cl_fpm_factory=>get_instance( ).
lo_fpm->raise_event( io_event = lo_event ).
- In the view controller, create an event handler which subscribe to the event, MA of the component controller.
However, the code in the event handler is never executed despite the event being raised. Not sure how FPM event flow works here.
Can anyone advise ? Thank you.
Regards
Kir Chern
Hi,
I did not mean like this.
After creating the event in Component Controller say MA.
When you will get the Button Id Say SAVE.
Write this Code in process event.
WHEN 'SAVE'.
wd_this->fire_ma_evt( ).
Where MA is the event created in EVENT Tab of component Controller.
This will work.
Regards,
Arvind
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.