Question:
Hi
This code is not working for me. When executing the report with a user in company code '1200', no authorization error messages are displayed. Why? What am i doing wrong? I've tried a number of objects which contains BUKRS and it does the same
AUTHORITY-CHECK OBJECT 'F_KNA1_BUK'
ID 'BUKRS' FIELD '1000'
ID 'ACTVT' FIELD '*'.
IF sy-subrc <> 0
message e001.
ENDIF.
Answer:
found it . User Profile
Answer:
The users shouldn't have * Activity/ACTVT in their roles for F_KNA1_BUK - maybe it would be wiser to search for an activity more specific to what you are trying to acheive.
Answer:
1. You should not HARD code the company code , it should come from the retreived record.
2. Activity ( ACTVT) should be Specific NOT an asterisk ( 01, 02, 03,06 etc.). This will require the user to have ALL authorization for this object which may not be appropriate for OTHER transactions and reports