I want to get List of all active sessions in current system
Hi experts
How to get list of all active sessions in current system in any internal table along with details.
A sample code wud be helpful
Thanks in advance.
try this code it might help u.
Below report execution gets the active Session list to ABAP memory
submit rsm04000_alv and return exporting list to memory.
refresh: gt_listobj.
Below FM get the List output from ABAP memory to gt_listobj in HEX
call function 'LIST_FROM_MEMORY'
tables
listobject = gt_listobj
exceptions
not_found = 1
others = 2.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
This FM converts ITAB gt_listobj from HEX to ASCII
call function 'LIST_TO_ASCI'
tables
listasci = it_list
listobject = gt_listobj
exceptions
empty_list = 1
list_index_invalid = 2
others = 3.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
This Shows the output in List format on screen
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_structure_name = 'line'
tables
t_outtab = it_list
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0. " Executed successfully ?
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
Similar Messages
-
How to get List of all activated Info objects in sap BI production system
Hi Experts,
For my requirement I need list of all activated info objects in sap bi production system.
Can any body suggest any thing.Hi,
Check in the following table, all the below tables are for InfoObejct related only
RSDIOBJ -
Directory of all InfoObjects
RSDIOBJT------ Texts of InfoObjects
RSDIOBJ------- Directory of all InfoObjects
RSDIOBJT----- Texts of InfoObjects
RSDATRNAV------ Navigation Attributes
RSDATRNAVT----- Navigation Attributes
RSDBCHATR------ Master Data Attributes
RSDCHABAS------- Basic Characteristics (for Characteristics,Time Characteristics, and Units)
RSDCHA----
Characteristics Catalog
RSDDPA -
Data Package Characteristic
RSDIOBJCMP----
Dependencies of InfoObjects
RSKYF----
Key Figures
RSDTIM----
Time Characteristics
RSDUNI -
Units
Thanks
Reddy -
How to get all active session id's
hai,
i am new to servlet. i am tring to find out all active session id's for security perpose.
and also i want to deactive a perticular session using that session id.
but i don't know how to do. please help me.
thanks in advance.Well to me.. I wud like to write a Listener class implementing HttpSessionListener in the following way....
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;
import java.util.HashMap;
public class SessionHandler implements HttpSessionListener{
public static HashMap<String,HttpSession> SessionsMap = new HashMap<String,HttpSession>();
public void sessionCreated(HttpSessionEvent se) {
SessionsMap.put(se.getSession().getId(),se.getSession());
public void sessionDestroyed(HttpSessionEvent se) {
SessionMap.remove(se.getSession().getId());
public static invalidateSession(String SessionId){
HttpSession session = SessionsMap.get(SessionId);
SessionMap.remove(SessionId);
session.invalidate();
}Note:I'm assuming tht you are running the code on Jdk/jre 1.5+
However, i think its more of core way of implementing this specially usage of static members howevr @ the given situation can very well cater your resources.added to it you add ActivationListener depending on your requirement.
Hope this might help :)
REGARDS,
RaHuL -
FM to get list of all directories and files on application server..
Hi All,
Can anyone tel me FM to get list of all directories and files on application server..i know 'F4_DXFILENAME_TOPRECURSION'
and '/SAPDMC/LSM_F4_SERVER_FILE' these are working too...but my requirement is when i click F4 i should get list of directories and whn i select one of these the only directory name should display.....and whn click again for 2nd text box field i want file name ...means directory name in one text box field and file name in another....plz help me out..
helpful answers wil b awarded.
Thanks,
JayshreeHi Jayashree
Please check this FM, SUBST_GET_FILE_LIST. Pass the file path and file name, if it returns an entry in table FILE_LIST, then the filename and path are valid.
Hope this helps !
~ Ranganath -
To get list of all the running applications
Hi all,
Hey can anyone tell me how i wil get list of all the running applications on windows using java?Cant it be done even using Runtime.exec()?Well, sure. Assuming there is a command-line program
that does what you want. But then your question is
"What can I run at the Windows command line to get a
list of all the running applications?" and (I am sure
you will agree) this is nothing at all to do with
Java programming.
I completely agree... I just find it amazing that this guy knows exactly what he wants to do but is unable to point a web browser to a search engine, type in what he wants to do the read the resulting pages. -
Is there any FM or BAPI to get list of all sales orders
Hello all,
I have the requirement like below.
Is there any FM if i Pass Drawing document no, type,part,revision level which gives
the output list as.
1) all sales orders, where the above drawing document no is attached to the materials
and these materials are used as one of the lower level components in the Sales order BOM,
I need to show all those sales orders along with SO number,item,Material,Plant and BOM Item no,
2)all sales orders, where the above drawing document no is attached to the materials
and the same material is one of the item in sales order.
3)all sales orders, where the above drawing document no is used as one of the component in Sales order BOm's
Addition of 1,2,3 will be the o/p.
are there any FM or BAPI to get the above list.
Basically the above report is concatenation of report outputs of t-code CSD5 and CS15.
Awaiting reply.
Thanks.Hi venkatesh,
You can use the BAPI
BAPISDORDER_GETDETAILEDLIST
to get list of all sales orders.
Here is a lik which provides you BAPI'S regarding everything.
[http://www.saptechies.com/sap-bapi-list/]
Hope this will help you.
Regards,
Pavan. -
Getting list of all users present in SIM
Hi,
I would like to update all the users (attributes of users) in SIM .
Right now I am thinking to get list of all users present in SIM and get the view of each user and then update the particular attribute and chekin the view. and imp point to note here is I am having around 100,000 users present in SIM.
I am thinking there could be a better solution than this...
But I do not know which way can be used to accomplish the task.
Can any one reply immediately with any thought on this.
Thanks in advance.Run a bulk update actions you can easily get a list of all accountids by running select name from userobj;
and in your field or in your input area specify the values u wanna update -
Better way how to get list of all classpath URLs in runtime
Hello everyone,
How to get list of all classpath items (URLs) in runtime from Java code?
I am aware of solution based on System.getProperty("java.class.path"). Is there any alternative?
This solution has several drawbacks. You have to parse String output. And I not sure if it contains ALL resources (JARs, class directories) loaded by ClassLoader or just reflects -cp arguments.
Does system property "java.class.path" contain ALL loaded JARs?
Does it contain items (JARs, class directories) loaded by bootstrap classpath?
What about JARs loaded in runtime?
Is the separator ":" always same on all operation systems?
I was looking for some Java API based solution, method like List<URL> getAllClasspathItems()
But there is nothing like this in ClassLoader, Class, Runtime or System classes.
For curious, here is code I use.
String classpath = System.getProperty("java.class.path");
StringTokenizer st = new StringTokenizer(classpath, ":");
while (st.hasMoreElements()) {
System.out.println(st.nextElement());
}For curious, here are output prints for all 3 methods:
1) parsing system property
2) tschodt
3) overcast SystemClassLoader to URLClassLoader
/home/espinosa/workspace/jboss_embedded_test1/target/test-classes
/home/espinosa/workspace/jboss_embedded_test1/target/classes
/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
package com.sun.org.apache.xerces.internal.impl.validation, Java Platform API Specification, version 1.6
package com.thoughtworks.qdox.directorywalker
package com.sun.org.apache.xerces.internal.parsers, Java Platform API Specification, version 1.6
package java.util.jar, Java Platform API Specification, version 1.6
package org.testng.internal.thread
package com.sun.org.apache.xerces.internal.util, Java Platform API Specification, version 1.6
package java.net, Java Platform API Specification, version 1.6
package sun.reflect.misc, Java Platform API Specification, version 1.6
package esp.ejb.samples1.test
package sun.security.provider, Java Platform API Specification, version 1.
file:/home/espinosa/workspace/jboss_embedded_test1/target/test-classes/
file:/home/espinosa/workspace/jboss_embedded_test1/target/classes/
file:/opt/javalibs/javax/ejb/ejb-api/3.0/ejb-api-3.0.jar
file:/opt/javalibs/javax/jms/jms/1.1/jms-1.1.jar
file:/opt/javalibs/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
...Interestingly, method 1 and 3 gives the same list, same order, same count, just format of item is a little bit different. The order is same as in Eclipse .classpath file.
Method 2 (tschodt) give significantly more items! rougly 3x! Different order (somewhat random it seems to me). Some items contain extra information, like version and string "Java Platform API Specification".
It prints not absolute paths but logical Java names. -
I want to get rid of all unwanted apps off my iphone5. I mean the ones appear as bought but not in use. Is this possible?
No, you can not delete the pre-installed apps. However, you can hide them by placing them in a folder (create one by dragging one app onto another) and putting that folder on an unused page.
-
I want to get rid of all the songs off my iPod....
i want to get rid of all the songs off my iPod but when i press un-sync library, there is about 60 song that won't be erased. i've tried manually erasing them too and it won't earse them. how can i fix this? thankyou
Backup and then restore.
tt2 -
How to get list of drives present in local file system?
Hi all,
I want to show all drives and their contents using JTree.
Does anybody know how to get list of drives present in local file system?Thank you!
I have new question.
I want to disply size and file type. Can you give ur suggestion in order to do that?
I want to provide following using JTree
+ root <Dir> 50KB
- file1 <txt> 10KB
- file2 <bmp> 20KB
+ root2 <Dir> 200KB
-file1 <jpeg> 50KB
Is this possible?
Plz reply..........
bye -
Hey all,
I want to know how many users are on my site. So I tryed so count all activ session:
int countActiveSessions = FacesContext.getCurrentInstance().
getExternalContext().getSessionMap().size();But it returns allways 0. Is the method false or how can I count all sessions?
Thanks for helpYou are OT. Your question concertn much more servlet than JavaServer Faces.
Anyway sessionMap is not the map of all sessions. It is the map of your own session. With a session map you can retrieve the session attributes.
Look there if you want count the active sessions:
http://www.java.happycodings.com/Java_Servlets/code10.html -
How to get List of SharePoint Groups to which Current Users belongs using Javascript ?
How to get List of SharePoint Groups to which Current Users belongs using JavaScript? Not JSOM
Here is the code that worked for me:
var userid= _spPageContextInfo.userId;
var requestUri = _spPageContextInfo.webAbsoluteUrl + '/_api/web/CurrentUser/Groups?$select=Id,Title';
alert(requestUri);
var requestHeaders = { "accept" : "application/json;odata=verbose" };
$.ajax({
url : requestUri,
contentType : "application/json;odata=verbose",
headers : requestHeaders,
success : onSuccess,
error : onError
function onSuccess(data, request){
var s='';
for (var i = 0; i < data.d.results.length; i++)
s +=data.d.results[i].Title+'\n';
alert(s);
function onError(error) {
alert("error"); -
Getting list of all users and their group memberships from Active Directory
Hi,
I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
==================
import javax.naming.*;
import java.util.Hashtable;
import javax.naming.directory.*;
public class GetUsersGroups{
public static void main(String[] args){
String[] attributeNames = {"memberOf"};
//create an initial directory context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
env.put(Context.SECURITY_CREDENTIALS, "p8admin");
try {
// Create the initial directory context
DirContext ctx = new InitialDirContext(env);
//get all the users list and their group memberships
NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
while (contentsEnum.hasMore()){
NameClassPair ncp = (NameClassPair) contentsEnum.next();
String userName = ncp.getName();
System.out.println("User: "+userName);
try{
System.out.println("am here....1");
Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
System.out.println("am here....2");
Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
System.out.println("-----"+groupsAttribute.size());
if (groupsAttribute != null){
// memberOf is a multi valued attribute
for (int i=0; i<groupsAttribute.size(); i++){
// print out each group that user belongs to
System.out.println("MemberOf: "+groupsAttribute.get(i));
}catch(NamingException ne){
// ignore for now
System.err.println("Problem encountered....0000:" + ne);
//get all the groups list
} catch (NamingException e) {
System.err.println("Problem encountered 1111:" + e);
=================
The following exception gets thrown at every user entry:
User: CN=Administrator
am here....1
Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
]; remaining name 'CN=Administrator'
I think it gets thrown at this line in the code:
Attributes attrs = ctx.getAttributes(userName, attributeNames);
Any idea how to overcome this and where am I wrong?
Thanks in advance,
Regards.In this sentence:
Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
userName + ",CN=Users,DC=filenetp8,DC=com"
But I still have some problem with it.
Hope it will be useful for you. -
How do I get list of 'ALL' Missing files?
How do I get a list of all missing files? I occasionally get a message that a certain file can't be found. I know where they all are - on another drive.
I don't want to just try to add all of the files onto the prime loactaion because It's likely that I will get a huge file of duplicate. From past experience the duplicate feature in this programs is very poor. I should mention that all files are from on own CD's & are without DRM.
If I get the complete list I can easily just copy missing files to main drive.
Thanks in advanceYou can right click a folder and choose Synchronise - it has a Show Missing Files buttom.
John
Maybe you are looking for
-
Question regarding NULL and forms
Hi all, i have a survey that im working on that will be sent via email. I'm having an issue though. if i have a multiple choice question, and the user only selects one of the choices, all the unselected choices return as NULL. is there a way i can fi
-
How to generate statspack report
Hi, We have to generate a statspack report. We are accessing the oracle server which is in a remote machine. The platform is windows. But we are not able to generate a report. We have to know whether we have to specify the path of that machine along
-
Fluid Grid Layout with Sidebar
I am fairly new to dreamweaver and trying to build a fluid grid layout with a sidebar which needs to span the full height of the website and I am having trouble. I cant get the sidebar to span multiple columns using the fluid grids. I know I can do i
-
Sending non-English parameters vlaues to rwservlet for a pdf reports
Hi friends, I have developed a report which I open through calling rwservlet from an HTML form posting all form inputs to the rwservlet to use as parameters to my report. The problem arises when I try to pass non-English (Arabic) values, the report c
-
Image Events save as PICT broken?
An old script that worked in Lion is not working in Mountain Lion. Here is a test example: tell application "Image Events" launch set theImage to open "/tmp/c13.jpg" save theImage as PICT in file "/tmp/image.pict" close theIma