Loggen in Portal Users

Hi,
I want to list all the users who have logged into the portal using a webdynpro for Java application.
Please guide me with this.
I will deploy the Java application on the Portal and when it runs it needs to pick out all the users with active sessions in this Enterprise Portal and display it.
should be like SM04 in R/3 system.
Points coming your way.
Regards,
Abhishek

Hi Abhi,
1.You have to call com.sap.security.api.sda (Select the DC and right click --select component development --show in --component property --go to dependency -- add and find this dc )
2.Code for get all logged in user ensure that you have this package imported in your import statements:
com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
This is the code:
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
IWDClientUser currentUsers[] = WDClientUser.getClientUsers();
//Displaying the count of logged on users
wdComponentAPI.getMessageManager().reportSuccess("Number of logged on Users in the portal"+currentUsers.length);
for(int i = 0; i < currentUsers.length; i++)
if(currentUsers.getSAPUser() != null)
//Displaying the logged on users;
wdComponentAPI.getMessageManager().reportSuccess("User - "+currentUsers.getSAPUser().getUniqueName());
I hope this helps!!
Thanks and Regards
Pravesh

Similar Messages

  • Broadcast message to loggen in portal users

    Hi,
    I'm trying to send system messages to all logged in users in the portal.
    I tried to do this by using the following blog:
    Brodcast messages to logged on users in Portal(Part1)
    Unfortunately I always get an error from the display component. Which says:
    Error in service call of Portal Component...
    com.sapportals.portal.prt.service.ServiceException: Service not found: alertreceiver
    This alertreceiver is a class in my project an the display component should find it.
    Did anybody implement such a system messaging and can help me in this case?
    Greetings

    Hi Alex,
    A resolved post about setup brioadcasting message in Portal.
    broadcast messages to logged on users in portal
    Webblogs:
    Brodcast messages to logged on users in Portal(Part1)
    Brodcast messages to logged on users in Portal(Part2)
    You should be able to get your request done with the above. Hope that helps.
    Ray

  • How to find out portal user from sso cookie ?

    Hi,
    I want to find out the portal user id from Portal30_sso cookie. It is required for security in my java servlet.
    Thanks
    Vikas

    First of all, you can't get anything from the portal30_sso cookie or the portal30 cookie or the SSO_ID cookie. These are cookies established for (1) The login server session; (2) The Portal session; (3) The login server single sign-on cookie - visible only to the login server.
    When you want to know who the current user is, you need to establish the context. If your servlet is standalone and not a partner application to the login server and it's not a portlet, etc., then what context does it have? What concept of users does it have? If you are really asking what Portal is currently logged on, that is still a loaded question. The user's browser could be accessing several portal's at the same time, each with a different identity. What I am getting at is that your servlet needs to somehow be associated with a particular portal before it can even think of asking this question.
    The ways to associate your servlet with a portal would be
    [list=1]
    [*]Make it a partner application
    [*]Make it a portlet
    [*]Make it an external application
    [list]
    Hope that helps.

  • Unable to get Portal User in a Remote DB

    Hello,
    We are developing an application with Portal on Instance A and the application tables on Instance B. We have DB triggers on the application tables in B and would like to capture the Portal USER using wwctx_api.get_user. Have created a DB link and PUBLIC SYNONYM in B to access the package in A. However, when we call the function in B, we get the following error -
    ORA-00164: autonomous transaction disallowed within distributed transaction.
    Has anyone tried something similar?
    Thanks.

    Hi,
    If you submit your form to a procedure in the portal instance you can get the portal user inside of this procedure.
    you can then send this value to the table in the other instance.
    Regards
    Michael

  • How to get Portal User Context  in Web Dynpro application

    I have successfully integrate a web dynpro app into SAP Netweaver Portal.
    Within my web dynpro app, how can I get portal user context information such as first name, last name, job title or some newly created ume attibutes.
    Is there any programmatical approach to get portal user context in my web dynpro. I not sure whether I can use the following codes in web dynpro?
    IUserContext userContext = request.getUser();
    String firstName = userContext.getFirstName();
    String lastName = userContext.getLastName();
    If yes, can someone point me the name of the jar file I have to import.
    Note : The SAP Netweaver installation that runs my web dynpro app is same with the SAP Portal.

    Hi ,
    you can use the below code to get User details and  add com.sap.security_2.0.0 > lib > com.sap.security.api.jar
    try
              IWDClientUser clientUser = WDClientUser.getCurrentUser();
    String firstName = clientUser.getFirstName();
    String lastname = clientUser.getLastName();
    catch (WDUMException e) {
                wdComponentAPI.getMessageManager().reportException("Error Retrieving User"+e.toString(),true);
    Regards,
    Sunitha Hari

  • How to get Portal user from a standalone Java application

    Hi,
    I have a standalone Java application from where I need to fetch the Portal User Information like userid and email id.
    I am using the below line of code
    iUser = UMFactory.getUserFactory().getUserByLogonID("e017939");
    I have included the jar file com.sap.security.api , But it was giving me the below exception
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:55)
         at com.am.wcas.java.mailscheduler.kmaccess.FetchDataFromKM.getiUser(FetchDataFromKM.java:29)
         at com.am.ScheduleEmails.main(ScheduleEmails.java:89)
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Then I went throught he SDN threads and they asked me to include the
    logging.jar and com.sap.security.perm.api .
    I Included them, then also, it is giving me Exception
    java.lang.NoClassDefFoundError: com/sap/engine/lib/logging/LoggingHelper
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:56)
         at com.am.FetchKMData.main(FetchKMData.java:30)
    Exception in thread "main"
    and I am getting a pop Up message from the Java Virtual Machine Launcher, saying a Fatal Exception has occured and the Program will exit.
    Kindly let me know if it is possible to access the User info using UMFactory in a standalone Java application. If yes kindly let me know where i am going wrong.
    Regards,
    Shilpa B.V

    Hi Shilpa,
    1. Check that you have added com.sap.security.api within the Your Project>Libraries folder (under navigation tab) and also added jars in the build path of the Your Project under project>properties>Build Path.
    2. In case you have a DC instead of Web Dynpro Project then you have to add the com.sap.security.api under Your DC>Used DCs and have compile time and runtime dependency added.
    Here java.lang.NoClassDefFoundError is caused basically due to only build time dependency added and reference to the jar missing at runtime. Rest the code to retrieve the current user id using UME API and getUserByLogOnID("....") method with/without portal environment would not be an issue at all.
    Regards,
    Tushar SInha

  • How to access a Portal User Info from a J2EE application?

    Hi,
    I have deployed a j2ee application in portal and its running fine.
    from that application i need to assign some roles to some users.i have the user id.
    so my doubt is can i access the portal user info from this j2ee application?i have some servlets in the j2ee application....can i get the portal user info from this servlet?
    plz help me
    regards,
    Visweswar

    Hi,
    Please check out this to get the portal user information from Java -
    WdClientUser class/Interface to aciehve this.
    Please check out these links on the same -
    WDClientUser.getClientUser IUser
    help needed
    Regards
    Lekha

  • Portal User details and credentials for a J2EE application?

    Hi,
    I am trying to access a J2EE application which is deployed in  SAP Web Application Server. I want to maintain the security of this application depending the portal user. So I want to get the user id of the portal login to my J2EE application. For Example:
    A user with id "super" is logging into portal I want the userid "super" in my J2EE application how to get the userid to my J2EE application's servlet. Is this possible? If possible please tell how I can acheive it?
    Can I do it by creating HTTP System? If possible can u tell me where can I set the URL?
    Thanks,
    Ashok.

    hi,
    Certainly you can get the user id of the portal login in your J2EE application by using UME api's
    IUserFactory userFact = UMFactory.getUserFactory();
    getUserFactory().getUser(String uniqueID)
    getUserFactory().getUserByLogonID(String logonID)
    Also have a look at this
    http://help.sap.com/saphelp_nw04/helpdata/en/15/abdc3ed98f7650e10000000a114084/frameset.htm
    Instead  of url iview, it would be better to use AppIntegrator
    Also have a look at this
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars/using the user management api with ep applications.pdf
    Hope it helps...
    Regards,
    Ganesh N
    Hope it helps...

  • Webdynpro - Check if a portal user has a user in R/3 Backend

    Hi Experts,
    i have following problem, and maybe some of you can help me out with an idea or (much better) a solution:
    Our Company is running an Enterprise Portal on NW2004s (SPS 18). Currently i am developing a Java WebDynpro Application for the portal called Transactionstarter. Withhin this application a portal user can simply add a backend System (R/3), a transaction and a Description. This information will be stored in a xml file in userhome in KM. When the user clicks the description, SAP WinGui will open with the transaction he defined before. We use SSO for opening the transaction if the user has a backend user. If not, the loginscreen of the backend will appear.
    All this works fine.
    Now we have the requirement for an automated system check.
    The portal user can run an initial system check. This system check should check all configured backend systems if the portal user has a user in R/3 backend.
    But how can i check if my portal user exists in backend?
    I cannot use JCO because we have a lot of Systems (more than 300 all together) and i don´t want to create a destination for every system. Or did i misunderstood something with JCO?
    Does anyone of you have a solution, how i can check every system, if the portal user has also a backend user?
    Thanks in advance.
    Regards
    Pascal

    Hi Pascal,
    with JCO you can use also the method JCO.createClient:
    public static JCO.Client createClient(java.lang.String client,
                                          java.lang.String user,
                                          java.lang.String passwd,
                                          java.lang.String lang,
                                          java.lang.String mshost,
                                          java.lang.String r3name,
                                          java.lang.String group)
    Creates an instance of a client connection to a remote SAP system (with load balancing)
    Parameters:
    client - SAP logon client
    user - SAP logon user
    passwd - SAP logon password
    lang - SAP logon language
    mshost - Host name of the message server
    r3name - Name of the SAP system
    group - Name of the group of application servers
    Returns:
    the newly created client
    for connections to other systems. So you can avoid to create destinations
    Regards
    Matteo
    Edited by: Matteo Fusi on Apr 1, 2009 11:33 AM

  • Many Portal users mapping one R/3 user and query their own data ?

    Hi everyone :
      I want to discuss a issue as follow with all :
      Precondition : The SSO had done between Portal and R/3.
      Issue : Many Portal user(vendor) mapping one R/3 user(pulic vendor user),when they logon Portal, they can query the report, but the data was for the vendor logon now !
      Any discuss is welcome!
      Best Regards,
      Jianguo Chen

    Hi everyone :
      I want to discuss a issue as follow with all :
      Precondition : The SSO had done between Portal and R/3.
      Issue : Many Portal user(vendor) mapping one R/3 user(pulic vendor user),when they logon Portal, they can query the report, but the data was for the vendor logon now !
      Any discuss is welcome!
      Best Regards,
      Jianguo Chen

  • Read Portal User ID in BW report to filter records

    Hi,
    I need to filter my records in BW report based on the
    business partner who logs into Portal.
    (BW report is getting called thur IView in Portal)
    Is there any way i can fetch the Portal User id
    during the execution of BW report? so then i can filter
    records by writing code in user exit.
    I tried using variable sy-uname, but it populates
    the BW user id and not portal user id.
    Please reply if anybody knows solution to this query.
    Thnx in advance.

    Abhijit ,
    My understanding:
    You need to filter the query by the Business Partner ID and not by User name and Business Partner number and BW User ID are both different.
    If you want to filter by User name:
    Why don't you try using SSO through EP and that way you would get the ID of the person logged in.
    If you are using user mapping:
    Or what you could do is maintain the mapping in an info object/table in BW and query against the same.
    If you are using Business Partner:
    Populate the business partner master which will have the user name attached and that way you would be able to get the Business partner ID.
    Arun

  • How to get password of a logged in portal user in webdynpro.

    hi,
    i want to get the password of the logged in portal user through webdynpro. i already know how to get the user id and other information through webdynpro (using WDClientUser), but i want to get the password as well.
    this is an urgent requirement. Immediate help will be highly appreciated and points will be awarded for helpful answer.
    thanks in advance.

    Hi
    User Management APIs don't give the liberity to obtain the password, instead you can verify a password. Please check if your requrirement can be modified to check for password.
    Please use code mentioned below and the one suggested before.
    loggedInUser = WDClientUser.getCurrentUser();
    user = loggedInUser.getSAPUser();
    if (user != null)
    IUserAccount[] acct = user.getUserAccounts();
    if(acct[0] != null)
    b = acct[0].checkPassword(password);
    Thanks
    Srikant

  • Portal user ID  read in abap webdynpro.

    Hi All,
    We have developed on web dynpro application for Dealer Portal. The Dealer logs into the portal with his ID. How can we capture this Portal User ID of the Dealer in our application.
    The Portal User ID and the R/3 User ID are different.
    I have followed the given steps...
    Step 1
    Within the Main Window of your ABAP Web Dynpro application, select Inbound Plugs tab. Now double click on the Startup Plug Named 'DEFAULT' (or what ever you have called it if you have changed this since window was created).
    Step 2
    Within the plug method HANDLEDEFAULT Add a new importing parameter below 'WDEVENT' parameter call it IV_USER of Type UNAME.
    Step 3
    Now within the code section of the plug method HANDLEDEFAULT you can freely assign the value of IV_User to an attribute of your component controller. i.e. wd_comp_controller->userid = IV_USER. Alternatively you could assign it to a wdp context node / attribute.
    Please note this value will not be available with the WDDOINIT of your main view as WDDOINIT method of this view is called before the window HANDLEDEFAULT method. Put your code into the method WDDOMODIFYVIEW of your main view instead.
    Step 4
    Double click on the webdynpro Application, within the Parameters tab add a new parameter. You should just be able to use the F4 help on the param column and select the IV_USER entry.
    Step 5
    Save your application nad activate your web dynpro
    With the 'Content Administration' tab of your portal
    Step 1
    Create an iview of type ABAP Web dynpro specifying the application name as that of your created wdp (must be exactly the same).
    Key information for creating iView:
    Create as iView template (select template as SAP Web Dynpro iView)
    namespace = sap (check service name in SICF if this is not correct)
    Application Name = ZWDA_EXAMPLE(name of your wdp created in se80)
    Application Parameters = IV_USER=
    Step 2
    Save and setup any other details required when creating any other iView
    but not able toget user id .
    Rakesh

    Hi,
    Why don't you use the sy-uname to get the login details of user.
    Portal users are mapped to R/3 system, so using sy-uname will definitely give the user details.
    Function module to get employee details by passsing user name
      CALL FUNCTION 'HR_GET_EMPLOYEES_FROM_USER'
        EXPORTING
          user               =  sy-uname
          iv_with_authority = space
        TABLES
          ee_tab            = lt_ee_tab.
      IF lt_ee_tab[] IS NOT INITIAL.
    Passing employee number to export parameter
        READ TABLE lt_ee_tab INTO ls_ee_tab WITH KEY user = sy-uname.
        IF sy-subrc = 0.
          ev_pernr = ls_ee_tab-pernr.
        ELSE.
          ev_failed = gc_failed.
        ENDIF.
      ELSE.
        ev_failed = gc_failed.
      ENDIF.
    Does this help?
    Thanks,
    Rahul

  • How to Restrict same portal user from other node

    Hi
    In my application, we charge customers for each portal user logins. But, i found that, they can share same user logins amongs number of people.
    I don't want to allow the same portal user login into the application if that user is already logged in and it's session is still active.
    Here is the Scenario :
    User A is logged in to the portal from terminal AA. Now, User A agin tries to logg in to the portal from terminal BB. I don't wnat to allow user A to log in from terminal BB bcuz user A has active session from terminal AA.
    Can anyone know how to implement this??
    thanks in advance.
    Srini

    Hi Srini!
    We have solved this problem with our own login portlet. Before the final login we've got to check (from the certain table) how many logins there are currently with that username.
    But there is a problem. If the user closes the browser without logoff, the session remains active. There is a cleanup job, which removes those session in some hours. Still it is not very elegant.
    Regards,
    Jari

  • Are licenses needed for Portal Users?

    Hi, do you need seperate user licenses for users created on the Portals Database (J2EE only) using the MSS and ESS components? We have an HR ECC5.0 system with 700 users, but only about 100 Managers will login to the Portal to do reports via the MSS component. I thought of creating these 100 managers on the Portal (Database Only), and then using Single Sign-On with SAP Logon Tickets connect them to the HR ABAP system where they also have the same user accounts, thus enabling them to do their work seemlessly. I don't want to use the ABAP User Persistence model, as I don't want the Portal UME to pull in all 700 users from the HR ABAP system when we only maintain 100 managers on the Portal for the MSS component. Will user licensing be an issues?

    There is no need to license your Portal users.  The ABAP license is all that is required.  I would check with SAP just to make sure that your license agreement doesn't contradict this but I highly doubt that it will.

Maybe you are looking for

  • Blank out when 39

    I just got my Macbook Pro 3 months ago. A week ago it started blanking whenever the battery percentage is 39%. I can't on it unless i plug in the charger. Help! I need it for my classes and i can't have it blanking out in the middle of a class. I've

  • A Problem with Rolling forecast

    Hi Experts, Currently i have a problem in the Query Designer. Any help or suggestion will be very much appreciated. The system that we have is BI 7. What we want to have is a rolling forecast for the Profit and Loss Account. It means that we will loc

  • External Web Access Management - Juniper

    Hello Experts, We are planning to implement external authentication mechanism, when a user logs on from Internet, he comes through an external system (juniper), that authenticates the user through LDAP. This user credentials should be matched against

  • OES2SP1 + AFP + -1659 error

    I'm having trouble getting Macs (with OSX 10.6) to connect to our OES2SP1 Linux server (with all the current patches installed). The Macs can connect to our NWSP8 servers without any problems. We have Universal Passwords configured & I have installed

  • Update distinguishedName field in Active Directory?

    HI all, We are trying to create the Active Directory users from SAP .  But we are not able to manipulate the Distingushed Name attribute to create the users inside the right OU. We tried to pass the value of OU name to the attribute 'o' which is not