Posted: Fri Aug 22, 2008 12:25 pm Post subject: Полномочия без authority-check
Добрый день.
Необходимо считать полномочия роли. Т.е. не authority-check, а именно получить значения из объекта полномочий Т.о. юзер не указывает совсем,к примеру БЕ. А мы считываем те БЕ на которые у него есть доступ и используем в отчете
Age: 170 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Fri Aug 22, 2008 3:15 pm Post subject:
На мой взгляд, правильней проверить все допустимые значение через 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 выше советовал.
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.