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

Similar Messages

  • Userid of a Portal-user in Web Dynpro ABAP

    Dear colleagues,
    we want to migrate our application from BSP to Web Dynpro ABAP and I'm looking for a procedure how I can get the userid of a Portal-user in Web Dynpro ABAP which is running inside an iView ?
    In BSP I used iView application parameter user_id and in the BSP the event handler for data retrieval with:
    userid = runtime->server->request->get_form_field( 'userid' ).
    Found a lot of entries how to do it in Java but no one for WDA ?
    Thanks in advance
    Michael

    Hi Michael,
    Actualy it is not so trivial. You have some options:
    1) In case user_id is parameter of iView you can read URL parameter like described here Webdynpro ABAP url-parameters
    2) In case user_id is not iView parameter you can use usuall ABAP <i>sy-uname</i> system variable.
    But pay attantion that it is not really EP user. Here we have 2 options: user mapping and SSO. In case of user mapping <i>sy-uname</i> will contain R/3 user which is mapped to EP user. In case of SSO <i>sy-uname</i> will contain same user name like in EP, because by using SSO user must ne the same on issuing and accepting systems.
    Best regards, Maksim Rashchynski.

  • Create portal user using web dynpro abap application

    Dear All,
    I would like to know is it possible to create portal user-id through web dynpro abap application.
    My requirement is
    > I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
    > I will click on submit, one unique id will get created. This unique id will be the login id for portal.
    I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
    If it is possible to create the portal users using web dynpro abap pls share the code as well.
    Regards,
    Swapnil Indulkar

    Hi swapnil,
    I think by using BAPi.. BAPI_USER_CREATE1 you can create.
    Please check this...
    Create portal user from webdynpro abap
    Creating user and assigning a group through code
    user administration su01
    How can i get the portal user id from logon ticket in the webdyn 4 ABAP
    Cheers,
    Kris.
    Edited by: kissnas on May 21, 2011 8:47 AM

  • Routing a Portal user to a designated ABAP instance

    Hi experts,
    my concern is about performance testing in a portal landscape which is connected to several ABAP systems and a Producer Portal.
    Because functional and performance testing will temporarily overlap, we consider to route our Mercury test users to a designated ABAP/Producer Portal instance in order to separate the load from funtional testing.
    My question:
    How can I ensure that the mercury test users get linked to the second ABAP instance/Producer Portal instance?
    First ideas:
    - Does it help to assign the test users to a specific user group which could be evaluated during SSO?
    - Use of ABAP Logon groups without changing the System Object in the Portal;
    - Taking advantage of the Load Balancer configuration.
    Many thanks in advance and best regards,
    Martin

    The nice thing about loadrunner and other such products is also a headache... and that is handling the headers correctly. In the HTTP header you can set the load balance and session cookies to force the session to a particular place via a web dispatcher.
    You need also to be aware RFC's from the Portal to the ABAP and these should use a logon group that you can force to the instance you desire.
    It is also possible if going via a web dispatcher to hard code the web dispatcher to only have a single system.
    In essence there are a few ways

  • Routing a Portal User to a designated ABAP/Portal Instance

    Hi experts,
    my concern is about performance testing in a portal landscape which is connected to several ABAP systems and a Producer Portal.
    Because functional and performance testing will temporarily overlap, we consider to route our Mercury test users to a designated ABAP/Producer Portal instance in order to separate the load from funtional testing.
    My question:
    How can I ensure that the mercury test users get linked to the second ABAP instance/Producer Portal instance?
    First ideas:
    - Does it help to assign the test users to a specific user group which could be evaluated during SSO?
    - Use of ABAP Logon groups without changing the System Object in the Portal;
    - Taking advantage of the Load Balancer configuration.
    Many thanks in advance and best regards,
    Martin

    The nice thing about loadrunner and other such products is also a headache... and that is handling the headers correctly. In the HTTP header you can set the load balance and session cookies to force the session to a particular place via a web dispatcher.
    You need also to be aware RFC's from the Portal to the ABAP and these should use a logon group that you can force to the instance you desire.
    It is also possible if going via a web dispatcher to hard code the web dispatcher to only have a single system.
    In essence there are a few ways

  • 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

  • Retrieve Portal User ID in WD ABAP Application

    Hi ,
    i have to make an Iview which calls WebDynABAP application and give me output that who has logged into Portal .problem is how to pick the user id from the portal ,i have logged in and how to use that in my WebDynABAP application.is there any function which import or give u that user id and i can store it and display it.
    Regards
    Govind

    Hi Govind Turka,
    have a look at this thread
    [WD4A: pass portal logged in userID to WebDynpro ABAP IView.|WD4A: pass portal logged in userID to WebDynpro ABAP IView.]
    or you can create a FM in ABAP and get the SY-UNAME and in the application wherever you want you can call that method and get the SY-UNAME.
    Hope this helps.
    Cheers-
    Pramod

  • How to set portal authorization in ABAP Webdynpro application

    Hi All,
    Do you have an idea how to set the visibility for Group UI element based on the Portal user authorization in ABAP Webdynpro , for example if the portal user A(or group A), logins into the portal on click of the ABAP Webdynpro IView then we need to set  invisible (hide) the Group UI element  in webdynpro ABAP Application.
    Do you have any sample code on the same to handle the portal authorization in Webdynpro ABAP?? , please let me know if couldnu2019t understand this requirement or my explanation
    Thanks,
    PortalUser100

    Hi Kris,
    Thanks for your reply.
    Like however we passed the UserID, can we pass Group ID also to the ABAP Webdynpro application??
    Can u get me other things, how to copy of the existing component and i want to give the new name for the component and there i need to modify, i dont want to disturb original component  before copy...let me know the procedure for the same??
    Regards,
    PortalUser100

  • Is it possible to launch a Screen Personas screen from an ABAP WebDynpro application?

    I am running SAP EHSM Incident Management within SAP Portal. EHSM has an ABAP WebDynpro frontend based on BOPF/FPM
    In the same portal session for a single user, we want to be able be in an
    active record in EHSM and then launch a screen personas screen based on a
    SAPGUI transaction from either a button click or portal tab click. As part of
    the launch, we want to pass an HR PERNR ID to the Screen Personas/SAPGUI
    transaction from the active record in EHSM and run a search. Is it possible to
    do this? Project team is saying this is a technical limitation.
    I know that Screen Personas cannot be used for a WebDynpro screen, but we just want to launch a screen and pass a parameter. We assumed during blueprint this would be possible.
    Thanks

    This is definitely possible.
    Here is a link containing an example of building the URL to start a transaction via Personas and pass a variable plus a command in the URL. This could be enhanced with specifying the flavor as well.

  • ECC user licenses issue for using Webdynpro ABAP in portal

    Hi all,
    If we want to use Webydnpro ABAP in our external facing portal which is being used by more than 20000 users, how do we manage the ECC licenses for all these users? It will be really expensive to have that many number of licenses in ECC (one for every portal user). Is there any other work around for this?
    Any info on this will be beneficial.
    Thanks,
    Hari

    I am not sure why you want to use WebDynpro for External Portal . As Webdynpro is resource intensive ,  I never saw client asking for this type of  requirement. Are developing any prototype ?
    In my experience ABAP webdynpro is more is used more for business packages and  internal portals  not for external portals. If you want to use this AWD for EEP  Please see below link from SAP Help for pre-requisites
    http://help.sap.com/saphelp_nw04s/helpdata/en/96/bdab419451db34e10000000a1550b0/content.htm
    Last Step in above Link, this mentions that ABAP Webdynpro needs logon.
    As other people mentioned there might be a good way of doing if you contact your SAP account executive to find out if there are any different types of licenses. But you end up in taking other extra licences which not acceptable solution for clients.
    If you want to use WebDynpro for external Portal ( which is not at all suggested for external ) at any cost , better to go with Web Dynpro for Java which will not need any extra  licences on R3.

  • How to create an iview for ABAP Webdynpro Application in Portal?

    HI,
    I am Webdynpro Java webdynpro developer.
    I want to create an IVIEW for an ABAP Webdynpro application in the enterprise portal.

    The process is almost exactly the same as creating a Web Dynpro Java iView. You simply chose the ABAP instead of the Java radio button when you reach that step in the Web Dynpro iView creation process.  There is a video on the topic here:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/eae111e7-0b01-0010-6cb7-e0dd2bfbfa7a
    You can also read about the process in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/1d/e4a34273f60b31e10000000a1550b0/frameset.htm

  • Using customize portal theme for abap webdynpro.

    Dear all,
    I have a customized portal theme where we used different color for the portal. When I create a abap webdynpro application for a workflow task (the application will launch when user click on the item in the UWL). When the application launch, it does not use the customized portal theme instead it just use the standard theme.
    Anyone knows where can I configure it?
    Thanks
    Regards
    Bryan

    Hi Brian,
    You can change the color of a table only if u have the Textview as UI element for cell.
    You can change the semantic color property of textview.
    Please check this.
    I would suggest you to use ALV instead of Table as you can change its colors easily by using functions like SET_DESIGN
    GET_DESIGN of IF_SALV_WD_TABLE_SETTINGS.
    I hope it helps.
    Please revert back with issues.
    Regards,
    Sumit Oberoi

  • Need to open an ABAP WebDynpro application from Portal UWL work item

    Hi All
    I need some suggessions on how to navigate to an ABAP WebDynpo application iview from a mail(Work Item) in portal UWL.
    Requirement in detail:
    Agreements will be created from portal( Agreement Creation Application is developed in ABAP webDynpro and iview has been created with in the portal for this WD application). as and when the agreement is created a mail (ECC Workitem) should trigger to the approver, who has access to portal and check the mail(Work Item) from the portal UWL.
    The mail body should consist the link to the Agreement created in portal ( Link to navigate to the Agreement Creation ivew).
    So, the main requirement is user should navigate to the Agreement creation iview when he open the mail from UWL.
    Mail can be sent from ECC by using ABAP Function modules or by creating a workflow
    Please advice me on how can we achieve this requirement.
    Thanks & regards
    Vijay Bedamsetty
    Edited by: VIJAY BEDAMSETTY on Apr 19, 2011 5:42 PM

    Hi,
    You can call the iView directly by using NavigationTarget..
    http://myServer:50000/irj/portal?
    NavigationTarget=ROLES://portal_content/myFolder/myRole/myIview
    Plz note that the iView you are calling should be part of a Role.
    And the PCD location of the iView in the Role must be given for Navigation Target.
    Check this URL
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/014421d21d6fade10000000a11466f/frameset.htm
    Thanks
    Prashant

  • Reading URL parameters in ABAP webdynpro

    I have a requirements to run my ABAP Webdynpro application view based on two parameters passed to it from portal. How can I read the parameters in ABAP webdynpro and use them to write my condition in the run time. I would appreciate it if someone has any code that would help me also.
    Again your help and support is highly appreciated.
    Lily

    Hi Lily,
    To read the URL parameters, you need to right the following code in the HANDLEDEFAULT method
    of the your default window controller.
    DATA : it_parameter TYPE tihttpnvp,
             wa_parameter  TYPE ihttpnvp.
      DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
      DATA ls_url_param TYPE wd_this->element_url_param.
      " Get all URL parameters
      CALL METHOD wdevent->get_data
        EXPORTING
          name  = if_wd_application=>all_url_parameters
        IMPORTING
          value = it_parameter.
      " Get parameter values
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'PERNR' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-pernr = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'SUBTY' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-subty = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'BEGDA' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-begda = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'ZZPRNTOPT' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-zzprntopt = wa_parameter-value.
      ENDIF.
      " Save URL parameter to context
      lo_nd_url_param = wd_context->get_child_node( name = wd_this->wdctx_url_param ).
      lo_nd_url_param->set_static_attributes(
         static_attributes = ls_url_param ).
    Regards,
    Vikrant

  • How to find the ABAP Webdynpro Component Name in the Portal IView(WDA)

    Hi All
    I got one ABAP Webdynpro IView in portal , when i opened the Iview i got the Application name of ABAP Webdynpro in the properties of the Iview but i could not able to find the component name .
    Please let me know how to find the component name of WDA , as i already got the Application name of component  from Iview i.e WDA_ED_RDF ( this is applicaiton name found in the portal Iview for ABAP Webdynpro)
    Please get back to me on the same , it would be great help to me.
    Thanks,
    PortalUser100
    Edited by: PortalUser100 on Mar 24, 2011 11:51 PM

    Hi
    Right Click on any UI Element in Portal->Go to more field help->TEchical Information. You can see all the information about component, application, ui elements etc.
    Please check this... may helps more
    http://wiki.sdn.sap.com/wiki/display/WDABAP/GeneralTechnicalAspects
    Thanks,
    Venkat.

