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: 

Transaction AFAR doesn't check for authorization

Former Member
0 Kudos

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

4 REPLIES 4

FilipSt
Explorer
0 Kudos

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

Former Member
0 Kudos

Hi Filip

I didn't read your reply properly before replying - sorry. This makes sense now as the report returns no data which is just what you said the program is doing.

Cheers

David

Former Member
0 Kudos

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

0 Kudos

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