文章目录
- 1 T-code
- 2 Method
- 3 Summary
1 T-code
We use t-code is ‘su21’ and ‘PFCG’ .
Creat Authorization objects .
Create role
2 Method
DATA: zbz(1).
CLEAR:zbz.
SELECT SINGLE COUNT(*) FROM agr_users WHERE uname = sy-uname AND agr_name = 'ZMM_PRICE001'."用户是否拥有此角色判断是否可查看价格
IF sy-subrc = 0.
zbz = 'X'.
ENDIF.
LOOP AT gt_data ASSIGNING <lfs_data> .
IF zbz <> 'X' AND <lfs_data>-matkl+3 <> 100 .
<lfs_data>-rmwwr = 0.
<lfs_data>-wmwst1 = 0.
<lfs_data>-cy = 0.
<lfs_data>-wmwst = 0.
<lfs_data>-wrbtr = 0.
<lfs_data>-wrbtr1 = 0.
<lfs_data>-fli = 0.
<lfs_data>-zki = 0.
<lfs_data>-bhsje = 0.
<lfs_data>-zkpj = 0.
ENDIF.
ENDLOOP.
3 Summary
In the report the data is limited for user. We can do it as the method .and in the internal table we delete the data.