2010 May 25 2:16 PM
Hello All,
is there an alternative for something like that?
AUTHORITY-CHECK OBJECT 'M_BEST_WRK'
ID 'ACTVT' FIELD '01'
ID 'ACTVT' FIELD '02'
ID 'ACTVT' FIELD '03'
ID 'WERKS' FIELD h_werks.Can I put more than one activity in one field: ...'ACTVT' FIELD '01,02,03' or ... 'ACTVT' FIELD '01 02 03'?
Hello All,
is there an alternative for something like that?
AUTHORITY-CHECK OBJECT 'M_BEST_WRK'
ID 'ACTVT' FIELD '01'
ID 'ACTVT' FIELD '02'
ID 'ACTVT' FIELD '03'
ID 'WERKS' FIELD h_werks.Can I put more than one activity in one field: ...'ACTVT' FIELD '01,02,03' or ... 'ACTVT' FIELD '01 02 03'?
2010 May 25 3:02 PM
you should use it one by one based on the requirement ,
IF condition 1
AUTHORITY-CHECK OBJECT 'M_BEST_WRK'
ID 'WERKS' FIELD h_werks
ID 'ACTVT' FIELD '02'.
else if condition 2 .
AUTHORITY-CHECK OBJECT 'M_BEST_WRK'
ID 'WERKS' FIELD h_werks
ID 'ACTVT' FIELD '03'.
Endif.
.
2010 May 25 3:49 PM
If security is set as usual, expect that:
1 will also have 2 and 3; 2 will also have 3. 3-only will have neither 1 nor 2, and some users may have nothing.
So do the authority check as many times as needed to figure out what your user's capabilities are:
If 1 fails (sy-subrc ne 0), try 2. If 2 fails, try 3. If fails 3, user cannot even view the data.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |