cancel
Showing results for 
Search instead for 
Did you mean: 

FPM : how to subscribe buttons event for Dialog box

prathamesh_gandhi
Participant
0 Kudos

Hi All,

I am calling a FPM configuration as popup, i have used standard button CLOSE. Now I wanted to assigned my own action to it. How can i achieve this ?

As in webdynpro we can use  SUBSCRIBE_TO_BUTTON_EVENT, similarly which method i can use in FPM ?

E.g. in below case i wanted to write my own code on click of OK button.

        LS_DB_PROP-BUTTON_SET = 2.

         LS_DB_PROP-TEXT_FOR_CLOSE_BUTTON = 'Ok'.

         CALL METHOD LO_FPM->OPEN_DIALOG_BOX

           EXPORTING

             IV_DIALOG_BOX_ID         = LV_WINDOW_ID

             IS_DIALOG_BOX_PROPERTIES = LS_DB_PROP

             IO_EVENT_DATA            = LO_FPM_EVENT_DATA

*           IV_EVENT_ADAPTS_CONTEXT  =

           .

Thanks in Advance,

P$G

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prathamesh,

Refer to this Opening and Closing FPM Dialog Boxes which might help you.

For catching the event :

When cl_fpm_event=>gc_event_close_dialog_box.
       io_event->mo_event_data->get_value(
         EXPORTING
           iv_key   = 'DIALOG_BUTTON_ACTION'
         IMPORTING
           ev_value = lv_string
       ).
       IF lv_string EQ 'CLOSE'.

---------------------------

Write logic here

--------------------------

     endif.

Hope it might help you.

Thanks

KH

prathamesh_gandhi
Participant
0 Kudos

Hi Katrice,

The code you have provided is to get the action name (Standard Action), I will get same things as  FPM_CLOSE_DIALOG. I wanted to assign my own action instead of CLOSE.

like action name will "EXIT_SCR1". so need to which methods used to assign the actions.

Thanks In Advance,

P$G.