cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all session id or one session id ?

Former Member
0 Kudos

Hi, experts,

I hope to know how to get the session id when I run the webdynpro application for abap?

Action:

1. create a view(main_view) in the webdynpro application for abap(z_test_component).

2. write the code for getting the session id in the wddoinit method in the main_view.

3. Once the WDA is running, I can get all session id from system.

But I don't know how to code for all session ids in the wddoinit method in the main_view? And, I don't know how to get one session id?

Do you give me some hint?

Thanks a lot.

Best regards,

tao

Edited by: wang tao on Jul 7, 2008 11:19 AM

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

What exactly do you want with the session ID? As stated you don't have direct access to the request or response object in WD and you shouldn't manipulate the session id as you might within BSP. You can get access the internal ABAP session information via the TH_* function modules like TH_USER_LIST. Perhaps some more details on what you would like do with this information would be helpful.

Former Member
0 Kudos

Hi Thomas,

Thanks a lot for your help!

Because I need know how many people access my WDA.

and, I need know how many people have logon on my WDA in current time.

The following is my logic:

1. Once the man logon my application, I get the session id and begin time, and then, recording it in the R/3.

2. Once the man logout my application, I get the session id and end time, and then, updating end time to the created recode in the first step.

Thus, I may count how many people access my application and how many people have logon on my application in current time through getting all session id.

Do you give me some hint for solving the problem?

Thanks again!

Best regards,

tao

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Then you should be able to acomplish that with the TH_USER_INFO function module. You can get the internal session ID at the WDDOINIT and then again at the WDDOEXIT to calculate the usage time.

However you might want to look into CCMS. There is already a lot of runtime information captured by the system by the Performance Collector and available in various Basis transactions for monitoring the system. You might be duplicating functionality that already exists.

Former Member
0 Kudos

Hi Thomas,

Thanks a lot for your help!

I didn't found any package or funtion group that is named CCMS in the R/3. I guess I must misunderstand your mean.

Do you tell me what is CCMS?

Thanks again!

Best regards,

tao

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

CCMS isn't the name of a single API or function module - it is the name for the general monitoring capabilities within SAP systems. Search for CCMS in the online help you will get 1500+ hits. CCMS is generally something your Basis people should be very familiar with, so you might ask them as well.

Former Member
0 Kudos

Hi Thomas,

Thanks a lot for your help!

I have solved the problem under your help. I am very sorry so late to tell you because of the annual holiday.

Thanks again!!!

Best regards,

tao

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

In Web Dynpro you have limited access, framework will not allow you directly to access some of the APIs which are there in BSP like IF_HTTP_REQUEST

You can navigate to a BSP page and get the Session ID

Abhi