SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Полномочия без authority-check



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
MarkovSoft
Участник
Участник



Joined: 23 Apr 2008
Posts: 8

PostPosted: Fri Aug 22, 2008 12:25 pm    Post subject: Полномочия без authority-check Reply with quote

Добрый день.
Необходимо считать полномочия роли. Т.е. не authority-check, а именно получить значения из объекта полномочий Т.о. юзер не указывает совсем,к примеру БЕ. А мы считываем те БЕ на которые у него есть доступ и используем в отчете
Back to top
View user's profile Send private message
John Doe
Модератор
Модератор


Age: 45
Joined: 05 Nov 2007
Posts: 725
Location: КраснАдар

PostPosted: Fri Aug 22, 2008 12:48 pm    Post subject: Reply with quote

Проверка полномочий не для текущего пользователя
Можно предложить пробежать по списку БЕ и проверить для пользователя обычным AUTHORITY-CHECK на какие у него есть полномочия.
Back to top
View user's profile Send private message Blog
vga
Мастер
Мастер


Age: 190
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Aug 22, 2008 3:15 pm    Post subject: Reply with quote

На мой взгляд, правильней проверить все допустимые значение через AUTHORITY-CHECK.

Code:
TABLES: t001.
SELECT-OPTIONS: so_bukrs FOR t001-bukrs.
RANGES: r_bukrs FOR t001-bukrs.
TYPES: BEGIN OF it_t001,
        bukrs TYPE t001-bukrs,
       END OF it_t001.
DATA: it_t001 TYPE TABLE OF it_t001 WITH HEADER LINE.

REFRESH r_bukrs.

SELECT bukrs FROM t001 INTO TABLE it_t001
    WHERE bukrs IN so_bukrs.

LOOP AT it_t001.
  AUTHORITY-CHECK OBJECT 'ZERU_BUKRS'
        ID 'TCODE' FIELD sy-tcode
        ID 'BUKRS' FIELD it_t001-bukrs.
  IF sy-subrc IS INITIAL.
    r_bukrs-sign  = 'I'.
    r_bukrs-option = 'EQ'.
    r_bukrs-low = it_t001-bukrs.
    APPEND r_bukrs.
  ENDIF.
ENDLOOP.


Если пользователь не текущий, то заменить AUTHORITY-CHECK на ФМ AUTHORITY_CHECK, как John Doe выше советовал.
Back to top
View user's profile Send private message Blog Visit poster's website
MarkovSoft
Участник
Участник



Joined: 23 Apr 2008
Posts: 8

PostPosted: Tue Aug 26, 2008 6:23 am    Post subject: Reply with quote

Спасибо огромное!
Почему-то не пришло уведомление об ответе. Реализовал по 1-му варианту самостоятельно. но все равно огромное спасибо
Back to top
View user's profile Send private message
ESV
Участник
Участник



Joined: 28 Feb 2008
Posts: 1

PostPosted: Mon Sep 01, 2008 5:04 pm    Post subject: Reply with quote

Попробуйте SUSR_USER_AUTH_FOR_OBJ_GET
Back to top
View user's profile Send private message
Igor_34_rus
Специалист
Специалист



Joined: 08 Apr 2009
Posts: 75

PostPosted: Wed Oct 13, 2010 4:04 pm    Post subject: Reply with quote

CALL FUNCTION 'GET_AUTH_VALUES'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.