Application Development 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: 

How to do authorization check for company code?

Former Member
0 Kudos

User will create batch-input-sessions for one company code, but we should check if the user has permission to access to this company code before the creating action. then which FM or method can we use to make authorization check for this company code? Thanks a lot.

2 REPLIES 2

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Implement the code:

FORM authority_check .

  • Authority Check For the Migration

AUTHORITY-CHECK OBJECT 'YX30_MIGR'

ID 'SYSTEM' FIELD p_sysid

ID 'BUKRS' FIELD p_bukrs

ID 'YX30_DMOBJ' FIELD p_object

ID 'ACTVT' FIELD '16'.

IF sy-subrc <> 0.

MESSAGE e010 WITH p_sysid p_bukrs p_object '16'.

ENDIF.

ENDFORM. " authority_check

Regards,

Sree

Former Member
0 Kudos

hi

good

go through this link,hope this would help you to solve your problem

http://www.mariewagener.de/Note.Juni.2006

reward point if helpful.

thanks

mrutyun^