To get business role of user
http://forums.sdn.sap.com/thread.jspa?messageID=9084510#9084510
CL_CRM_UI_PROFILE
and the method GET_PROFILE
if it asks for a authorization role check this function module
SUSR_USER_AUTH_FOR_OBJ_GET
V_PROFILE ?= CL_CRM_UI_PROFILE=>GET_INSTANCE( ).
CALL METHOD V_PROFILE->IF_CRM_UI_PROFILE~GET_PROFILE
RECEIVING
RV_RESULT = V_ROLE.
APR 8TH
Posted by johanvz in ABAP Code
Sometimes you need to determine the WebClient Profile of the logged in user. The code below you allows you to accomplish this.
In CRM 4.0:
data: lv_profile type crmc_ic_profile .
lv_profile = cl_crm_ic_services=>get_customizing_profiles( ).
In CRM 5.0 and beyond:
data: lr_prof type ref to if_ic_profile,
lv_prof type string.
lr_prof = cl_ic_profile_service=>get_instance( ).
lv_prof = lr_prof->get_profile( ).
ABAP Code, IC WebClient
I dont remember from where i got the below code.. thanks to the author who posted it there..
The relationship of BP(Employee) to Username is as follows:
Tcode: SE16 , In Table HRP1000
Field OTYPE = CP
Field UNAME = Provide Employee username (Should be maintained in Tcode BP, Role= Employee in tab identification)
You'll get OBJID.
Use the OBJID from above in table HRP1001.
OTYPE = CP
OBJID = OBJID (from HRP1000)
RELAT = 207
You'll get the BP number in field SOBID.
use FM BP_CENTRALPERSON_GET to get BP from USERName and vice versa.