cancel
Showing results for 
Search instead for 
Did you mean: 

BW-Analysis Authorization Using Exits

Former Member
0 Kudos

Dear ABAP-Developers,

I have a aDSO which provide analysis authorization. I would like to create from this table a user exit like this;

aDSO : /ADS/BWP01 - Table : /ADS/ABWP017

Exit Code:

WHEN '/ADS/0SALESORG_M1'.
DATA: l_username TYPE xubname,
      lt_abwp017_user TYPE STANDARD TABLE OF /ADS/ABWP017,
      wa_abwp017_user TYPE /ADS/ABWP017.
IF i_step EQ '0'.
  CALL FUNCTION 'RSEC_GET_USERNAME'
    IMPORTING
      e_username = l_username.
REFRESH lt_abwp017_user.
SELECT * FROM /ADS/ABWP017 INTO TABLE lt_abwp017_user WHERE /ADS/S_BBIUSER = l_username.
IF sy-subcs = 0.
LOOP AT lt_abwp017_user into wa_abwp017_user.
CLEAR: l_s_range, wa_abwp017_user.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
l_s_range-low = wa_abwp017_user-salesorg.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
ENDLOOP.
  ENDIF.

Logic:

If the column ("/ ADS / OPERANT") is equal to 1, the user gets the corresponding authorization. if the column is equal to 0, this is ignored. (Outdated).
If the value is #, output * (star = all authority) should get.

My Variable : /ADS/0SALESORG_M1 (Single, Optional, User-Exit)

Example : the User "TESTUSER1" should get 0SALESORG = 0004.

the User "TESTUSER2" shouldnt get any Authority, cause Value= 0.

the User "TESTUSER3" should get "SALES_GRP" all authority, cause value = #

Could anyone complate my code?

Thanks alot

Sascha..

Accepted Solutions (0)

Answers (1)

Answers (1)

DoanManhQuynh
Active Contributor

what's problem with your code? There are 2 ways to achieve this:

1. Classic authorizations: like you do now but you have to create authorization objects in RSECADMIN and assign authorization variables too, please check it.

2. Virtual authorizations: you can follow this series of blogs for more detail.

Former Member
0 Kudos

thanks for ways. i would like to use classic authorization.

Coding has problem and wanna expand it like see my Logic-part..

DoanManhQuynh
Active Contributor
0 Kudos

Sascha Skgisasy

So in classic way you need authorization objects, roles, etc.. following blog have simple explanation about it.