cancel
Showing results for 
Search instead for 
Did you mean: 

Getting current user's business role

Former Member
0 Kudos

Hi,

Is there any function that read current user's business role in CRM?

Best Regards.

Sadi

Accepted Solutions (1)

Accepted Solutions (1)

BGarcia
Active Contributor
0 Kudos

Hi Sadi,

Try something like this:


DATA ls_user_role TYPE string.
DATA lr_profile_instance TYPE REF TO if_crm_ui_profile.
 
*- Read User Role
    lr_profile_instance = cl_crm_ui_profile=>get_instance( ). 
    CALL METHOD lr_profile_instance->get_profile
      RECEIVING
        rv_result = ls_user_role.

Kind regards,

Garcia

Answers (2)

Answers (2)

0 Kudos


Hi,

I am able to fetch the business role using the above code in the foreground.
But, the above code in not working when I run the job in the backgrund.
I'm getting the Business role as blank in the background.

Can you please help me on this ?

Former Member
0 Kudos

Hi,

The above code is correct, you can use that.

Thanks,

Shobhit