How do I get Portal Login User Details in WD Application

Hi,
Could you please help me out as how to get the user who has logged into the portal.
Regards,
Abilash.

Hi,
In you webdynpro location you can use the following code to get the logged in user details.
String strUserName = null;
try {
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser sapUser = wdClientUser.getSAPUser();
if (sapUser != null) {
IUserAccount[] acct = sapUser.getUserAccounts();
if (acct[0] != null) {
strUserName = acct[0].getDisplayName();
} catch (WDUMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
The following import statements have to be used
import com.sap.security.api.IUser;
import com.sap.security.api.IUserAccount;
import com.sap.security.api.UMException;
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDUMException;
Award points if helpful.
Regards,
Sujana

Similar Messages

  • How can I get all Login/Logout details

    How can I get all Login/Logout details of all SAP Users from SAP Server/Database of any one year? I am asking about SAP License User. Is their any Table or Report by which I can get these details? For example USR02(Logon Data) Table store the last login/logout details of SAP Users. So in same way is any table which store Users Login/Logout details through out a year or month.

    Hi Sudheer,
    Check this .
    You can find the transactions by a particular user from the transaction SM04.
    SM04 gives you the details of the users logged in,terminals,transactions the user is working on, the time he has logged in,no of sessions user has opened, and the memory used by the user's programs... all of that w.r.t to the client we login. but we can't get info like date and number of times the user has logged in.
    U can see tables:
    USR01 User master record (runtime data)
    USR02 Logon data
    USR03 User address data
    USR05 User Master Parameter ID
    USR12 User master authorization values
    plz rewards points if helpful
    cheers
    srinivas.k
    Edited by: k srinivas on Apr 28, 2008 11:54 AM

  • How to access Sap portal login user in ejb web service

    Hi,
    I wnt to access SAP Portal login user in my ejb application which resides on the same server.
    I am using following code
    try {
         IUser user =null;                         IWDClientUser wdUser = WDClientUser.getCurrentUser();
                                  user = wdUser.getSAPUser();
                             } catch (WDUMException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
    Some additional jar files are required for this?
    The same code works fine with webDynpro but not with ejb.
    Thanks in advance     
    Best regards,
    Nilesh

    Thanks for reply.
    I have already added com.sap.security.api in my EJB module project classpath. How to add the same in EJB application Project (application-j2ee-engine.xml)?
    Best regards,
    Nilesh

  • How to get Portal Login user ID and Groups using UME API in JSPDynpages

    Hi Experts,
    How can I get the portal logged user ID and bsed on that ID need to get his assigend groups.
    For this Initially I need to get the logged user ID using UME API.
    Can you drop the code to write and display using JSP Dynpages?
    Thanks
    Venkat.

    Hi,
    Try the below code
    IUserFactory userfact=UMFactory.getUserFactory();
    IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
    String usrid=user.getUniqueName();
    And also you can get the groups assigned to user by using the below code
    Iterator groups = user.getParentGroups(true);
    while (groups.hasNext()) {
         String groupstr = (String) groups.next();
         IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
         response.write("Group name "g.getUniqueName()"<br>");
    Regards
    Suresh

  • How to get Portal Login User and Its Related BP in CRM?

    Hi,
    An ABAP Webdynpro program is called in CRM from Portal user by a portal link. How to get the user ID and its related BP in CRM? Thanks!
    The portal is integrated with ECC, and all users and BPs are maintained in ECC then replicated to CRM.
    Best regards,
    Hao

    Hi,
    Try the below code
    IUserFactory userfact=UMFactory.getUserFactory();
    IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
    String usrid=user.getUniqueName();
    And also you can get the groups assigned to user by using the below code
    Iterator groups = user.getParentGroups(true);
    while (groups.hasNext()) {
         String groupstr = (String) groups.next();
         IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
         response.write("Group name "g.getUniqueName()"<br>");
    Regards
    Suresh

  • How can I get the current user an  resource context  in a portal JSPDynPag

    How can I get the current user (com.sapportals.portal.security.usermanagement.IUser?)an the resource context  in a portal component (JSPDynPage)?
    Thanks.

    Hi Jon,
    Here is the code to get the current user and resource context in your JSPDynPage:
    IPortalComponentRequest  currentRequest  = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);
    com.sapportals.portal.security.usermanagement.IUser contextUser = (com.sapportals.portal.security.usermanagement.IUser) currentRequest.getUser().getUser();
    ResourceContext resourceContext = new ResourceContext(contextUser);
    Greetings,
    Praveen Gudapati
    p.s. points are always welcome for helpful answers

  • Urgent : Get OS login user in the report

    FACTS
    D.B 9i
    AS 10g
    Report 10g
    PROBLEM
    I implement a report where it generate a PDF output contain private employee Details and send it to his email
    But I want to run this report in our internal web site,
    Where user login by his ID to the network and then open the internal web site, where he can ask for his details by click a link that will open/call the report Directly
    (without using a form to call that report ).
    When report is called the connection to DB is done by a guest user which have a required roles to get the employee details.
    NOW:
    my report should get the login user to network ( Windows OS user ).
    And base on it Query for his details and send it to his email.
    Note that : Login user to network = his ID in D.B = email ID
    And since the report is run in the AS (mid tire) then I can't get OS user login.
    Is there a way that in the report it self I can get the OS login ID of the client. ???
    Note:
    I don't want to user Developer forms.
    Where I can use the webutil to get user login ID of the Client and pass it to the report and run the Report.
    My requirement is to run the report direct ( URL ).
    Therefore :
    Is there a way that in the report it self I can get the OS login ID of the client. ???
    Or any idea can help in my issue/ case
    Plz help.

    i use it but since my report run in the AS (mid tire) then
    it will return the user of AS not the Client OS user.

  • HT4436 For the past two weeks, every time I start up my computer I'm asked for an iCloud login. I've never used iCloud and I'm not likely to. How do I get this login to stop automatically showing up?

    For the past two weeks, every time I start up my computer I'm asked for an iCloud login. I've never used iCloud and I'm not likely to. How do I get this login to stop automatically showing up? I'm using an iMac G5 with OS 10.9.4.

    One more quick thing first. Hold the SHIFT key this time as you startup and see if that gets you any further (this is called 'Safe Mode' by the way). I'm not too confident that this will work in your case but it's worth a try. If it boots up, go into Disk Utility and repair permissions.
    If it doesn't, you're going to have to do an Archive & Install which will install a fresh copy of the OS over the top BUT keep all your users, files and apps in place.

  • Login user details

    I need to create login user detail report. user login and log out details.
    if any one know the answer please let me know.

    Nathan,
    If auditing is enabled (check Sign-On:Audit Level profile option), then you should be to get all login information from FND_LOGINS and FND_USER tables.
    For publishing the report, I would suggest you review the following document.
    Note: 361765.1 - Creating a DBI Report Based from an Existing View or Table Cookbook
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=361765.1
    Regards,
    Hussein

  • How can i get all the users from weblogic server?

    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

    BTW, i use weblogic platform 8.1
    "Daniel" <[email protected]> дÈëÓʼþ
    news:[email protected]..
    how can i get all the users from weblogic server?
    i have configurated a LDAP server using iPlanet and
    in weblogic server console i see those users from LDAP
    server. but how can i get all the users in my program
    from weblogic server instead of LDAP server?
    BTW,how to configure a RDBMSAuthenticator and what should i do
    in Oracle? which tables should i create? and how are their architectures?
    Thanks
    Daniel

  • How can i get input from user in Workflows

    Hello professionals,
    I'm new to SAP B1 Workflow, i have created some workflows and they all worked fine.
    But, I am wondering, How can i get input from user?. For example, i want to display list of options to choose between them and route the workflow based on the selected option. I don't want to use the exclusive gateway and check for some conditions, i want to get input from user.
    How can i do that?
    Thanks in advance,
    Kareem Naguib

    Hi,
    Please refer SAP help file:
    http://help.sap.com/saphelp_sbo900/helpdata/en/b8/1f9a1197214254b79bcf8f93f9fff9/content.htm?frameset=/en/44/c4c1cd7ca22…
    Thanks & Regards,
    Nagarajan

  • HT1692 how can i get the previous contact details in iphone

    how can i get the previous contact details in iphone

    You don't want to maintain a reference to the last selected node, but to the last selected path. Nodes within a tree are addressed using a TreePath, with contains references to each node from the root, down to a specific node. Look at the JavaDocs of javax.swing.tree.TreePath for more info.
    Also, JTree has getter/setter methods for the selectionPath.

  • How can I get a full user's manual for my WX350 camera?

    How can I get a full user's manual for my WX350 camera?  I have downloaded all of the ones at http://esupport.sony.com/US/p/model-home.pl?mdl=DSCWX350&template_id=1&region_id=1&tab=manuals#/manualsTab   But all of them give a very limited amount of information.  There are many features that these manuals do not describe, and I need a "real" manual.

    Unfortunately, Sony has become a tad chintzy with the info over the past few years. The Instruction Manual and Help Guide are about all there is.

  • How can we get requester's user id using java code

    Hi,
    How can we get requester's user id using java code?
    eg: If i had logged in as xelsysadm and request a resource for user uid101 on the userid field it should display uid101 and not xelsysadm.
    also,
    I have a resoure "A" which on revoking should also revoke resources B and C. How can it be done. Resource A, B, and C are 3 different resource objects.
    ==Thanks,
    doki

    Ok, so there is a way, but it's not available during submission. You can use the findRequests api. From the result set, get the "Requests.Consolidated Data Value" value. In this information, you will get an xml formatted data. It provides the list of users on the request on the left side after submission. After the request is completed, this value is available. Upon completion, you could get the request information, get this value, and parse the information for user ids.
    In the same adapter, use the following API:
    formIntf.setObjectFormData(objInstanceKey, formHash)
    The formHash is a hashtable containing the field name on your object form, and the values you wish to populate it with. You could create a textarea box on your object form and populate the userids for who the request is for.
    However, this makes absolutely 0 sense. When you get a request, the list of userids are listed right there on the request.
    -Kevin

  • How can i get SMP login?

    We are SAP Customers ? But how do i get SMP Login ?
    Rgds
    PR

    Hi,
    ask your basis guys or click <a href="https://websmp205.sap-ag.de/~sapidp/002006825000101060662000E/">here</a>. You need to know your installation number!
    Peter
    Points always appreciated

Maybe you are looking for

  • Flash no longer works in Chrome

    I was playing apps on facebook on a Chrome browser last night, when at about midnight (cst) Flash crashed.  No problem, usually I just refresh & it's fine.  Not last night.  I uninstalled & reinstalled six times.  No luck.  Absolutely no Flash workin

  • Can't export Word docs to network drive

    I can't export Word documents to a network drive. I can save the document in .pages format, but if I try to export, the software goes through the motions, but the Word document is never created. If I "Save As" and check "Save Copy as Word Document,"

  • File Access with unsigned Applet through editing the java.policy file

    I'am starting to lose my hair on this... I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of th

  • Saving in sap database using kpro

    hie gurus, I'm configuring dms for the first time in ECC 6.0. I'm trying to store files in SAP DB using kpro however when I have created and checked  in originals  when i try to save the DIR i get an error that says error when trying to save with kpr

  • Safari Quits Repeatedly

    Safari keeps quitting with the following error report. Anyone have any ideas? Thanks! Process: Safari [139] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 3.2.1 (5525.27.1) Build Info: WebBrowser-55252701~1