cancel
Showing results for 
Search instead for 
Did you mean: 

Application specific button on FPM toolbar to call action triggered in view

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

hello how you can check the event? did you find a solution?

Answers (0)