Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

authority-check

Former Member
0 Likes
423

hi all

how to check the authorisation for a particaular user in SU53 with the object that s not present in that particular server say for example development , but that authorisation object exists in production, since we dont have access to production server how do i simulate the case in development

my problem is when a particular user runs a report he no output is displayed for the report, then they suspected like it cud be a authorisation problem,and in SU53 for a particular authorisation object it s supposed to display three field values like workcenter plant and one more field for this particular user the workcenter is displaying a value which is not present in the system

then when we debugged the pgm there a autority-check made n the program for

for that authorisation object passing run time values for those fields, since i dont have access to pdction am not able to trace the issue.

please suggest s there any other way to check how is the values getting populated for the authorisation object

hi all

how to check the authorisation for a particaular user in SU53 with the object that s not present in that particular server say for example development , but that authorisation object exists in production, since we dont have access to production server how do i simulate the case in development

my problem is when a particular user runs a report he no output is displayed for the report, then they suspected like it cud be a authorisation problem,and in SU53 for a particular authorisation object it s supposed to display three field values like workcenter plant and one more field for this particular user the workcenter is displaying a value which is not present in the system

then when we debugged the pgm there a autority-check made n the program for

for that authorisation object passing run time values for those fields, since i dont have access to pdction am not able to trace the issue.

please suggest s there any other way to check how is the values getting populated for the authorisation object

2 REPLIES 2
Read only

former_member386202
Active Contributor
0 Likes
399

Hi,

Refer thsi code

&----


*& Form sub_check_auth_iwerk *

&----


  • This form checks authorization for plant. *

----


FORM sub_check_auth_iwerk .

--Constant for t code, no tcode hence value = '' (all)

CONSTANTS: lc_tcd LIKE tstc-tcode VALUE '*'.

*--Table for all the plants in selection screen. This

  • table will be used for authority check.

DATA: BEGIN OF li_plant OCCURS 0,

iwerk LIKE t001w-werks,

END OF li_plant.

*--Select query to pick plant from table t001w

SELECT werks "Plant

INTO TABLE li_plant

FROM t001w

WHERE werks IN s_iwerk.

LOOP AT li_plant.

AUTHORITY-CHECK OBJECT 'I_SWERK'

ID 'TCD' FIELD lc_tcd

ID 'SWERK' FIELD li_plant-iwerk.

*--Check SUBRC

IF sy-subrc NE 0.

*--No Authorization for Plant

MESSAGE e016 WITH li_plant-iwerk.

ENDIF.

ENDLOOP. "loop at li_plant

ENDFORM. "sub_check_auth_iwerk

Regards,

prashant

Read only

Former Member
0 Likes
399

solved by myself