‎2010 Mar 09 11:25 AM
Hi All,
I have a requirement to determine the sales areas that a business partner is authorized to edit in my report program. Can this be done by programatically using the Authorization object CRM_BP_SA.
Thanks,
Shilpi
‎2010 Mar 09 11:28 AM
Hi,
You can do it by the following way.
AUTHORITY-CHECK OBJECT 'CRM_BP_SA'
ID 'ACTVT' FIELD '*'.
IF sy-subrc EQ 0.
<your logic in here>
ENDIF.
Hope this helps
Thanks
Mani
‎2010 Mar 09 11:28 AM
Hi,
You can do it by the following way.
AUTHORITY-CHECK OBJECT 'CRM_BP_SA'
ID 'ACTVT' FIELD '*'.
IF sy-subrc EQ 0.
<your logic in here>
ENDIF.
Hope this helps
Thanks
Mani
‎2010 Mar 09 11:47 AM
Hi Mani,
Thanks for the answer.
My scenario is that I have to populate an F4 help with sales areas based on the authorisation check.
So what I dont understand here is what does ID and FIELD stand for and can this return me all the sales areas that satisfy the authority check for this object.
AUTHORITY-CHECK OBJECT 'CRM_BP_SA'
ID 'ACTVT' FIELD '*'.
IF sy-subrc EQ 0.
<your logic in here>
ENDIF.
Kind Regards
Shilpi
‎2010 Mar 09 11:52 AM
Hi,
ID stands for activity type. For example, read/write/update etc., These activities are represented by numerical values and what they stand for can be found in the authorization object. FIELD represents a sub-component of the protexted object. Looking at the authorization object itself will give you an idea.
Regards,
Arun Prakash
Edited by: Arun Prakash Karuppanan on Mar 9, 2010 5:23 PM
‎2010 Mar 09 12:06 PM
Hi Shilpa,
Actually you have confirm first that the report is only for display or doing some changes,later
select all the entries from the check table .(like for plants(WERKS) t001w).
take the entry .
data: t_werks type range of werks.
data:ft_werks type range of werks.
data: wa_weks type werks.
select werks from t001w into t_werks .
loop at t_werks into wa_werks.
Authority-check-object = '?'
ID 'WERKS' field = wa_werks
ID 'ACTIV' field = '*'.
if sy-subrc in initial.
append wa_werks into ft_werks.
endif.
use table ft_werks for F4 help .
Regards,
Kiran Kumar