cancel
Showing results for 
Search instead for 
Did you mean: 

FPM Event Handling of buttons 'Ok','Cancel' in FPM OVP Page Type Dialog

former_member200388
Active Participant
0 Kudos

I have created one WD component which has FPM interface implemented. AppConf is done through FPM OVP. I have created two pages. In the first page i have one UIBB embedded. On action of a button I navigate to the second page of FPM OVP in which I have 3 UIBB embedded. The second has page type 'Dialog'. Now I want to have two buttons supplied by FPM, which is done through button types from page configuration itself. Standard 'Ok' button triggers FPM_CLOSE_DIALOG event. But I want to raise different event namely 'FPM_SAVE' when 'Ok' button is pressed in the dialog and 'FPM_CLOSE_DIALOG' when 'Cancel' button is pressed in the dialog itself.

Can this be achieved?

Please suggest me....

Thanks in advance.

Regards

Sounak

Accepted Solutions (0)

Answers (1)

Answers (1)

Aliaksandr
Active Participant
0 Kudos

Hi Sounak,

For achieving your goal you must:

1. Implement application controller in your configuration of OVP component. It is simple WD component which implements interface IF_FPM_APP_CONTROLLER. This WD component must be assigned to your configuration of OVP component via menu as in screen shot below

2. For your purpose you must implement additional interface IF_FPM_OVP_CONF_EXIT in your application controller.

3. Interface IF_FPM_OVP_CONF_EXIT contains method OVERRIDE_EVENT_OVP which you must realize in component controller of your application controller. See code below.

    data: lo_event type ref to cl_fpm_event,

          l_button type string.

    lo_event = io_ovp->get_event( ).

    check lo_event->mv_event_id = cl_fpm_event=>gc_event_close_dialog_box.

    lo_event->mo_event_data->get_value(

      exporting

        iv_key   = if_fpm_constants=>gc_dialog_box-dialog_buton_key

      importing

        ev_value = l_button

           ).

    check l_button = if_fpm_constants=>gc_dialog_action_id-ok.

    lo_event = cl_fpm_event=>create_by_id( cl_fpm_event=>gc_event_save ).

    io_ovp->set_event( lo_event ).

I hope my answer will helpful for you. If you have questions don't hesitate and ask me.

Kind regards, Aliaksandr.

former_member200388
Active Participant
0 Kudos

Thanks a lot Aliaksandr.

I will try this and get to you.

Regards

Sounak