Get Business Role and Confirm Data


Read the current user Business Role in SAP CRM:


***Get  Business Role
 Data(lr_ui_profile) = cl_crm_ui_profile=>get_instance( ).

IF lr_object IS BOUND.
     Data(lr_br_profile) = lr_ui_profile->get_profile( ).
ENDIF.

IF rv_result EQ lc_busuness_role.
     "Added your logic
ENDIF.


Read the current customer confirm data Sin AP CRM:

Data(lr_current_data) = cl_crm_ui_data_context_srv=>get_instance( me ).   

IF lr_current_data is bound.

***Get Business Partner Details
lr_current_data ->get_entity( name = 'CURRENTCUSTOMER' ).

***Get Contract Account Details
lr_current_data ->get_entity( name = 'CURRENTBUAG' ).

***Get Premise Details
lr_current_data ->get_entity( name = 'CURRENTPREMISE' ).

ENDIF.

Comments

Popular posts from this blog

Usages of SU3 TCODE

RFC Destiation in SAP