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

Transaction AFAR doesn't check for authorization

Hi,

I've added transaction code AFAR in one of the role that has Check/Maintain for authorization object A_PERI_BUK which should restrict on company code. Ive even check the associated program RAAFAR00 which has the authority chekc statement.

But, when I restrict the access to a specific company code in the role, the transaction is still allowing the users to execute it with other company codes. User doesn't have any other roles assigned and all the other tcodes such as AFAB, AFBP are giving authorization errors.

Can some one help!!

Regards,

Raghu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 19, 2011 at 01:41 PM

    Hi,

    it is not throwing failed authority check error but should work just fine.

    
        AUTHORITY-CHECK   OBJECT  'A_PERI_BUK'
                          ID      'AM_ACT_PER'      FIELD con_31
                          ID      'BUKRS'           FIELD x093c-bukrs.
        IF sy-subrc NE 0.
    *       WRITE: / text-f08, x093c-bukrs. commented by C5053255
          CONTINUE.
        ELSE.
    *      Rücklesen des eingegebenen Geschäftsjahres pro Buchungskreis
          p_gjahr = sav_gjahr.                                  "> 627533
        ENDIF.
    
    

    CONTINUE statement executed in case of failed authority-check causes loop to skip processing for this item ... so only elements for which user has proper authorizations are processed. Try debugging to confirm 😊

    Best regards,

    FS

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2011 at 07:05 AM

    Hi Raghu

    I've tried this in our ECC6 version with activity 31and it 'passes' an incorrect company code as a 4

    A_PERI_BUK RC=4 AM_ACT_PER=31;BUKRS=2060;

    But, the report appears to be empty - does your report return any valid data? With any other activity it gives an authorisation failure...

    Regards

    David

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks Filip and David,

      The fact is that I don't have any data in the test system. But, when I enter any company code it is just going to the report screen in Test Run mode.

      I hope SAP has to fix this.

      Regards,

      Raghu

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.