Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

authorization object in program

Former Member
0 Likes
610

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
568

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

4 REPLIES 4
Read only

Former Member
0 Likes
569

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

Read only

0 Likes
568

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

Read only

0 Likes
568

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

Read only

0 Likes
568

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