Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Restrict SAP user ID login for only one Terminal

$
0
0

Scenario: Client wants to restrict the user to login from any other terminal except allocated one.

 

Solution :

 

Step 1 : Use Funtion Exit : EXIT_SAPLSUSF_001 which is called immediate after login.

 

Function.png

 

Step 2 : Create Z table which contain UserId, IP Address, and Terminal Name.

 

structure.JPG

 

Step 3 : call function module  TH_USER_INFO in function exit EXIT_SAPLSUSF_001 inclue : ZXUSRU01


Here TERMINAL is terminal name and ADDRSTR is IP address

userinfo.png

 

step 4 : If it runs first time add user id, IP address and Terminal Id in table from next time validate from Z table.

 

 

 


step 5 : use function module  WS_MSG to raise error.

 


message.JPG

 

step 6 : call 'SYST_LOGOFF' if user is not authorize.


log off.JPG

 

 

Remarks : Do not use any other method to raise error, because.......

 

mas.png

 

if user is not authorize still he/she can login using Create Session

 

WS_MSG gives only below options.

 

mas.png


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>