Current portal User ?

Hi all,
Can somemone tell me how to get the current portal request in the Repository Manager. Because I need to have the current portal User and for that I need the request object in the RM.
Plz. guide.
It's urgent.
Thanx in advance.

Hi,
I think the solution could be:
IPortalComponentRequest request =(IPortalComponentRequest) this.getProxy().getDynamicPage().getPageContext().getRequest
     IUserContext user = (IUserContext) request.getUser();
It works for me on the render() method of my layout controller.
I found the answer in this <a href="https://www.sdn.sap.com/irj/sdn/thread?messageID=549647#549647">thread</a>
regards
Anders

Similar Messages

  • Get current portal user password?

    Is it possible to get the current portal user's password? If so, I need the pl/sql api to accomplish this.

    Hi there,
    I was looking for the same thing but as I understood it is saved in a HASH format and their is NO way to decrypt it.
    The thing I do now is storing the password in a selfmade table besides the SSO tables for administrative use.
    Greets
    cumQuat
    Dave Ruzius

  • I need a table/view so I can list current portal users

    Is there a table/view that I can use within portal that holds the names of all the portal users ?

    That link looks interesting - couldn't get the code in Appendix A to work for some reason. I assume it should be run in the ORASSO schema?
    Anyway, I need to get a list of Portal users and their group memberships from PL/SQL.
    What is the best way to approach this?
    Cheers,
    John

  • Current Portal User in a Portal service

    Hi,
    I have created a Portal service which is exposed as a web service, serving to fetch current logged-in user in Portal.
    This web service has been called from a BSP program that which is exposed on Portal as an iView.
    The requirement is, when the user runs this BSP program from Portal, the program should call the Web Service and get the user who is currently using the page. This works fine except the Portal service always returns un:Guest user. I used below menthod to get the current logged in user:
    public String getLoggedinUser()
                IUser sapUser = UMFactory.getAuthenticator().getLoggedInUser();
                String uID = sapUser.getUniqueID();
                String[] users = uID.split("\\.");
                return users[users.length - 1];
    I checked for existing solutions in the forum but they work for a Portal component. How can I achieve the desired result using a Portal Service or otherwise ? Please help.
    Thanks,
    Aditya.

    Hi Aditya,
    Try below code -
    String _pmfKey = null;
    IPortalComponentRequest componentRequest =(IPortalComponentRequest) getRequest();
    IUserFactory userFactory = UMFactory.getUserFactory();
    IUser myUser =userFactory.getUser(componentRequest.getUser().getUniqueID());
    _pmfKey = myUser.getName();
    Regards,
    Sen

  • Can I get the current portal user in the VC?

    Hello all,
       I create a iView to change the SQL server data record by VC.Now I want to write the  user information of the portal into the SQL server database when someone use the iView to change the SQL server data record.How can I do?
    Thanks!

    Hi Lin,
    This is a very good question. However, in VC we can use function modules or any query to connect to various back-ends. There is no funda of using global variables in VC, by which you can store the data of logged in users. If you have any function module or query to fetch the data of logged in user, you can use that in VC, but i doubt, it is not feasible.

  • Fetching Currently Logged in Portal User & Fetch Users logged on whole day

    Hi All,
    I want to fetch the Currently online Portal Users and their name.
    Also we want to fetch all users from different servers as we have load balancing.
    Also i want to fetch which users have logged on a particular day, so that i can come to know that at end of day which users have logged on.
    Thanks & Regards,
    Dhruv Shah

    Hi,
    you can connect to the above mentioned tables by creating a alias or else using the default alias
    for this you have to login into the visual admin
    server ---> services -
    > jdbc connector
    there you can find the table with the alias.
    The default aliases what i know are SAP/BC_JMS,SAP/BC_UME,SAP/BC_WDRR.
    I think this will be usefull
    or else craete a new alias using Add alias button.
    The code for getting connection is
          InitialContext ctx = new InitialContext();
          DataSource ds = (DataSource)ctx.lookup("jdbc/SAP/BC_JMS");
         Connection con = ds.getConnection();
    //you can write ur select statement and continue
    But i have a doubt can you tell me what information does these tables contain.
    Thanks & Regards,
    Lokesh
    Edited by: lokesh kamana on Aug 26, 2008 8:57 AM

  • Connect the current portal session to another user

    We have to do application management for portal users. Often it's necessary to have the same view as the customer. So administrators need a portlet for specifying the user credentials and connecting the current portal session to this user. It's not possible to ask every user for his password.Has anybody created such a portlet?Is it possible to do this? Can I use the EDK or do I need the plumtreeserver - DLL? Which class do I need? Thanks for any help

    Thank you - It works! Now I have an IPTSession-Object for the given user. But how can I set this to the current portal instance? I get only new sessions but I didn't find any way to change the current session.

  • 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.

  • 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

  • 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

  • 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

  • Can I use SAP HR to drive ESS Portal user creation?

    Hello
    We are implementing a new instance of SAP HR and Portal for ESS and MSS and I am not sure of all the steps that need to be completed so any guidance / tips would be greatly appreciated.
    Company currently has an LDAP - but not used extensively. Not all employees currently in LDAP as not all have network ids. All employees will have a SAP account to enable ESS (via Kiosks etc).  ESS iViews in Portal will call SAP HR and possibly SAP BW.  We have an instance of SAP already and user admin maintained via CUA - this will continue.
    Scenario:
    My initial thoughts are that we try to use SAP HR as the leading system to drive the ESS Portal users and access.  Basically I want to create the user in SAP and assign them an ESS SAP role... then through syncronization have the user created in the Portal and have the correct ESS Portal assigned (in the Portal)
    My thinking so far is to go the following way;
    1) Create User Master Record in SAP (SU01)
    2) Hire employee into the org structure (via HR processes)
    3) Populate Infotype 0105 with SAP username
    4) Populate Infortype 1016 - with SAP role to be assigned to allow ESS access (not sure about this aspect) or role could be assigned in 1) above
    I am not sure of the next steps - I think there must be a way in an SAP table to map the ESS SAP role to the ESS Portal Role (is this via WP3R?)
    then I am hoping that a standard job can be run (is this RSLDAPSYNC_USER) that will create the user in the Portal (UME?) and assign the correct Portal role ?
    (obviously configuration needed)
    For MSS and HR Power users - we would continue to assign SAP roles via SU01.
    Can anyone assist with;
    - Is my thinking correct in terms of how this should / could work?
    - in SAP how can I map SAP Roles to Portal Roles ?
    - will syncronization in SAP create the user in Portal and assign the role ? what do I need to configure?
    Thanks in advance

    Dear Michale,
    I just dont know if this can throw some light on your prob.'
    In our Orgn we had around 250 ess users and 200 sapr/3 users. Some of the r/3 users also logon to ess via their r/3 uname and password.
    What we have done is like follows:
    1. Created a role for only the ess users ZHRESS. For this i asked the HR functional people with sap_all profile to do all the job which the ESS users are supposed to do and tracer the authorization via tcode st01. We created the role on the basis of this trace report.
    2. For the purely ESS users we created the users via tcode HRUSER and assigned then with the above role.
    3. For the R/3 users who are supposed to avail the ess facility we assigned them with the role ZHRESS role in addition to the other roles assigned to them to carry out their normal R/3 transactions. Then we mapped their R/3 uname to their employee no via PA30 infotype 105.
    4. Tcode HRUSER saved time  which would have consumed had we done it via su01 and moreover it picked Name etc data from the HR master table. In HRUSER tcode , setting the user attributes helps to define what roles the users are to be assigned, what should be their initial password etc.
    Pl let me know if it satisfies you querry.
    Regards

  • How to determine portal user in a BSP

    Hi,
    is it possible to determine the current logged in portal user in a BSP iView? If it's possible, how?
    regards

    it is possible.
    1. if spalogon ticket based SSO, then with BSP application, sy-uname will hold the user id.
    2. if the sso is based on user mapping (different logged on user in EP and different user id for logging on to ABAP system)
    check this link where i have explained on how to do this
    Re: EP user credentials as attributes of BSP
    in the bsp application iview application parameter
    pass
    you need to use
    epuser=<User.UserID>
    you can also use
    epuser=<User.LogonUid>
    then in the corresponding bsp page have page attirbute with auto check with the name epuser. now epuser will  hold the ep logged on user
    Regards
    Raja

  • How to track current online users in OID?

    Hello,
    Is there any way to track the number of current online users in OID?(or 10Gas) therefore, I could find out who is online and how many people are online. Does OID provide the feature? Or, I have to write a Java class to record it when a user logon? what if the user doesn't logout and the seesion is timeout?
    Thanks for your help

    PL/SQL code to get number connected users since the beginning of the day :
    DECLARE
    cpt_user integer := 1;
    BEGIN
    select count(distinct(user_name)) into cpt_user from PORTAL.WWCTX_SSO_SESSION$
    WHERE (USER_NAME <> 'PUBLIC')
    AND to_char(PORTAL.WWCTX_SSO_SESSION$.LOGIN_TIME,'dd/mm/yyyy') = to_char(sysdate,'dd/mm/yyyy')
    AND IP_ADDRESS IS NOT NULL;
    htp.p(' <font color="#006699" size="1" style="font-family:Arial, Helvetica, sans-serif" > ' ||cpt_user|| ' connections</font> ') ;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    htp.print('No connection !');
    END;

  • E-mail to all of our portal-users

    Hello,
    I'd like to send an e-mail to all of our portal-users to keep them informed
    about our new products.
    I currently do so by using the news-iview "send-to" feature, but every time
    I try to send an email, I get the following error message: resource can't be
    used.
    Should I make any changes in my settings?
    Are there any other possibilities to send an e-mail through the portal to
    all users at once?
    I'd really appreciate your help.
    Regards,
    Mike.

    Hello Mike, Hello Francesco,
    have you set a SMTP Server at: System Administration -> System Configuration -> UM Configuration -> Notification E-Mails ?
    Regards
    Gregor

