Skip to Content
avatar image
Former Member

Program with authorization object

Hi Experts,

I have an issue regarding rules and authorization.

I have created a program with 2 radio buttons transfer and backload. The requirement in authorization is not all users can access both; some can only access transfer and some can access backload only. (r_trans,r_back)

The basis told me that they need an authorization object in order for them to block/separate the transaction for transfer and backload.

Is there a way for me to modify the program and put an authorization object with my radio button? or is it possible to do this with the current program?

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Sep 11, 2014 at 11:31 AM

    Hi,

    Another option is to assign a different transaction to the program .

    Like sap do (MM01,MM02,MM03) .

    And in the program hide the unrelevant buttons base on sy-tcode .

    The transaction can be assign to a role .

    IMHO hiding is more user friendly .

    Regards.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 11, 2014 at 10:53 AM

    Hi,

    the SAP logic is to test the authorization after user start program. You just check if he ask transfer if he could .. or if he ask backload ....

    you don't need to create two object, you couldĀ  create one object with a field that contain 2 possibles values. SU20 SU21

    regards

    Fred

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 11, 2014 at 10:55 AM

    Hi

    You should create an authorization object having 2 activities, for example:

    - 01: Transfer

    - 02: Backload

    So you can check the object in the AT SELECTION-SCREEN event of your program:

    AT SELECTION-SCREEN.

        CASE 'X'.

           WHEN <RADIOBUTTON 1>. ACTIVITY = '01'.

          WHEN <RADIOBUTTON 2>. ACTIVITY = '02'.

         ENDCASE.

    AUTHORITY-CHECK OBJECT <YOUR OBJECT>

           ID 'ACTIVITY' FIELD ACTIVITY.

    IF SY-SUBRC = 0.

       user is author.

    ELSE.

       user is not author.

    ENDIF.

    Max

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 11, 2014 at 11:37 AM

    Hi Jepoy,

    If any Tcode we don't have an access we go through the Tcode SU53, and check what are the roles was missed for the users. and the missed roles add to the user the he/she can able to access the Tcode.

    execute the authorization object at Initialization event and receive the subrc based on the what activity you have received in the code.

    For Program Why don't you try the Check Box Concept.

    Case 1:

    if the user have the access of Transfer and BackLoad show them as enable, if he select one, un check the other one using the user command field.

    Case 2:

    If He/she has only access for 1 check box. enable that one grayed out the other one.

    Regards

    Sudhakar

    Add comment
    10|10000 characters needed characters exceeded