Pass a parameter in a Web Dynpro Application

Hi,
I have a Web Dynpro that Calls a RFC. This RFC needs a parameter (user ID from portal) in order to obtain Info. from the R/3 System.
I do it with based on the article which calls a bapi "BAPI_FLIGHTLIST".
The application runs OK when I type the parameter (user ID) in an "input field", it only return the information needed (method button) from R3. Now, if I want to get the parameter (user ID) automatically from the Web Dynpro ( the user who Logon into the portal) the application does not work.
I try with this code but isn't work.
wdContext.currentZrfc_Prueba_Portal_InputElement().setZusuario(userid);
How can I set the parameter (Zusuario) in my input field automatically and after I press the button (method) return my info.???
Here is the code.
The method wdDOInit
Zrfc_Prueba_Portal_Input input = new Zrfc_Prueba_Portal_Input();
wdContext.nodeZrfc_Prueba_Portal_Input().bind(input);
The method that Execute a RFC
//@@ Begin Take USer
       String userid="";
          try {
               IWDClientUser user = WDClientUser.getCurrentUser();
               userid = user.getSAPUser().getUniqueName();
          } catch (WDUMException e) {
               e.printStackTrace();
//@@ End Take USer
//@@ Begin Set the login user to Zusuario parameter
          wdContext.currentZrfc_Prueba_Portal_InputElement().setZusuario(userid);
//@@ End Set the login user to Zusuario parameter
          //@@ Begin Method that execute the RFC
          try {
                        wdContext.currentZrfc_Prueba_Portal_InputElement().modelObject().execute();
               wdContext.nodeOutput().invalidate();
               wdComponentAPI.getMessageManager().reportSuccess(
                         "Execute whit the user: "
                                   + wdContext
                                             .currentZrfc_Prueba_Portal_InputElement()
                                             .getZusuario().toString());
          } catch (Exception e) {
               e.printStackTrace();
               wdComponentAPI.getMessageManager().reportException("Caution " + e);
          //@@ End Method that execute the RFC
Any help will be rewarded.
Regards
Dario

Hi Bala Duvvuri,
I taste your code but isn't work.
This the method wdDoInit
public void wdDoInit()
    //@@begin wdDoInit()
       Zrfc_Prueba_Portal_Input input = new Zrfc_Prueba_Portal_Input();
       wdContext.nodeZrfc_Prueba_Portal_Input().bind(input);
    //@@end
This the method ExecuteRFC
public void ExecuteRFC( )  {
    //@@begin ExecuteRFC()
         Zrfc_Prueba_Portal_Input input = new Zrfc_Prueba_Portal_Input();
       wdContext.nodeZrfc_Prueba_Portal_Input().bind(input);
       //@@ Begin Take USer
       String userid="";
       try {
               IWDClientUser user = WDClientUser.getCurrentUser();
               userid = user.getSAPUser().getUniqueName();
          } catch (WDUMException e) {
               e.printStackTrace();
           //@@ End Take USer
          //@@ Begin Set the login user to Zusuario parameter
          input.setZusuario(userid);          
          //@@ End Set the login user to Zusuario parameter
          //@@ Begin Method that execute the RFC
          try {
               wdContext.currentZrfc_Prueba_Portal_InputElement().modelObject().execute();
               wdContext.nodeOutput().invalidate();
               wdComponentAPI.getMessageManager().reportSuccess(
                  "Execute whit the user: "
                    + wdContext
                            .currentZrfc_Prueba_Portal_InputElement()
                         .getZusuario().toString());
          } catch (Throwable e) {
               e.printStackTrace();
               wdComponentAPI.getMessageManager().reportException("Caution " + e);
          //@@ End Method that execute the RFC
    //@@end
Regards

Similar Messages

  • Passing parameters to Transactions from Web dynpro Application through ITS

    Hi,
    i need to call a transaction from Web dynpro through ITS. On action from web dynpro application, i am concatenating the respective parameters mentioned below along with URL. The problem is one parameter(VARIANT) is being passed to the t-code CAT3 correctly. The next mandatory parameter(PERNR) is not passed to the respective field.Here is the URL Code:
    CONCATENATE 'http'
    '://' host ':' port
    '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'CAT3'
    '%20TCATST-VARIANT=' lv_name2 '&CATSFIELDS-PERNR=' lv_name1 INTO url.
    Called T-Code CAT3
    Passing Parameters are:
    Data Profile TCATST-VARIANT
    Pernr: CATSFIELDS-PERNR

    Pradeep,
    iam trying to pass values from webdynpro application to SAP GUI Transaction
    here is the sample code which iam using
    CONCATENATE  'http://s0164dep01.adta.uae:50000/irj/portal/interop?NavigationTarget=pcd:portal_content/Testing/trn_iw33?'
    '%20CAUFVD-AUFNR='
                 'ApplicationParameter=CAUFVD-AUFNR='
                  lv_workorder';'
              'DYNP_OKCODE=SHOW'
             INTO lv_url.
    i could'nt able to succed as its displaying page not found exception.
    Help me on this to proceed further
    Regards
    Jaipal.E

  • 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

  • How do i pass parameters to a web dynpro application ?

    Hi all,
    how do i best possible pass (serverspecific) parameters to a web dynpro application ?
    i wrote a web dynpro application that, among other things, sends an email and stores files on a server directory. Therefor i need parameters like e.g. "mailhost" or "directory".
    The way i chose is to make a *.properties file. But from my point of view there are some disadvantages.
    1) When i deploy the WD App to a new server, i have to edit the properties file before. I don't know how to do that. Do i have to edit the *.properties file again, before i make a new ear-Archive with NWDS ?
    2) When the properties a wrong or change for a deployed app, i have to restart the J2EE Engine. Thats not convenient for a production server.
    Is there a better way ?
    Thanks
    Andreas
    (And I promise to return and reward the answers)

    Hi Andreas,
    You can't use something like portalapp.xml because this is not supported by webdynpro, but ... you can add this parameters at the end off the webdynpro address line. like http://<host>:<port>/webdynpro/dispatcher/local/<Webdynproproject>/<webdynproApplication>?host=yourhost
    In your application you can get these variables:
    String host = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("host");
    when you create a webdynpro iview you can specify the default value for the variables in the URL in the properties of the iview and i think you can personalize them later.
    kind regards,
    Joachim

  • Passing a parameter while calling a web dynpro application on portal

    hi
    I am having a web dynpro application which retrieves data from R/3 system via RFC using Jco destinations define in the Portal.
    Now we have different kinds of portals running on the same WAS, now I want the application to run which access data from different R/3 systems thru different JCo destinations.
    I need to create a logic such that mu application runs fine on any portal with any Jco destination.
    Is there any provision to achieve this.
    kindly let me know about this.
    Thanks and regards
    kris

    Gopi,
    there's an parameter called "sap-wd-arfc-useSys" you can pass to the application, to change the used JCo-Connection (read more at http://help.sap.com/saphelp_erp2005/helpdata/en/f4/651741f163f023e10000000a155106/frameset.htm)
    so, if you're running the WD-aaplication on <b>one</b> WAS and call it from different portals, you have to create three (or six with the META-connections) JCo-Connection on your WD-WAS.
    In a WD-application you can access URL-Parameters with:
    WDWebContextAdapter.getWebContextAdapter().getRequestParameter("<your URL Parameter-Name>");
    kr, achim

  • Web dynpro Application session parameter

    Need pointers   for the following queries:
    1.Can I fetch Web Dynpro java application session parameter ?
    2.Is it possible to pass the fetched session parameter of a web Dynpro java application to a URL  while creating  an external window ?
    Regards
    Radhika Kuthiala

    [SAP Network Blog: Never Ever Hijack Internal Web Dynpro Classes and Interfaces|/people/bertram.ganz/blog/2005/02/02/never-ever-hijack-internal-web-dynpro-classes-and-interfaces]
    regards,
    Angelo

  • Parameter transfer from one Web Dynpro Application to another

    hi,
    Is it true that  only parameters with string type can be transfered from one Web dynpro application to another ?

    hi, Justin ,
    You are right , I can use inplug for the dest component , and can transfer referenced type , but now I met a problem , how I can transfer the parameter to the dest comp ? 
    I can use the following code to transfer a value from origin to dest , but how to transfer an object , can you give me some sample code ?
    CONCATENATE l_url '?'
                   '&guid=' lv_guid
                   into l_url.
    CALL METHOD window_manager->create_external_window
          EXPORTING
            url    = l_url
          RECEIVING
            window = lo_window.

  • Get HTTPS URL for Web dynpro application

    We are using SSL. By default the URL generated for the Web dynpro application is HTTP.
    We went to SICF, and deactivated the HTTP service. That made the URL point to HTTPS.
    But few problems started coming because of it:
    - Our Content server became inaccessible.
    - Every time server is re-started, we need to manually go and de-activate HTTP Service.
    We even tried to set the parameter icm/icm/HTTP/redirect_0. But problem is not solved.
    I know this question is asked before, but every time the answer is to read the help document on ICM.
    What's the correct way for any webdynpro application to point to HTTPS? I don't think de-activating HTTP service is the right way.
    Any suggestions please?
    Thanks in adv.

    Thanks a lot Thomas. I'd ask the Portal Admin to try it out.
    There is another similar problem we are facing: I have embedded Webdynpro in R/3 screen. Then used the cl_gui_wdr_viewer class's load_application method passing HTTPS protocol.
    It returns HTTPS URL only, but is not showing up on users' laptops.
    Earlier we were not passing HTTPS protocol, so generated URL was HTTP, and it was not showing on users' screen (can show in ours). Reason we found out is that users' site has HTTP port blocked. They cannot show any HTTP url.
    So we changed to get HTTPS URL, but that also gives the same problem. It is still trying to get HTTP url.
    Here is the URL that the users got: (when they right click to see the URL generated)
    res://ieframe.dll/dnserrordiagoff_webOC.htm#http://abc.def.jil:8000/sap/public/myssocntl?sap-client=220
    Can give any clues on why this is going wrong? Cannot raise OSS as I know embedding Webdynpro in R/3 is not supported
    Thanks in adv.

  • Close External Window in Web Dynpro Application

    Hi Folks,
    I am working on a development in Web Dynpro and I am pretty new to this topic, so I seek your help.
    The scene is:
    I have created a Web Dynpro application in which I open an URL using CREATE_EXTERNAL_WINDOW method of the Window Controller. I am able to open the window but not able to close it.
    I tried using methods,
    CLOSE()
      and
      SET_CLOSE_IN_ANY_CASE()
      but no success.
    Please guide me if anything more needs to be done for closing the opened window.
    Thank you.
    Sud.

    Thank you Thomas,
    You correctly pointed out, I was trying to close the external window from my source window.
    More precisely, I have a WD application which has a button (Search) on one of its views. On click of 'Search' button, I open a new window using 'CREATE_EXTERNAL_WINDOW' passing the URL 'www.google.com'.
    Till this point its fine, but now I want to close this newly opened window. As you said now these are 2 different sessions and cannot communicate anymore, so any guidance how to close this new window?.
    OR
    Is this the only way to call an URL i.e using CREATE_EXTERNAL_WINDOW? Is there any other way to call an URL without closing my current running WD application?
    Request your  help......
    Thanks.
    Regards,
    Sud....

  • Reg: Closing and Opening Web Dynpro Application in same browser

    Dear Experts
    In my webdynpro application when i click a button another web dynpro application is opened in another window(another browser) .
    But i want to open the second web dynpro application inside the same browser in which closing the first applicaiton and opening the second web application in same browser window .
    Please guide me to do this.
    Regards
    Arun

    hi ,
    Exit plugs have the special property that they use the defined URL parameter. After you have created the URL parameter in the parameter list on the Outbound Plugs tab page in the window editor, you can specify a value for this parameter in the method that calls the exit plug.
    ref
    link:[http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/content.htm]
    it would help u
    regards,
    amit

  • Call ESS FPM CATS Working time application from non FPM web dynpro application on click of button

    Hi,
    My requirement is to launch ESS Working time application HRESS_AC_CATS_1 from custom web dynpro application.
    ESS CATS working time application is configured in LPD_CUST launchpad.
    I tried using method  cl_hr_navigation_services=>navigate in my custom web dynpro but it did not work.
    Regards,
    Ibrahim

    In case you want to use Launchpad, you can use ABAP class CL_APB_LAUNCHPAD_API. If choose not to use Launchpad, you can use method CONSTRUCT_WD_URL of ABAP class CL_WD_UTILITIES to generate the URL. Specify Web Dynpro application and Web Dynpro Configuration as parameter. Finally create an external window using method CREATE_EXTERNAL_WINDOW that points to that URL.

  • How To Consume UME services in Web Dynpro applications

    Dear Friends,
    I am developing a new web dynpro application in which i want to get the user related information in my dynpro code. I have used com.sap.secuirty.jar file in class path -> lib of my project.
    I have written code sth like this.
    IUser user = null;
    String username = user.getCurrentUser().getSAPUser();
    and defined sap.authentication as a application variable to fetch user creadentials from portal run time.(user logs in to the portal and dynpro application fetches user credentials from portal). When i do this, the login window appears twice and user needs to enter his credentials more than once. If I remove sap.authentication parameter from the application then i am not able to get the user credentials. Could you please tell me the right method of fetching the user credentials in web dynpro application? Do we need to use sap.authentication? do we need to include sharing reference of the usermanagement in our application?
    kindly share your knowledge.

    These might be good places for you to start.
    [User|http://help.sap.com/saphelp_nw04s/helpdata/en/80/45da9619d24b61bb869c31ef3b780a/frameset.htm]
    [Protecting Access to the Web Dynpro Application Using UME Permissions|http://help.sap.com/saphelp_nw04s/helpdata/en/f3/a64d401be96913e10000000a1550b0/frameset.htm]
    -Michael
    Edited by: Michael Shea on Sep 2, 2008 8:24 AM
    Edited by: Michael Shea on Sep 2, 2008 8:25 AM
    Fix link

  • The Web Dynpro application 'PageBuilder' has expired

    Hi Alll,
    We are implementing ESS/MSS and the Portal was working fine.
    We set it up for SSL/https and it was working just fine. However when we call it from reverse proxy server the web dynro applications through the following error:
    The Web Dynpro application 'PageBuilder' has expired. Restart the application. Choose 'Refresh' in the iView tray or use the browser 'Refresh' button to restart the iView
      Details:   No details available
    When I tested this with a transaction iview they work just. Also when tested directly from Portal they work fine.
    Can anyone assist on this please?
    Thanks,
    Mike

    Hello Mike,
    After a user is logged in and requested an ESS/MSS application. The pagebuilder service is requested to built the page.
    When the user is still logged in but is not working with this application the pagebuilder receives a timeout after a while and the session is expired. The pagebuilder has sometimes the status stopped, you can see this in the Netweaver Administrator. (Search for the pb in the application area)
    If an other user is requesting an application the pb service is started again and the page built again.
    If you want to get rid of the warning you could set the "timeout" parameter to a higher value in the configtool.
    Kind regards,
    Marcel

  • The Web Dynpro application 'UWL' has expired

    Hi ALL,
    We are using Enterprise portal 7.0. and backend SRM server
    When the user login into portal it will take him to the UWL page
    in that the user click for any "Approve shopping cart" the error message showing
    " The web dynpro application *'UWL' has expired. restart the application. choose 'refresh' in the iview tray or use the*
    *browser 'refresh' button to restart the iview"*
    user not getting the error message every time. error coming occasionally
    we suggest the user to clear the cookies and restart the browser and relogin.
    but some times it works some times not
    Can any one know the exact problem (any parameters has to be change or any other solution)?
    Regards,
    Abdul Razzaq
    SAP NW.BASIS Consultant

    Dear Abdul ,
    Hope you are doing good.
    We have seen similar cases of  WD Session Expired error message when the  jsessionid cookie issued by the server with the initial requests was not returned from the client with subsequent requets to the server. The only way to ascertain whether this is the case in your system will be by checking the HTTP watch trace (note 1558903 - How To Trace a Portal Scenario Using HttpWatch).
    As the jsessionid cookie is used for session management, when it is missing from the request headers the correct session could not be retrieved and as result new session will be created for that user. Set the parameter JSESSIONID.CookieDomain to "NONE" as mentioned in the sap note: 791765 and see if the issue persists. This configuration should be accessible in
    Config Tool -> expand the tree "cluster-data" -> "Global Server Configuration" -> "services" -> "servlet_jsp" -> Go to "Global
    Properties". Do make the changes, save the customization and then restart the complete SAP server (not just the JAVA server nodes).
    Kindly go through the note completely.
    Also make sure that the SystemCookiesDataProtection and SystemCookieHTTPProtection is set in the HTTP Provider Service on
    the server nodes.
    Do make the changes,save the customization and then restart the complete SAP server.
    Thank you and have a nice day :).
    Kind Regards,
    Hemanth
    SAP AGS

  • Call a ABAP Web-Dynpro-application via a BSP-Application

    We have a BSP-Framework, that call several applications among other things other BSP-Applications, ITS-Application and other systems. Now I want to integrate a ABAP Web Dynpro-Application.
    For the moment I can call the ABAP Web Dynpro-Application from our application.
    This application runs in the same session as the Framework (verify in transaction sm04).
    When I want to call another application in the Framework, the session will be killed (no more sessions in sm04). This happens also, when I want to call the ABAP Web Dynpro-Application a second time.
    I guess, that the ABAP-Framework thinks I want to go outside the system (for example www.google.de) and close the session. I found out, that this wouldn't happen, if the application were suspended. But I found no way to tell the application via a url-parameter to suspend.
    Can someone help me?

    Thx for the tip,
    but I can't firea suspend plug. Because I'm in BSP. I understand the docu so, that you have the option to call a other apllication like BSP from a ABAP Web Dynpro.
    I want to call the ABAP Web Dynpro form BSP like this way.
    1. Start BSP-Framework
    2. Call ABAP Web-Dynpro-Application from BSP
    3. Call another Application from BSP without automatically logout by unload ABAP Web Dynpro. (I have a chance to call the ABAP Web Dynpro again via url to suspend before I call the other app.)
    Regards Stefanie

Maybe you are looking for

  • IPhone 4 no longer recognized by computer after turning off wifi sync

    I've been having trouble with my brother's iPhone 4 syncing to our desktop computer. When I realized it was set for wifi sync I turned it off; now the computer won't even recognize the device. I know it's not the usb port because I've pluggen in othe

  • Execute Javascript  on load in OBIEE 11g

    Hi , Is there any way where we can call javascript function as and when a page loads for all the dashboards without creating a text object in all the pages? Edited by: 938795 on Jun 13, 2012 7:37 AM

  • How do I save iCal calendar as desktop image?

    I remember a very old program preinstalled on Macintosh Performas called Expresso, that had a terrific feature allowing your monthly calendar to be automatically saved as your desktop picture. I have been unable to find a program that duplicates this

  • Eliminate rows in a windows of x seconds

    Hi, Please consider the following case: I have a table with millions of rows. I need to eliminate from the statement results each set of rows (two or more) , which exists in a window of 60 second. For example: create table test (id number, b date); i

  • Xmlviewservice.executeSQLQuery  TIME OUT ERROR

    Hello OBIEE Experts, I got stucked with the command line xmlviewservice.executeSQLQuery(...) method of OBIEE as operation time out. Actuall i am writing dot net source code to retrive the xml result by passing the query created in Oracle BI Answer pa