Reading url parameter  in HANDLEDEFAULT method

Hi,
May be I am doing something very silly but I am trying to read URL parameter in my HANDLEDEFAULT method of  MAIN window , and I am trying to define URL paramter as Method parameters but its gives me run time exception every time 'The ASSERT condition was violated.' 
my simple paramter is like this  HEADER_ID   TYPE  importing  associated type   STRING
Can any body help me why this error happens.
Regards,
Gaurav

Hello, Gaurav,
Have you tried something like this:
  DATA: l_url_parameters          TYPE tihttpnvp,
        l_url_parameter           TYPE ihttpnvp.
  wdevent->get_data( EXPORTING name  = if_wd_application=>all_url_parameters
                     IMPORTING value = l_url_parameters ).
  READ TABLE l_url_parameters WITH KEY name = 'parameter_name'
                              INTO l_url_parameter.
  IF sy-subrc EQ 0.
*    your value treatment here
  ENDIF.
There's no need to declare your parameters as method parameters.
Regards,
Andre

Similar Messages

  • ABAP -WebDynpro - Read URL Parameter

    Hi,
    We have a Custom 'Catalog' that needs to be called from SRM using OCI (Open Catalog Interface). We are developing this custom catalog using ABAP Web Dynpro. We have following issues because of which we are unable to communicate back to Shopping cart from the Custom Catalog:
    1. Unable to read the value of 'HOOK_URL' in WebDynpro application. We need this value so that it can be used as Exit URL. How and where do we read this URL parameter in ABAP WebDynpro ?
    2. How can we return the 'HTML Form' to SRM with the values from Custom Catalog to fill the shopping cart ?
    I would appreciate your help...
    Thanks
    Meenal

    Hi Menal,
    I had the same problem.
    Did you define the HOOK_URL parameter in your webservice ? If not, do this 1st.
    2nd
    In you Webdynpro read the HOOK_URL in your handledefault method your window. Store it e.g. as attrribute in you assistance class.
    method handledefault .
    *&- Add FOF and HOOK_URL to assistanceclass attributes
      wd_assist->hook_url = hook_url.
    endmethod.
    After this you can read your HOOK_URL e.g in a view via:
    concatenate 'HOOK_URL=' wd_assist->hook_url zlv_hook_url into zlv_hook_url
    I hope your question is answered.
    What I want to now is: How to controll the HOOK_URL so that the formfields of the extenal catalog is added to the shopping card. Do you now that ?
    John

  • Read url parameter

    Hi friends,
    I am using some parameters like crm-object-action, crm-object-value etc to launch the order directly.
    while doing this, i want to read the parameter like crm-object-value - which has the guid in the do_init_context of bt115h_slso...
    i am using server->request->get_form_field( name = 'crm-object-value' ), and i tried method get_header_fields too... but ai am not able to get the parameter value, this is getting blank value..
    how to read these parameters...
    kindly provide some inputs on this..
    thanks in advance.
    RD

    Hi Hermiz,
    thanks for replying
    I did the same way
    value type string,
    value = request->get_form_field( name = 'crm-object-value' ).
    but value has getting nothing.. its blank...
    my url has
    http://host:port/sap/bc/bsp/sap/crm_ui_frame/default.htm?crm-object-type=BT115_SLSO&crm-object-action=C&sap-client=020&sap-language=EN&crm-object-value=4D240235B73F8143E1008000116CCC
    but value is getting nothing..
    could you tell me how can i get these values
    thanks
    RD

  • HTTP Sender - how to read URL Parameter USER id into Mapping

    Hi,
    My scenario is HTTP - XI - ABAP Proxy.
    I wanted to capture USER id of the person who posted(HTTP) into XI(Mapping). How to read/evaluate the value of sap-user from querystring of URL ?
    http://HOST:8008/sap/xi/adapter_plain?namespace=http%3A//abc.com/sales_oa&interface=MI_sales_OA&service=DEV_D&party=&agency=&scheme=&QOS=EO&<b>sap-user=SM9999</b>&sap-password=xxxxx&sap-client=001&sap-language=EN
    please help.

    Mallik,
    Try  URL Parameters in HTTP sender communication channel.
    In the sender communication channel set Adapter Specific Message Attributes. Click on Apply URL Parameters. In Parameter1 put sap-user (U can query any URL parameter by giving its name as in the HTTP URL).
    Now in SXMB_MONI, in inbound payload SOAP Header, under Dynamic configuration u can see the value of the user. Query the same in Mapping using Dynamic Configuration using keyName as UrlParamOne.
    Regards,
    Sudharshan N A
    Message was edited by:
            Sudharshan Aravamudan

  • Read URL parameter of my webDynpro application ?

    Hi,
    How to read the URL parameter of my webDynpro application from within the webDynpro Application code ??
    Example : My application URL is : "http://ldai99wdd:50000/webdynpro/dispatcher/local/target/TargetApp?SAPtestId=38
    &sap-wd-resumeurl=http%3A%2F%2Fldai99wdd%3A50000%2Fwebdynpro%2Fdispatcher%2Flocal%2Fplugs%2FTest%3Fsap-wd-cltwndid%3D1c175200265c11ddc21900300571b288%26sap-wd-appwndid%3D1c175201265c11ddaa3a00300571b288%26sap-wd-resume%3Dtrue"
    I want to read the Parameter sap-wd-resumeurl.
    Regards,
    Mahesh

    Hi,
    You can use the following code to get parameters from an URL
    IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
    IWDRequest request = protocolAdapter.getRequestObject();
    String paramValue1 = request.getParameter("<URL Parameter name>");
    Re: Web Dynpro URL-Invocation with umlauts (like %FC) in the url
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/be65751c743959e10000000a1553f6/content.htm
    Thanks n Regards,
    Jhansi Miryala

  • Reading URL Parameter

    Dear Experts
    I have created a webdynpro ivew, and added a Quick link to it and added to the workset. So that I can acccess the ivews form URL. I need to pass the URL paramenter also
    like
    http://<Server Name>:<portNumber>/irj/portal/Quick link?param1=Value, Now I need to read the param1 value in my Webdynpro code.
    When i set the value in Application parameter I was able to get the value using the following code
    path=WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("path");
    My Question in how to get the value which is given in URL parameter
    Regards
    Noel

    Hi
    I think the code that you mentioned should works. I observe one thing that in getParameter you mentioned path as an argument. You need to mention the application parameter name.
    Also, if you run the webdynpro application standalone you will not get its iView application parameter. You should only run the iView in portal or in preview mode to get the desired value.
    Following code can help you in listing down all the application parameters that a webdynpro iview can contain. If you mentioned your parameter it will display the same too:
              Enumeration enum =
                   WDProtocolAdapter
                        .getProtocolAdapter()
                        .getRequestObject()
                        .getParameterNames();
              for (Enumeration e = enum; e.hasMoreElements();) {
                   wdComponentAPI.getMessageManager().reportSuccess(
                        "iView Params::" + e.nextElement());
    Coming back to your problem, suppose you have application parameter set as ivuParam  then you can get its value as
              String ivuParam =
                   WDProtocolAdapter
                        .getProtocolAdapter()
                        .getRequestObject()
                        .getParameter(
                        "ivuParam");
    Hope this helps.
    Abhinav

  • Reading URL parameter & displaying into view element

    Dear All,
    I have designed a ABAP webdynpro application.
    With one parameter in application so that I can pass data to webdynpro to views elements.
    Can any one help how to pass data from URL additional parameters to Views context elements?
    For Example:
    WebDynpro Application URL: http://XXXX.com:YYYY/sap/bc/webdynpro/sap/zumruf4?zdata=909090
    So Can I display parameter zdata '909090' to main view?
    Thanks

    ..

  • Passing a url parameter to a method using ADF and JSP

    Hi
    (JDEV10.1.3 : ADF BC, JSP, STRUTS)
    I have a text input on my JSP Page which I need to pass the content as an argument for the dataaction which is implemented in my application Module as a method to set the where clause of a query. I do not know How to set the Method's NDValue. I have tried:
    NDValue='${pageContext.request.parameterMap[ComplexID]}'
    But it always returns null
    hint: ComplexID is my txtBox name on the JSP page.
    I need to pass request.getParameter("ComplexID") but as an NDValue it is not accepted.
    note that ComplexID is not a databind object, It has been created by myself as an HTML element.

    What result do you get when you enter the following into your browser:
    http://mylocalhost_IP/path/to/component/questions.cfc?method=getQuestionsXML&quizid=2 ?
    (Replace http://mylocalhost_IP/path/to/component/ with the correct path to your component)
    Are the results valid/well-formed XML?  Is there any extraneous text that might interferre with the XML processing?  I noticed your xPath was looking for an element called "question s" - Is that the correct name of the element in your XML?  Is there really a space in the name?
    See if you can troubleshoot the issue using your browser first before adding it back into the Spry call.
    Hope that helps!
    - Michael

  • What is 'URL' parameter in JCO.createClient method?

    Hi,
    What is the 'URL' parameter in the following createClient method.. can anyone provide an example?
    public static JCO.Client createClient(
    java.lang.String client,
    java.lang.String user,
    java.lang.String passwd,
    java.lang.String lang,
    java.lang.String url)
    Creates an instance of a client connection to a remote SAP system (with load balancing)
    Parameters:
    url - the url to the remote host
    Thx

    Hi Serle,
    Use following code for creating Client.
    client = JCO.createClient( "100",       // SAP client
                                     "test",   // userid
                                     "*****",     // password
                                     "EN",        // language
                                     "appserver", // host name
                                     "00" );      // system number
    Or you can make connection pool and use client from this pool like:
    // Add a connection pool to the specified system
          //    The pool will be saved in the pool list to be used
          //    from other threads by JCO.getClient(SID).
          //    The pool must be explicitely removed by JCO.removeClientPool(SID)
          JCO.addClientPool( SID,         // Alias for this pool
                             10,          // Max. number of connections
                             "100",       // SAP client
                             "test",   // userid
                             "*****",     // password
                             "EN",        // language
                             "appserver", // host name
                             "00" );
            // Get a client from the pool
            JCO.Client client = JCO.getClient(SID);
    Regards,
    Bhavik

  • Reading a parameter from the URL

    Hi,
    There is a custom OA page that I launch from another isupplier form. The custom OA page is supposed to query only details of the purchase order. I have taken the following approach but am unable to capture the parameter.
    on the source form, i have personalized the po number column to include an URL with OA.jsp?page=/../../../TestPG&PoHeaderId={@ICX_HEADER_ID}
    in the custom page, I write a code
    //PoHdrId = "2346";
    String PoHdrId = pageContext.getParameter("PoHeaderId")
    I cannot read the parameter and i am hard coding this to make my custom page query for a particular PO number.
    Appreciate a quick response.
    Regards,
    Jagan

    Hi Ram:
    I have the similar problem.
    I added a new Button thru' Personalization to the View Purchase Orders Page of iSupplier module.
    In the destination URI of the newly created button I gave,
    javascript:var print_window = window.open("http://server:port/OA_HTML/myJSPPage.jsp?PoNum={@PoNum}")
    Before cliccking the button when I checked the properties of the link, it is not well formed. (i.e The Parameter {@PoNum} is shown as it is. The value is not substituted.)
    When I Click the new button it is calling the custom jsp page, but not passing the PoNum parameter value instead it passes {@PoNum} string.
    Please help me ASAP.
    Thanks,
    San

  • How to read URL parameters of one wdp component into other WDP component?

    Dear Experts,
    Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
    My requirement is i have one standard WDP component with 3 URL parameters and i needto
    read that URL parameters along with their values in my Z-WDP component.
    Thanks
    SK

    Hi Santosh,
    You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
    data: lt_parameter             type tihttpnvp,
             ls_parameter             type ihttpnvp.
    lo_api_controller ?= wd_this->wd_get_api( ).
       call method lo_api_controller->get_message_manager
         receiving
           message_manager = lo_message_manager.
       clear : ls_parameter.
       refresh : lt_parameter[].
    * Read all URL parameters
       wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
    if not lt_parameter[] is initial.
         clear : ls_parameter.
         read table lt_parameter into ls_parameter index 1.
         if ls_parameter-name = 'ACTION' and
            ls_parameter-value is initial.
           lv_flag = 'X'.
           clear : lo_msg.
           lo_msg = 'Action Parameter Missing in URL Link !'.
    *         report message
           call method lo_message_manager->report_error_message
             exporting
               message_text = lo_msg.
         else.
         endif.
    Best Regards
    Priyesh Shah

  • 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

  • Getting URL parameter in Web Dynpro when using iViews in netweaver portal

    Hello Everybody,
    I'm having the following issue:
    I created a WD-Application which would be accessed directly via URL with some parameters.
    Getting these parameters works fine using the logic from the following link:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/2233b60c21072ce10000000a155369/frameset.htm
    Now I want to implement my WD-Application into the netweaver portal.
    My colleagues customized it that far, so that I can access the WD via a portal-link.
    The only thing is, that the logic getting the URL parameters from above does not seem to work in this context any more.
    Do I need different coding getting the parameters from the portal URL or is this a matter of missing "portal-customizing"?
    Any ideas in this matter are kindly appreciated.
    Thanks in advance and regards,
    Marc

    Hi Marc,
    I'm doing the same and it works fine.
    Here is my coding:
      DATA: lt_url_parameters TYPE tihttpnvp.
      data: ls_url_parameters type line of tihttpnvp.
    * Read URL Parameters
      wdevent->get_data( EXPORTING name  = if_wd_application=>all_url_parameters
                         IMPORTING value  = lt_url_parameters ).
      read table lt_url_parameters into ls_url_parameters with key name = 'MODE'.
      if sy-subrc = 0.
        case ls_url_parameters-value.
          when '1'.
          when '2'.
       endcase.
      endif.
    Check the following:
    1.) are you using the event handler "HANDLEDEFAULT" of your WINDOW to get the url parameters?!
    2.) in the portal iview with your wd application, the property "Application Parameters" has to be filled (in my example:  mode=1)
    If you need the value in the init method of your first view, you can store the parameter in an attribute of your component controler and read it in your view.
    Regards,
    Andreas
    Edited by: Andreas Leis on Jul 14, 2009 11:05 AM

  • Any other ways to get parameters of a URL in a window method ?

    Hi,
    In SDN, i find the below two ways to extract the URL parameters, when i pass them while opening a new window. But, unfortunately they dont work for me. so, would like to know, if any other ways are existing to extract the URL parameters.
    1)
    HANDLEDEFAULT method of the window:
    DATA: lt_url_parameters TYPE tihttpnvp.
    wdevent->get_data(
    EXPORTING
    name = if_wd_application=>all_url_parameters
    IMPORTING
    value = lt_url_parameters ).
    2) In HANDLEDEFAULT method, have the URL parameter names as importing parameters and use them normally.
    If there is no other ways, can some one help me in pointing the issue that i face ?
    Note: I have wdevent (CL_WD_CUSTOM_EVENT) importing parameter in place.
    Thanks in advance,
    Gaurav.

    Hi,
    How you are trying to pass your parameters ? I believe you are using some SAP provided template (like for XSS) and relying on passing of some standard parameters. These parameters may be absorbed by the standard component and may not be passed to your WebDynpro Component. You can try passing them as application parameters.
    Thanks
    Prashant

  • How to catch URL parameter from Portal URL in Web Dynpro iView

    Hi All,
    I have a web dynpro application running as a portal iView successfully. Now the client wants to make it internationalized with 7 languages. Currently they access the portal - and via role assignment they get to the portal tab with the wd iView. Now they want to send a parameter for the language key with the portal URL. So when they are typing in http://myportal.mydomain.com now they want to type in http://myportal.mydomain.com?sap-locale=de or so. My question is how can I catch this parameter in the WD application when it is running inside a portal iView? Is it at all possible?
    I have written a very small application which is trying to catch a URL parameter named PARAM. The code I have written is the default one as below:
    String paramValue = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("PARAM");
    When I run the application standalone and add the PARAM=something in last of the URL I can catch it. But when I create an iView and while previewing it I add the same PARAM value it is coming as null all the time. Same when I add this iView to a role and show it via role assignment in protal. Please help to let me know how to achieve this. I think if I can read the parameter value from Portal URL in the WD iView - then I can set it as the default locale of the application and then show language specific file to achieve internationalization.
    Your urgent help will be highly appreciated.
    Warm Regards,
    Shubho

    Hi Shubhadip
    Even if you get the parameters, how do you internationalize your application? Are you not following the standard way as described in the following link. In this case you never need to capture any such parameter. This is done by the WD runtime automatically .
    <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/f4/d95664da179b4db731e21c2e470b72/frameset.htm">Internationalization of WD projects</a>
    You can retrieve application parameters specified at the creation of iview by "adding parameters(with the same name as in iview application parameters) to the default plug of the Component Interface View of the WD application". "onDefaultPlug" method of the interface view controller you get these values as parameters, which you can save in the context node of component controller for later use.This is guaranteed to work.
    But again this is not what you want exactly. You want the user to specify the value at runtime. If you have just 7 languages, you can create 7 set of iviews with different application parameter value indicating language key, and assign to 7 different set of roles, each representing one set of users with common language.
    I hope you find a solution.
    Regards
    kk

Maybe you are looking for

  • My page design looks different in browser

    My website is table based using css styles for the text designed in dreamweaver mx 2004. On one page I have very simple a table with 2 columns, there is text in one and my logo in the other. Both cols are set for content to be vertically aligned to t

  • Bad Character Errors after Unicode implementation???

    Hi, Uncode is implemented in BW Development system in my project. While prforming unit testing after implementing the unicode, we faced an issue of bad character in Sort field while loading data for 0VENDOR master data. Till now we used to correct th

  • How to handle defect items in sap sd..

    Hi Friends, How to handle defect items in sap sd.. My requirement is some of the XYZ materials are damaged 10%.Some more materials(Material number is XYZ) are damaged to 20%.When sales order is created with these defect items,the system should pickup

  • Need to reinstall my Premium Skype on a different ...

    My old computer crashed and I need to install my Premium Skype on my new computer. How do I do that without paying for a second Premium Skype account? mike.walker502

  • How to get reference of application component in anothor component?

    Hello Friends I have one problem so plz help me. Thanks in advance. I have two file one is application and other is component. I have created Dividedbox in application and i put two buttons in component and used component in application. Now i want t