Maybe you are looking for

  • Error while deploying NWDS application

    While deploying the NWDS projects, I am recieving an error message: com.sap.mw.jco.JCO$Exception: (103) RFC_ERROR_LOGON_FAILURE: Password logon no longer possible - too many failed attempts The same problem is occuring with various projects, which ea

  • Mouse Freezes in After Effects

    So sometimes when I'm editing in After Effects, everything will be fine for a little while. Then, randomly, my mouse will stop moving. I've no idea why. I don't think it's my computer because everything else is fine. I know it's not my computer that

  • Problems with event handling in JmenuItem

    Hello: I'm trying to handle an event for a menuItem and tool bar item: with this code: newBallotAction = new AbstractAction("newBallot") public void actionPerformed(ActionEvent e) try{ System.out.println("MainWindow newBallotAction"); Ballot ballot =

  • HD Rental in the UK - any with 5.1?

    Hi all, I've finally hooked up my Apple TV to my HD projector and AV receiver and I'm keen to try an HD film from the iTunes store. However I want to make sure I get a full Dolby 5.1 soundtrack and I can't find any film that's labelled as 5.1 or Dolb

  • Firefox won't use latest version of flash.

    I've downloaded and installed the latest version of flash. The problem is that Firefox refuses to use it, and instead decides to tell me to upgrade every time I go to a site that uses flash. It uses an outdated version...