Application Development and Automation 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: 
Read only

Remove users from a specific transaction ( ex:-va02) using a background pro

Former Member
0 Likes
666

Remove users from a specific transaction ( ex- va02 0r /SAPAPO/SDP94) using a background process

accomplished using SM04 transaction through programatically(se38)

1 REPLY 1
Read only

Former Member
0 Likes
605

Hi,

Please check the Below Code.

SELECT * FROM USR01.

*

CALL FUNCTION 'AUTHORITY_CHECK'

EXPORTING

USER = USR01-NAME

OBJECT = 'TRANCODE'

FIELD1 = 'TXD'

VALUE1 = 'FB01'

EXCEPTIONS

USER_DONT_EXIST = 1

USER_IS_AUTHORIZED = 2

USER_NOT_AUTHORIZED = 3

USER_IS_LOCKED = 4

OTHERS = 5.

*

WRITE: / USR01-NAME.

*

CASE SY-SUBRC.

WHEN 2. WRITE: 'USER_IS_AUTHORIZED'.

WHEN 3. WRITE: 'USER_NOT_AUTHORIZED'.

WHEN OTHERS. WRITE: 'ERROR', SY-SUBRC.

ENDCASE.

*

ENDSELECT.

The program checks whether an Autz object is assigned to the Tcode. If this is the case, the program checks whether the user has an Authz for this authorization object. The transaction code/authorization object assignment is stored in table TSTCA.

Hope this is helpfull

Thanks

kalyan