cancel
Showing results for 
Search instead for 
Did you mean: 

FPM OVP - How to handle default button actions?

Former Member
0 Kudos

Hi,

     I need to handle the action of any of these toolbar buttons:

When clicking on save or save and back I need to send en e-mail. Is there any posibility to see the code of these buttons?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First check if the screen has been designed using a Generic UIB or UIBB.

FInd the webdynpro component used in the configuration and then goto component controller and in that in PROCESS_EVENT  in the importing paratmeter IO_EVENT->MV_EVENT_ID = ' EBENT ID of the button'.

Write a IF condtion and check if the evenet ID os of that button u want to handle if yes then write the code you want. for this you have to first create a enhancement for the webdynpro and in the Post exit of the method you can write the code.

In case of a feeder class you can do the same in the PRocess_event method of the feeder class.

Hope this helps you.

Phani

Former Member
0 Kudos

That was really helpful Phani! Thanks!

Unfortunately, I've another problem now. In the main screen of my FPM OVP, there are many windows. I've to get what window (or configuration) I am in, so it doesn't fire an action every time an user clicks on "save" or "save and back" on a different window from the one that I am interested in.

I tried with this code in a post-exit enhancemet for "PROCESS_EVENT" and "NEEDS_CONFIRMATION" methods.:

  IF io_event->ms_source_uibb-config_id EQ 'ZHRESS_CC_PER_DTL_MOBILE_US'.

     IF io_event->mv_event_id EQ 'FPM_SAVE'.

 

     ENDIF.

  ENDIF.

I got the event id but I don't get the cofiguration's name.

Is there any way to get the configuration's name or the window's name?

Best regards.

J_R
Advisor
Advisor
0 Kudos

Since the button 'Save' belongs to the OVP Floorplan and not to any one of the UIBBs on the page the parameter IO_EVENT->MS_SOURCE_UIBB is empty. The parameter is only filled if the FPM event has been triggered from a toolbar element that is assigned to a UIBB.

What do you mean with 'I've to get what window (or configuration) I am in'? Don't code on any window name, please.

If you want to ensure that your code is processed just once during the FPM event loop and not processed by each UIBB on the page you could use an Application Configuration Controller (AppCC) for the OVP (this AppCC has to be assigned to the OVP component configuration) and use the method OVERRIDE_EVENT_OVP of interface IF_FPM_OVP_CONF_EXIT to process your desired coding. The import parameter IO_OVP of this method provides access to the currently processed event via method GET_EVENT.

Best regards,

Jens

Former Member
0 Kudos

Hi Jens,

Thank you very much for your help, it's very useful. But we cannot find out how to solve this issue.

I will try to explain our scenario.

We are working on FPM OVP for HRESS_A_PERSINFO with Z configuration. We hava a Main Page where employee can see personal information and can edit each uibb.

What we need to do is: Send an email, when user click's on SAVE or SAVE and BACK, over a particular uibb ( on the global toolbar, not uibb toolbar ). So, what we need is to catch SAVE button event on FPM OVP  global toolbar , when user is on HR ESS detail page.

Thanks

J_R
Advisor
Advisor
0 Kudos

Hello Fernando,

as I said, the parameter IO_EVENT->MS_SOURCE_UIBB is empty because the event has not been triggered by a toolbar element that belongs to a UIBB but by a toolbar element in the page toolbar (e.g. Save button). When the event is triggered all UIBBs on the screen will participate in the started FPM event loop and have access to the event. In addition, you can access the event in the OVP floorplan if you have implemented an Application Configuration Controller (AppCC).

Best regards,

Jens

Answers (0)