cancel
Showing results for 
Search instead for 
Did you mean: 

Disable mandatory check when cancel in Webdynpro

Former Member
0 Kudos

Hi,

Is it possible somehow to disable mandatory check of required fields at runtime, but only for the moments when the user presses the cancel button?

I am using a view embedded in a FPM application, and I want somehow to identify in WDBEFOREACTION when the CANCEL button was pressed (from FPM Toolbar), in order to not run the code for 'mandatory check' written in this method.

Thanks,

Hadassah.

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi James,

Please check the method  PROCESS_EVENT in COMPONENT CONTROLLER which is triggered upon every action  i.e for validation, checking the consistency of data.

You can skip the validation logic if the event id is "Cancel".

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Unfortunatelly this doesn't help me. My code for 'check if mandatory fields are filled' is written in WDDOBEFOREACTION method from view. And I want if the user presses the CANCEL button from FPM Toolbar, this check to not be processed. But the call of WDDOBEFOREACTION method is done before PROCESS_EVENT from component controller..... so if the error is detected before, the PROCESS_EVENT method will not be called anymore. That is why I need somehow to access the event id in WDDOBEFOREACTION method and if it is CANCEL to not run the check logic.

Can you help me with it?

Thanks,

Hadassah.

ramakrishnappa
Active Contributor
0 Kudos

Hi James,

The event of FPM contains in class CL_FPM_EVENT and it gets available when the control reaches component controller.

I suggest you to put your validation logic in method "PROCESS_EVENT" and skip the validation process if the event id is cancel i.e. IO_EVENT->MV_EVENT_ID = "CANCEL".

Please refer the method PROCESS_EVENT of component FPM_DEMO_FLIGHT_OVERVIEW for validation sample.

Hope this resolves your issue.

Regards,

Rama

Message was edited by: Ramakrishnappa Gangappa

Former Member
0 Kudos

Hi Hadassah,

please check example program WDR_TEST_UI_ELEMENTS (method on_perform_update), where properties are dynamically set for different kinds of components.

BR

Paul