Skip to Content
author's profile photo Former Member
Former Member

authorization check

hello frns,

below is the code for authorizations,

the requirement is that ,

the authorization should be yes only

if all the bukrs are authorized for the user,

but now it is giving authorization even if one bukrs is valid.

AUTHORITY-CHECK OBJECT 'M_MATE_BUK'

ID 'ACTVT' DUMMY

ID 'BUKRS' FIELD P_FS.

IF SY-SUBRC = 0.

ZZ_EXIT = 'Y'.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jul 10, 2007 at 07:18 PM

    Hi,

    v_auth = 'Y'.
    
    Loop at i_t001w.
    AUTHORITY-CHECK OBJECT 'M_MATE_BUK'
    ID 'ACTVT' DUMMY
    ID 'BUKRS' FIELD i_t001w-werks.
    
    IF SY-SUBRC ne 0.
      v_auth = 'N'.
    ENDIF. 
    endloop.
    
    

    After this loop if v_auth eq 'Y' that means user have authorisation

    aRs

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 10, 2007 at 07:22 PM

    Hi,

    In this case the authority check statement will check if user profile of user ( the user who logged in R/3) have object 'M_MATE_BUK' with field value BUKRS = P_FS. If this true then only this authorization will be passed otherwise not.

    So just debug the code and see wht is the value for P_FS and check in SU01 if that user id has object 'M_MATE_BUK' with field value BUKRS = P_FS. If not then you need to ask security guy to add that particular value and object in user profile

    Thanks,

    Harkamal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 10, 2007 at 07:48 PM
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.