Quantcast
Channel: SCN: Message List - SAP CRM: Webclient UI - Framework
Viewing all articles
Browse latest Browse all 7775

Re: Do_validate_input

$
0
0

Hi Pradeep,

 

You can implement something like data loss popup in your view,where you have the ability to restrict user action with the help of popup when the user clicks on something outside the view/window.

 

You need to add interface IF_BSP_WD_EVENT_HANDLER in the mainwindow class.The IF_BSP_WD_EVENT_HANDLER~HANDLE_EVENT method needs to be implemented to restrict the user action (by giving message or allowing or cancelling depending on the scenario).

Fo eg,

CASE iv_event_name.

      WHEN if_bsp_wd_data_loss_handler=>save_event.

 

 

        CALL METHOD zcl_common_util=>add_message_global_cont

          EXPORTING

            iv_msg_type   = 'I'

            iv_msg_id     = 'ZMSGID'

            iv_msg_number = '001.       

In your case,you can check the duplicate email when the 'revert' event is triggered and in case duplication found,you can throw an error message and revert the transaction .

 

The ON_BEFORE_WA_CONTENT_CHANGE method of the Main Window Impl class will act as event handler which should contain code like this:

      data_loss_handler->set_save_handler( me ).

      data_loss_handler->set_revert_handler( me ).

      data_loss_handler->set_cancel_handler( me ).

      data_loss_handler->trigger_data_loss_handling( ).

 

In DO_VIEW_INIT_ON_ACTIVATION method, you should register the handler :

SET HANDLER on_before_wa_content_change ACTIVATION abap_true.

 

Thanks,

Shreyasi


Viewing all articles
Browse latest Browse all 7775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>