Maybe you are looking for

  • Why can't I print a web page from my Android 4.1 phone to my 8500a printer? e-print is working.

    Why can't I print a web page from my Samsung Android 4.1 to my Officejet Pro 8500A. eprint is working, so I can send e-mails to my e-print address, but when I try to print a web page, it says that I don't have a printer. Can someone help me with this

  • Sound quality is not as it used to be! after installing windows 8.1

    i have a hp envy 6-1002tx laptop which came with windows7 HB but i upgraded to windows 8.1 recently. since then the sound qualtiy is not the same as it used to be.. it's not loud any more. i have to keep the voulme at 100 to listen. while back when i

  • Initialization must be structured error

    Hello, I have created a custom field on the Customer BO Extension. I am trying to use the CashDiscountTermsCode Codelist on this field. I want it to have a default value. So I write the following line of code element KNB1_ZTERM:CashDiscountTermsCode

  • Starting Aperture

    Version 1.5.2 has stopped loading. The splash screen stays on the desktop and reads "Items not yet stored in a Vault: box icon with the number 3 next to it; tag icon with the number 57 next to it. If I click outside the slash screen it disapears and

  • Premiere Pro crashing on export (windows)

    Hi all I have looked into the solution to this problem on the forums and it seems to be a mac only problem. However I am using windows 7 64bit. I go to export>media it thinks about it for a few seconds and then premiere freezes, 'stops working' and c