Get portal user logon details from abap web dynpro

Hi all,
I am developing an abap web dynpro which will be added via an iview to our ees/mss portal. What i need to know is how do i get the current user logon details in my web dynpro! i.e. if a user is loged into the portal using personnel number 111111 i need to be able to capture this value so that i can retrieve hr data for this personel number! any information would be much appreciated!
Regards
Mart

Hi Mart,
You can pass "iv_user=<User.LogonUid>" as application parameter in iview.
add iv_user parameter in HANDLEDEFAULT method of default window of webdynpro component.
that's it.
when u run your webdynpro application, you can have value of portal logged on userid in iv_user.
hope this will help u a lot.
[Visit this thread|Re: WD4A: pass portal logged in userID to WebDynpro ABAP IView.]
-Haresh Khandal

Similar Messages

  • Parameters from abap web dynpro to visual composer

    Hello ,
    Can we pass output parameters from abap web dynpro to visual composer?
    <i><u>For Example:</u></i>
    ID NUMBER that we got in the application (Abap web...)
    and we want to pass it to import parameter of visual composer (start-point)
    I know about the mapping(in GP) but how we can see the output parameter of the abap web dynpro in GP-callable object(output parameters).
    When we use GP (callable object), we have input/output parameters.
    I need to map from abap web dynpro <b>(output)</b> to visual composer <b>(input)</b>
    Thank You,
    Boaz.

    Hi Boaz,
    Unfortunately it's one of the GP restrictions that it's not possible to transport parameter values from an ABAP web dynpro UI into the GP context. Vice versa is feasible, i.e. you can use an ABAP web dynpro UI and fill it with parameter values from GP context.
    Regards,
       Jan

  • Exiting from ABAP Web Dynpro application

    Hi,
    In ESS portal we have one tab Personal info, there I have created one link and integrated my ABAP web dynpro application.
    I want to exit from the application and go back to the Personal info sub area. created one exit button in my application on press of that i need take this action.
    Please guide me with this
    Thanks!
    Piyush

    Piyush,
    I am not sure whether it works or not just get the navigation url of personalinfo subarea and using portal APIs navigate to that url when you click on exit button
    Thanks
    Bala Duvvuri

  • Consuming Web Service from ABAP Web Dynpro

    I have written program to consume KM Web Service through ABAP as well as ABAP Dynpro in SAP R/3 by calling Consumer Proxy.
    When I run the program from SE38, it prompts me for user-id & password. If I pass KM Server user-id and password I am able to execute the web service successfully.
    However, while I execute the same code through Web Dyn-pro , it does not ask for user-id and password & terminates with CX_AI_SYSTEM_FAULT : SOAP:1,007 SRT: Unsupported xstream found: ("HTTP Code 401  : Unauthorized")
    I have created a Logical Port in R/3 & I am using this Logical Port while creating an Object of Consumer Proxy.
    Kindly let me know how to resolve this issue.

    The dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications.  There is no prompt produced when running in Web Dynpro.  If possible assign a generic user within the logical port definition and this will be used automatically by all users.

  • Can the role info be passed from portal to ABAP web dynpro application

    Hi,
    We have some roles in the portal. We call the ABAP web dynpro applications from the portal. Is it possible to pass on the role from the portal to the Web dynpro ABAP application so that we can use this role information in the application.
    Thanks,
    Pooja

    Hi,
    you can try to add the expression
      role=<IView.PCDUnit>
    as part of the Application Parameters in the iView. This will be the role in 99%. However not all iViews started in the Portal must belong to a role. You can start iViews using page navigation that are not part of a role. Therefore the PCD does not talk about roles but about "units" which is the superordinate term.
    the value will be the PCD path of the role - e.g:
      portal_content/myFolder/roles/myRole

  • User poll details from Quick Poll

    Hi All,
    We have a requirement to get the user poll details from KM Quick Poll. From quickpoll admin we can see the poll status and poll result but I want to get poll detals of user like who has voted and to which option he has voted.
    Can you suggest me how to get the user details from quickpoll?
    Regards
    Suresh Bachimanchi
    Edited by: Suresh Bachimanchi on Apr 27, 2009 6:13 AM

    Hi,
    Thanks for your quick response, yes you are correct but I dont want to show one user's information to others. As an administrator I want to track all the details of the user, I want to show all poll details to the administrator not to individual user.
    Regards
    Suresh Bachimanchi

  • Change properties of Roles in Abap web dynpro

    Hello Gurus,
    I need to hid or unhide a role based on a condition in my abap web dynpro.
    Can anyone please update me how I can access it from abap web dynpro.
    Is there an API call from abap to set or reset the invisible in navigation area value in portal?
    Regards,
    Dale

    End of days play, this is what I was able to achieve.
    Realised the masthead jsp is the best place to call my abap web dynpro as it is just after the login and at the load of default framework page.
    I was able to call my abap web dynpro and on success, I am calling the homepage role.
    What I have done in the jsp is written an if else statement:
    1) If it is the first call to the jsp call my abap web dynpro in navigation mode 3. This ensures the roles are not visible and the redirection works before the page loads.
    2) Else load the framework page as usual.
    The only issue I have at this point is, I cannot depend on the first visit of the user.
    I need to know in the jsp where the call to jsp is coming from, if it is coming from login page, i will direct the user to WDA else if the call is from my WDA, the normal load should work.
    It would be ideal if my abap web dynpro could write something in the http header which the jsp could read as success. Still close but dont have the solution working yet
    Regards,
    Dale

  • 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

  • Access Portal Parameter from within ABAP-Web Dynpro

    Hi all,
    I have an ABAP Web Dynpro which is executed via an Web Dynpro iView in Enterprise Portal.
    How can I read the UserID of the portal user within the web dynpro? (the portal user will not be the user who called the Web Dynpro)
    Any suggestions on this?
    Thanks in advance.
    Kind Regards,
    Martina
    ~~~~~~~~~~~~~~~~
    ABAP Web Dynpro developed within CRM 5.0 system
    Enterprise Portal 6.0

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • 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

  • Get portal users

    Hi,
    We are developing an abap program that need to get a list of sap portal users. With the configuration we
    have on our sap portal, the portal users aren't the same as R/3 users, therefore, portal users are independent of sap R/3 users.
    Another option would be to get portal users from sap portal. It is possible?
    Thank you very much.
    Marc

    Hi,
    I think it would be easier to create a portal web service (you have all the API and the data at hand) and use it as a data source for Visual Composer. See this link for more info:
    [Consuming Web Services Using Visual Composer|Consuming Web Services Using Visual Composer]
    Hope that helps,
    Romano

  • Not able to check-in file in Browser (Portal/ABAP web dynpro)

    Hi
    If I try to check-in file from Back-end or Easy DMS I am able to do that and file is in Locked status. But when I use Portal or ABAP web-dynpro it is saying Check-in completed and when I save document(DIR), it is changing it to Unlocked icon.
    Did anyone get this type of issue before?
    do we have to do any special configuration or use different Content server for Browser and GUI ?
    Thanks
    ND

    DMS Folks.....
    if you came across this type of error then let me know ...
    Am I missing any configuration ?
    For HTTP request (like portal/webdynpro) do we need HTTP content server or normal content server will work for same.

  • Abap web dynpro and portal events

    First off, a little introduction: My name is Martin Kroppen, I am an Abap developer for SAP Netherlands, and I am currently involved in a project for hospitals to built a portal. For this, I have created 2 Abap web-dynpros, and then impemented the views as iviews in an EP. What I want to achieve is that the input view triggers the display view on a second page, and the data is shown for the values in the input view (all in the same browser window).
    I am using the portal integration manager for this,  with the method for relative navigation.
    The navigation is working fine, only problem is that I don't know how to handle the business parameters that I send over.
    My questions are:
    1. is this the correct way for navigating between abap webdynpro iviews in the portal?
    2. what is the correct way to read the business parameters into my context of the second Abap WD application?
    I tried the solution that is described below, I could not get it to work correctly.
    If you define BUSINESS_PARAMETERS as application parameters in your Web
    Dynpro application and the parameter names start with &#8243;APP&#8243;, they will
    automatically be forwarded to the startup plugs of the Web Dynpro application –
    provided they are marked as startup parameters. In this case, keep in mind that
    the iView/page used as the navigation target must be assigned to the user role.
    If it is not, navigation cannot be triggered.
    Hope someone can help me…
    Regards
    Martin Kroppen

    Hi,
    please refer to this link for portal integration
    Web Dynpro for ABAP Portal Integration [original link is broken]

  • Launch ABAP Web Dynpro from UWL

    I have developed an ABAP Web Dynpro application. The application needs to be launched from the UWL. This is not working. I get the message 404 Not found The requested resource does not exist. I think the problem is with the WebDynproNamespace setting in the UWL config file but i am not sure. Anyone have any ideas? Full points to the working answer
    Application Properties (SE80):
    Description     DJ: Link AR Invoice to AP Invoice                                      
    Component       ZDJLINKINV                                                             
    Interface View  MAIN_WINDOW                                                            
    Plug Name       DEFAULT                                                                
    Help Menu Text                                                                         
    Help Link                                                                               
    Show Message Component on Demand                                                      
    Always Display Message Component                                                                               
    Package         ZSAPPHIRE_SUB_01                                                      
    Language        EN                                                                    
    URL             http://<removed for security reasons>/sap/bc/webdynpro/sap/zdjlinkinv
    Transaction SWFVISU:
    (task visualization)
    TS90100177 ABAP Web Dynpro
       (visualization parameters)
       APPLICATION  ZDJLINKINV
       DYNPARAM     WI_ID=$(item.externalid)
       NAMESPACE   SAP
    UWL Configuration:
    <ItemType name="uwl.task.webflow.TS90100177.FISystem" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="launchWebDynPro" executionMode="default">
          <ItemTypeCriteria systemId="FISystem" externalType="TS90100177" connector="WebFlowConnector"/>
          <Actions>
            <Action name="launchWebDynPro" groupAction="" handler="SAPWebDynproABAPLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="yes" launchNewWindowFeatures="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">
              <Properties>
                <Property name="WebDynproApplication" value="ZDJLINKINV"/>
                <Property name="newWindowFeatures" value="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no"/>
                <Property name="DynamicParameter" value="WI_ID=$(item.externalid)"/>
                <Property name="openInNewWindow" value="yes"/>
                <Property name="WebDynproNamespace" value="SAP"/>
                <Property name="display_order_priority" value="5"/>
              </Properties>
              <Descriptions default=""/>
            </Action>
          </Actions>
        </ItemType>

    Check out the below links:
    1) [UWL work item not launching |http://www.surfingincognito.com/index.php?q=aHR0cHM6Ly9mb3J1bXMuc2RuLnNhcC5jb20vdGhyZWFkLmpzcGE%2FdGhyZWFkSUQ9MTYxMzA2OA%3D%3D]
    2) [Calling Web Dynpro ABAP application as work item|Calling Web Dynpro ABAP application as work item through workflow.;
    3) [Integrating WebDynpro ABAP applications with UWL for workflow in Portal|http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal]
    Hope it helps you..

  • How to get the ep user information data in the web dynpro?

    Hi all
      I want to create a web dynpro application on EP.I want to get the ep user information data in the web dynpro.How can I do?Thanks.

    Lin,
    Two steps to achieve this:-
    <b>Step 1:</b> Add the following code in your view Controller:-
    IWDClientUser user = WDClientUser.getCurrentUser();
    IUser objUser = user.getSAPUser();
    wdContext.currentContextElement().setXXXX(objUser.getUniqueName());
    wdContext.currentContextElement().setYYYY(objUser.getFirstName());
    wdContext.currentContextElement().setZZZZ(objUser.getLastName());
    where XXXX, YYYY , ZZZZ are the context names.
    getUniqueName : Gives Login id of Portal user.
    getFirstName : Gives First Name of the Portal user.
    getLastname : Gives Last Name of the Portal user.
    <b>Step 2 : </b>Use "Organize imports" and make sure that you have the following two libraries added in the build path of your project. You can do these by right clicking on your project name ==> Properties ==> Java Build Path ==> Libraries ==> Add External jars.
    The external jars are :
    <b>com.sap.security.api.jar
    com.sap.security.api.perm.jar</b>
    Finally rebuild your project and deploy.
    Regards,
    <b>Chintan Virani.</b>

Maybe you are looking for