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

Similar Messages

  • How to Debug a BAPI from a Web Dynpro application

    I have a Web Dynpro application calling a BAPI, and I would very much like to see what data the Web Dynpro application is passing into the BAPI, and then debug the BAPI.
    Is there a way to do this? I'm wondering if it is possible to somehow set up the ABAP stack so that on receipt of the BAPI call, it appears on the tRFC queue waiting for execution.
    However it is done, I need a way to step through the BAPI on the ABAP stack.
    BR,
    Tony.

    Hi Anthony,
    The ABAP runtime environment contains various tools that you can use for analysis purposes, such as for debugging source code. All source code written for Web Dynpro applications in ABAP can normally be tested using the debugger.
    To allow it to test other Web Dynpro-specific program entities too, the debugger has been equipped with a special enhancement. In the phase model in the active application, you can typically see the following information at various points in time:
    -The structure of the content of the current controller,
    -The properties of the UI elements in the layout of the current view
    -The currently instantiated component usages
    Starting the Debugger
    The functions for debugging Web Dynpro entities are embedded in the new debugger. You therefore need to have selected the new debugger in your Workbench settings.
    Selecting the New Debugger
    1. In the menu, choose Utilities -> Settings.
    2. A dialog box now appears that contains two nested tab page areas. Choose the “parent” tab page ABAP Editor.
    3. The settings for ABAP Editor always open with the content of the child tab page Editor. Here, select Front End Editor (New).
    4. Now switch to the Debugging tab page in the ABAP Editor settings and select New Debugger.
    5. Save your changes and close the dialog.
    Starting the Debugging Process
    To run an application in debugging mode, you first need to set an external breakpoint in display mode in one of the methods in the component.
    Now start a test run of the application from ABAP Workbench as usual.
    The method in which you set the breakpoint depends on the purpose of the test run. To debug a view, for example, it is best to set the breakpoint in method WDDOMODIFYVIEW. Provided that the context of the view controller is not filled using a supply method, the view is fully instantiated in the phase model at this point in time.
    Selecting the Web Dynpro Tool in the New Debugger
    When you start the application, another session opens automatically for the debugger. If you have not yet saved any personal settings with regard to the layout of the debugger, the Editor tool will now appear on the left, with the Display Variables tool on the right.
    1. Select one of the three desktops in order to reconfigure it for debugging the Web Dynpro application (see Designing Work Areas).
    2. The right-hand edge of the debugger window has a bar of function icons. Choose the Replace Tools icon:
    3. In the next dialog box (New Tool) open the lowest node (Special Tools) and choose Web Dynpro.
    4. Confirm the dialog box.
    On the right of the debugger desktop, you will see that the previous tool has now been replaced by the Web Dynpro debugger. You can save this setting for future debugging activities. To do this, choose Save Layout In the debugger’s general toolbar.
    Thankyou,
    Ramganesh.

  • How to customize error mess, when an Web Dynpro application Deployed

    Hi Frndz...
    When we r deploying any web dynpro application , if there was any error in that WDP application its showing an error page the list of errors with HOST name  n patch level n OS details n so many n with the line number of that error in the code.. Normally.
    But as my requirement i need to restrict the HOST,OS ,PATCH details in this list to avoid the security issues.
    If anybody have any idea plz share with  me...
    Regards
    Rajesh

    Hi..
    Thank u boss, ur reply was very helpfull to sort out our requirment.
    Regrads
    Rajesh

  • 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

  • How to store text field data from web dynpro application in pcd ?

    Hi Forum,
    I am new to web Dynpro.
    I want to store user specific data (a text field value) from a wd application in PCD and access it every time the user runs the application.How can I achieve this?
    Thanks,
    Mickey.

    Hi
    I created the "read" and "update" methods in my application service. How can I call them? I created and implemented the methods just like here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/340fc0ea-0c01-0010-74bf-965b11031e77
    Operations:
    - readMyEntityService:
    - updateMyEntityService
    Implementation:
    retValue = getMyEntityService().read(key);
    getMyEntityService().update(dS0);
    In Web Dynpro there is this update method with the code above (in my original post).
    How can I call the update-method????????
    Kind regards
    Bettina

  • Pass Values between 2 web dynpro applications

    Hey,
    I have a created an application which display data from table 1, I am capturing the value ON_LEAD_SELECT
    and calling another application2,
    I wanna be able to export the value selected from applciation1 into
    applciation2.
    This what I tried to export selected value, it didn't work through:
    in application 1:
    construct a URL
    CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name = 'APPLICATION2'
        IMPORTING
          out_absolute_url = str.
    concatenate str '?' 'carrid =' ls_sflight-carrid into str.
    get reference of window from component
    l_cmp_api = wd_comp_controller->wd_get_api( ).
    l_window  = l_cmp_api->get_window_manager( ).
    get reference of window of target component
    result = l_window->create_external_window(
    url    = str ).
    result->open( ).
    Thanks in advance

    >
    Abdul kourani wrote:
    > Hi Thomas,
    >
    > Thanks for the quick reply. I used the method you recommended
    >
    > call method cl_http_server=>append_field_url
    >           exporting
    >             name  = 'carrid'
    >             value = ls_sflight-carrid
    >           changing
    >             url   = str.
    >
    > but Im getting a not-compatible type error , since VALUE is expected to be  string.
    > lets say hypothetically I successfully exported the value from application 1, how can I possibly
    > read it in application 2
    >  for example:
    >
    > * read data
    >   select * from sflight into table lt_data
    >   WHERE carrid = ????.
    >
    > Thanks
    Whatever value you have, you need to put into string format anyway.
    Just declare a temporary string field and move yoru carrid value to it before calling the append_field_url method.
    From application 2 you read the URL parameters using the start plug of the window.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/b44e6ae8603095e10000000a421937/frameset.htm

  • Error in tutotial "How to ...  Build a Web Dynpro Application"

    Hi,
    I deployed this tutorial in my WAS 6.40 and had the configuration in the SLD and in the Jco connection.
    When I tried to execute it I received the messages below:
    Error stacktrace:
    com.sap.tc.webdynpro.services.exceptions.WDTypeNotFoundException: type com.sap.demo.flightlist.model.types.Bapimaxrow could not be loaded: com.sap.dictionary.runtime.DdException: The logical dictionary com.sap.demo.flightlist.model.types.FlightListModel does not exist
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:242)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:205)
         at com.sap.tc.webdynpro.progmodel.context.AttributeInfo.init(AttributeInfo.java:471)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAttributes(NodeInfo.java:771)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:756)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:761)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:346)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:352)
         at com.sap.tc.webdynpro.clientserver.task.Task.createApplication(Task.java:217)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:581)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:58)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:339)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:317)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:810)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:238)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.dictionary.runtime.DdException: The logical dictionary com.sap.demo.flightlist.model.types.FlightListModel does not exist
         at com.sap.dictionary.runtime.DdDictionaryPool.getLogicalSystemName(DdDictionaryPool.java:109)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:62)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:39)
         at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:149)
         at com.sap.dictionary.runtime.DdBroker.getSimpleType(DdBroker.java:170)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:234)
         ... 32 more
    Important: I execute the tutorial "FlightBooking" and it is working well, and I'm using the same Jco specifications.

    Hi Flavio,
         It looks like your back end box does not have the type FlightListModel in it.  This can happen for any of a couple of reasons, the Metadata JCO connection could be wrong (but you indicate it is just fine), the back end function module and associated types may not exist on your back end system, or the metadata cache on the J2EE engine is filled with the wrong data (or is simply missing data).  If the first two are double checked and there is no problem, you might try restarting your J2EE engine which would re-load the metadata cache.
         Hope this helps,
            --Greg

  • How to inject external configuration into web dynpro application

    Hi colleagues,
    I've a web dynpro application, which has some hard coded hostnames in the source code.
    All hard coded hostnames should be moved to some else place, either engine parameters or external configuration file.
    Searching over the project, hard coded hostnames were found in following file types:
    - wdmodel files
    - properties files
    - java files
    How to inject external configured hostnames into web dynpro applications, especially wdmodel and property files? Are threre best practices?
    Thanks for any hint!
    Best regards
    Daniel

    property file is supposed to do that job, you can configure the value at nwa after the application is deployed.
    Configuring a Web Dynpro Application (Java) - IT Scenarios at a Glance - SAP Library

  • Value hep problem in web dynpro application

    Hi All,
    I have a requirement where I need to add a field for alternate payee to the web dynpro application and the field name is BSEG-EMPFB. I have written the following code to get the values of it based on the vendor number:
    SELECT SINGLE * FROM  lfb1 INTO f4lfb1_z
                      WHERE lifnr = lv_lifnr
                      AND   bukrs = '001'."bseg-bukrs'.
      CALL FUNCTION 'FI_VENDOR_ALTERN_PAYERS_READ'
        EXPORTING
          i_lifnr            = lv_lifnr
          i_filkd            = filkd
          i_bukrs            = '001'
          i_lfb1_head_office = f4lfb1_z
        TABLES
          t_zemtab           = t_zemtab.
      LOOP AT t_zemtab INTO w_zemtab.
        ls_value_set-text = w_zemtab-empfb.
        ls_value_set-value = w_zemtab-empfb.
    append ls_value_set to lt_value_set.
    DATA lo_nd_alt_payee_info TYPE REF TO if_wd_context_node_info.
    DATA lo_nd_alt_payee TYPE REF TO if_wd_context_node.
    lo_nd_alt_payee = wd_context->get_child_node( name = wd_this->wdctx_alt_payee ).
    lo_nd_alt_payee_info = lo_nd_alt_payee->get_node_info( ).
             lo_nd_alt_payee_info->set_attribute_value_set(
                name =  `ALTERNATE_PAYEE`
                value_set = lt_value_set )
    Now the problem is user wants the details of the alternate payee as F4 help and when I debugged the standard FV60 functionality this how the F4 help is being build therE:
    REFRESH fldtab.
      CLEAR fldtab.
      fldtab-tabname    = 'IZEMTAB'.
      fldtab-fieldname  = 'EMPFB'.
      fldtab-selectflag = 'X'.
      APPEND fldtab.
      CLEAR fldtab.
      fldtab-tabname    = 'IZEMTAB'.
      fldtab-fieldname  = 'NAME1'.
      APPEND fldtab.
      CLEAR fldtab.
      fldtab-tabname    = 'IZEMTAB'.
      fldtab-fieldname  = 'ORT01'.
      APPEND fldtab.
      CLEAR fldtab.
      fldtab-tabname    = 'IZEMTAB'.
      fldtab-fieldname  = 'STRAS'.
      APPEND fldtab.
    *------- Fill Values for Function Module Call --------------------------
      REFRESH valtab.
      LOOP AT zemtab.
        valtab-feld = zemtab-empfb.
        APPEND valtab.
        valtab-feld = zemtab-name1.
        APPEND valtab.
        valtab-feld = zemtab-ort01.
        APPEND valtab.
        IF zemtab-stras NE space.
          valtab-feld = zemtab-stras.
        ELSEIF zemtab-pfach NE space.
          CONCATENATE 'Postfach:'(019) zemtab-pfach INTO valtab-feld.
        ELSE.
          valtab-feld = space.
        ENDIF.
        APPEND valtab.
      ENDLOOP.
    *------- F4 Dialog -----------------------------------------------------
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          display      = space
          fieldname    = 'EMPFB'
          tabname      = 'INVFO'
        IMPORTING
          select_value = empfb
        TABLES
          fields       = fldtab
          valuetab     = valtab.
      IF NOT empfb IS INITIAL.
        invfo-empfb = empfb.
      ENDIF.
    can you please tell me how can I accomdate this in the web dynpro application?
    Thnaks,
    Edited by: rajatg on Jul 13, 2011 6:41 PM
    Edited by: rajatg on Jul 13, 2011 6:42 PM

    Hi Raja,
    Search help is availble at dictinary level you get F4 help automatically.
    Otherwise create OVS help for alternate payee. use WDR_OVS.
    check this..
    http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
    /people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap
    Cheers,
    Kris.

  • Integrate Web Dynpro Application into a Guided Procedure Step

    hi guys
    I would like to integrate my Web Dynpro Application into a GP-Step.
    I DON't want a:
    - Web Dynpro Component (GP Interface)
    - Composite Application Web Dynpro Component
    I think I have to use "Web Dnypro Application" from the callable objects list.
    However, I couldn't see any input parameters.
    Thanks for your help.
    Regards,
    Go:khan

    Hi Gökhan,
    in my mind you only see Input/ Output Parameters within a Web Dynpro Application when you use the GP Interface.
    WHen you want to have some for parameter mapping, you must implement an Web Dynpro Application with GP connectors.
    Take the following tutorial to do that.
    Hope it helps
    Bye Steve

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • Regarding how to pass the data from web dynpro to workflow

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Check this [thread|SAP_WAPI_START_WORKFLOW;

  • How to pass the data from web dynpro to workflow.

    hi gurus,
    how to pass the data from web dynpro to workflow.
    Regards
    vijay

    Hi
    you can use function module
    data   ls_input_container  TYPE swr_cont.
    data   lt_input_container  TYPE TABLE OF  swr_cont.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
        EXPORTING
          task            = ptask
        IMPORTING
          return_code     = lv_return_code
          new_status      = lv_new_status
        TABLES
          input_container = pinput_container
          message_lines   = lt_message_lines
          message_struct  = lt_message_struct.
    where you pass the data in imnternal table "pinput_container" as
      ls_input_container-element = 'KUNNR'.
      ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'CLUSER'.
      ls_input_container-value = lv_cluser.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'BUKRS'.
      ls_input_container-value = lv_bukrs. " youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VKORG'.
      ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'VTWEG'.
      ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
      ls_input_container-element = 'SPART'.
      ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
      APPEND ls_input_container TO lt_input_container .
    *Also Forgot to mention where ptask is your workflow ID *
    Regards,
    Arvind
    Edited by: Arvind Patel on May 14, 2010 7:38 AM

  • 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

  • How can i pass parameters to every form sucessively or repeatedly

    How can i pass parameters to every form sucessively or repeatedly
    Eg: I have username which is specified in first form
    I want to display and use the username in each and every form after that form
    please tell me how to do
    i have one solution
    i.e., Normal way to pass parameters from one form to another!
    Is any procedure to pass paramters to all form at a time???

    excellent ...
    thanks for adding up to my post ..
    You can make use of parameters
    Every forms shud have same parameter name and u pass on the values of these
    Its one of the best ways

Maybe you are looking for

  • Early 2011 MBP 13 random reboots (no Kernel Panic logged)

    Hi, Problem Description: My MacBook Pro randomly reboots at least 1-2 times a day. I cannot find a kernel log because each restart is a double one. Let me explain the problem further : 1. Im doing something (nothing specific..no specific app) on the

  • Bitlocker - Drive not detected, asks to format.

    Greetings. Situation: Laptop with encyrpted drive (bitlocker) fails (unable to boot). Data recovery is required. Hard Drive is removed and connected to a system running Windows 7 Enterprise. Instead of drive being detected as encrypted, a Window requ

  • How to implement resend mechanism in BPM in order?

    I have a requirement to implement a synchronous scenario in BPM,which doe sthe following steps 1)Recieves a transformed idoc message 2)Sends the message to a webservice synchronously 3)Waits for the response for a duration of 1 min 4)Resends it again

  • Adobe Flash Player 10

    I just recently had to install and repair a new hard drive into my computer. Since doing so I am playing Fantasy Baseball on Yahoo and cannot view the stat tracker. I think that it may use flash. It loads about 70% and will not let me go any further.

  • Photoshop Elements 9 failure

    What prompts message 'photoshop elements 9 cannot start or continue because of missing files, reinstall.  When attempt reinstall I have to deactivate my current software.  Will this mean I have to forefit the ability to put the software onto a laptop