cancel
Showing results for 
Search instead for 
Did you mean: 

Document Authorization

Former Member
0 Kudos

Dear Experts,

           DMS standard authorization objects are at level document type . Is there any possibility to restrict some persons for a particular document level for change and display dynamically during the document processing.

Regards

Neelima

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member585060
Active Contributor
0 Kudos

Hi,

Below is the sample code

You can get the Roles from table AGR_USERS based on User name.

IF draw-dokst = 'RV'.

* Get all the assigned roles for the User
    SELECT agr_name
                   uname
                   from_dat
                   to_dat INTO TABLE i_roles
                   FROM agr_users
                   WHERE uname   = sy-uname
                  AND   exclude = space.
    IF sy-subrc = 0.


* Delete all the roles which are not valid
      DELETE i_roles     WHERE from_dat > sy-datum
                         OR    to_dat   < sy-datum.

SORT i_roles.

  ENDIF.

* Check whether the User has that role assigned

READ TABLE i_roles INTO wa_roles WITH KEY
                            agr_name = <new_role>.
    IF sy-subrc = 0.

      RAISE exception cancel.
    ENDIF.

ENDIF.

Thanks & Regards

Bala Krishna

former_member585060
Active Contributor
0 Kudos

Hi,

Assign a Role to all the users to whom you have to restrict authorization to the Transaction.

Implement the Badi 'DOCUMENT_AUTH01'.

You can get the Document status from DRAW importing parameter in field DRAW-DOKST.

Check the status

Now based on the User name get the see if this user has that role assigned, if the user has that role assigned then raise an exception "CANCEL' to restriction transaction.

Thanks & Regards

Bala Krishna

Former Member
0 Kudos

Hi,

Please explain your requirement.

Regards,

Siddharth