cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the FPM Events in WDDOBEFOREACTION method?

Former Member
0 Kudos

Hi Experts,

I have a custom WD popup screen for Veteran status, which is called from a FPM page in HCM ESS. The popup is having FPM OK and CANCEL buttons. I need to validate some fields and have to show an error popup message, if the user clicks the 'OK' button. I have to do this in the WDDOBEFOREACTION method of the webdynpro view. So i need to know whether the user has selected 'OK' and not 'Cancel'.

I know the event will be available in PROCESS_EVENT method of Component Controller, but it is triggered after the WDDOBEFOREACTION method of the view. I tried writing the code in WDDOAFTERACTION and WDDOMODIFYVIEW(since it is triggered after PROCESS_EVENT) based on the FPM 'OK' event, and it is showing the error popup. But when user clicks OK button in error message popup, it will be navigated to the initial screen(the screen from where the user called the Veteran status popup). I want to make sure that the user has maintained some fields, before leaving the Veteran popup. 

Please tell me how we can read the  FPM Events in WDDOBEFOREACTION method? Or is there any alternate solution for my scenario?

Regards,

Johan

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member193369
Active Participant
0 Kudos

Hello Johann,

you can't access the FPM Event in WDDOBEFOREACTION as they are simply not even raised at that point in time.

Nevertheless I don't really understand your scenario:

- Is your custom WD popup making use of FPM_DIALOG_COMPONENT, then you should have UIBB(s) on your popup and you could do the validation in their PROCESS_EVENT methods (and returning EV_RESULT as Failed should prevent the popup from closing).

- Is your WD popup completely freestyle, then I don't see why you are using FPM events at all. Open the Dialog and defer the event used for opening it. Then do everything freestyle until you really want to close the dialog. As you have to trigger the closing yourself there should be no issue. And then finally

when closing the dialog simply resume the deferred event

- Or are you using a freestyle WD Popup, but using the predefined FPM event IDs for opening or closing. Then you should avoid this, because the generic functionality attached to these Event IDs will interfere with your freestyle logic.

Our recommendation is of course to use the first approach and stay as much and as long as possible within the FPM programming model. And we believe that there are not so many use-cases which can't be matched by that approach.

Best regards,

  Christian

Former Member
0 Kudos

no answers yet.. please help with a solution..

Former Member
0 Kudos

I got the solution..

Resolved it by adding the error message popup in Component controller Process_Event method itself. I tired it yesterday but didn't give  ev_result = if_fpm_constants=>gc_event_result-failed, so the execution continued.