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: 

get session id

Former Member
0 Kudos

Hello experts,

I would like to know if it's possible to get the sessionID of the current session of an user within an ABAP report - similar to getting other system-parameters, such as system time, username etc. I couldn't find a system-parameter-field (like sy-uname etc.) which fulfills my requirements.

Does anybody of you know how I can get the session ID ?

Thanks in advance,

winnerin

3 REPLIES 3

ThomasZloch
Active Contributor
0 Kudos

Not 100% sure which session ID you mean. Browse through the function modules with names THUS (selection mask) and see if one fits your needs.

Thomas

0 Kudos

i think you are asking about the session ID which comes in SM04->technical info..

if yes.. just follow the standard code and you will find that.. there is a system command which solves your query..

call 'ThUsrInfo' id 'OPCODE' field opcode_usr_info
    id 'TID' field tid
    id 'TABLE' field usr_info-*sys*.

This is in form build_usr_info of program 'RSM04000_ALV'

0 Kudos

you can get the termial id by using by using FM THUSRINFO

then pass this to FM TH_SHOW_USR_DETAILS... you will get all deatils

or directly use FM: TH_GET_SESSION_ID

this will directly give you session id

Edited by: Soumyaprakash Mishra on Jun 21, 2010 10:10 PM