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

Re: Restricting Navigation in IC-Agent

$
0
0

Hi ,

 

U can use in Window inbound plug IP_CREATE

 

DATA:     lr_gdc      TYPE REF TO if_crm_ui_data_context,

             lr_bo_prop  TYPE REF TO cl_crm_bol_entity,

             lr_bo_prop1 TYPE REF TO cl_crm_bol_entity.

 

DATA: lr_ui_profile   TYPE REF TO if_crm_ui_profile.

   DATA: lv_profile TYPE crmt_ic_configprof.

 

* Validation to  check the Business Role

 

   lr_ui_profile = cl_crm_ui_profile=>get_instance( ).

   lv_profile = lr_ui_profile->get_profile( ).

 

   IF lv_profile = 'ZABC' .

 

     CLASS cl_crm_ic_a_vehmcontrolle_impl DEFINITION LOAD .


     lr_gdc = cl_crm_ui_data_context_srv=>get_instance( ).


     IF lr_gdc IS BOUND.


       lr_bo_prop  ?= lr_gdc->get_entity( 'CURRENTCUSTOMER' ).


       lr_bo_prop1 ?= lr_gdc->get_entity( 'CURRENTSERVICEREQUEST' ).

 

       IF lr_bo_prop IS NOT BOUND AND lr_bo_prop1 IS NOT BOUND.    

 

*       Throw Error Messsage

 

DATA: lr_msg_service TYPE REF TO cl_bsp_wd_message_service.

  lr_msg_service ?= view_manager->get_message_service( ).

  lr_msg_service->add_message( iv_msg_type = 'E'

  iv_msg_id = 'ZCRM'

  iv_msg_number = '001' ).

 

Regards,

Sumeet


Viewing all articles
Browse latest Browse all 7775

Trending Articles



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