How to read URL Parameters

Hi All,
  How to read URL parameters in another WDA.
Thanks in advance

here is the sample code.
you can write this code in HANDLEDEFAULT method of Default Window of Application being called.
  DATA:
    wa_url TYPE LINE OF tihttpnvp,
    int_url TYPE tihttpnvp.
  wdevent->get_data(
    EXPORTING
      name = if_wd_application=>all_url_parameters
    IMPORTING
      value = int_url ).

Similar Messages

  • 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

  • How to read URL Parameters in ABAP WebDynpro ?

    Hi,
    How and where (which class, method) in ABAP WebDynpro we can read URL Parameters ? I found answers for WebDynpro JAVA but nothing for ABAP.
    Thanks
    Meenal

    Hi Meenal,
    Please see a post by Sanjay Agarwal titled 'Sequencing Problem in Web Dynpro ABAP'. I believe you will find your answer there.
    Cheers,
    Rich

  • How to read url parameters from a decoded string

    Hi,
    Normally if I pass on a url string
    test.cfm?name=abc&num=8, I can do url.name and url.num
    to get the url parameters. But what if the url string is decoded by
    javascript escape() function? The above url string becomes
    test.cfm%3Fname%3Dabc%26num%3D8
    How can I read url.name and url.num from this string?
    Thanks!
    Min

    Escape is not really meant for urls because it encodes the
    delimiters: ? &
    http://www.w3schools.com/jsref/jsref_encodeURI.asp
    http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp

  • Custom SICF handler read URL parameters

    Hello,
    I have written a custom SICF handler.In the SICF handler method of handle request,how do i read URL parameters.
    regards
    Kaushik

    Hi,
    Using GET_HEADER_FIELD() / GET_HEADER_FIELDS(), the HTTP request handler can access all attributes of the HTTP header (name/value pairs).
    Refer Accessing Header Fields (SAP Library - Components of SAP Communication Technology)
    Regards,
    Chandra

  • Read URL parameters

    Hi guys!
    Is posible read url parameters from a WD for Java?
    e.g.: http://server/webdynpro/dispatcher/local/TestApp/TestApp?SAPtestId=1&myVariable=123
    Then read value 123 from some code inside WD (controller, view, whatever).
    Thanks!

    Hi,
    You can do it, see this reference: Pass URL parameters to SAP Portal from an external application
    Best regards

  • 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

  • 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

  • Read URL Parameters programmatically

    Hi
    I wish to read the URL parameters in the WDDOINIT method of the component controller before the default plug is hit on the entry window and therefore the parameters are passed into the method automatically.
    Is there a way this can be done programatically?
    Basically I wish to replicate this WDJ method calll in WDA:
    WDWebContextAdapter.getWebContextAdapter().getRequestParameter().
    Cheers
    Ian

    *Thanks for your replies gents, but the WDDOINIT method does not have WDEVENT parameter for me to read.*
    *I got around it by moving the code to the entry window and calling the method on the comp controller with the parameters that were passed in automatically.*
    BY
    *Ian*
    Hi Can any body tell me how to call Default startup method of window in component controller .
    As I am having the same problem . I want to set url pyrometer in the context  and then read the same context in
    WDDoinit method of component controller . But sequence is like bellow
    WDdoint component -> Wddoinit View -> Default startup method.
    Hence I am not able to read the context variable in wddoinit which I set up in the satartup method of view.
    Kindly let me know any wayout for this.
    Thanks in advance
    Abhay

  • How to read Adapter Parameters at run time

    Hi All,
             We want to write a adapter module that reads the Adapter type and the file name which the adapter picks up, directly from Adapter parameters at runtime and then our adapter module which is being used in the receiver adapter would read these parameters and use them for further processing.
    Now the question is how to read the adapter type and the file name that the sender adapter picks up? I am sure a adapter module is being used internally by SAP that holds these parameters, but which internal adapter module does this and how to access it's parameters so that we can use them in our scenario.
    Regards,
    XIer
    Edited by: XIer on Jan 9, 2008 12:36 AM

    Check the file adapter FAQ. There is a SAP note with the file adapter FAQ that descirbes how the filename can be read with in a module.
    The code looks like something like this,
                   Hashtable mp =
                        (Hashtable) inputModuleData.getSupplementalData(
                             "module.parameters");
                   String strFileName = "";
                   strFileName = (String) mp.get("FileName");
    Regards
    Bhavesh

  • How to pull URL parameters into my Captivate 6 flash

    I want to be able to parse a parameter being passed in the URL to my Captivate video and then use it after the file is over.   e.g. a username that is picked up by another web page.  Is there an easy way to do this.
    Looking through old posts, is see using the m_MovieHandle as the area to place my flash code, but everything so far I've tried doesn't bring in the variable.   I'm kinda new to flash.
    Thanks

    Put this JavaScript code in a separate .js file.  I called mine utilities.js:
         /* Utility to get a URL Parameters as queryString object */
         var queryString = (function(a) {
              if (a == "") return {};
              var b = {};
              for (var i = 0; i < a.length; ++i)
                   var p=a[i].split('=');
                   if (p.length != 2) continue;
                   b[p[0]] = decodeURIComponent(p[1].replace(/\ /g, " "));
              return b;
         })(window.location.search.substr(1).split('&'));
         /* Utility function to Set a Captivate Variable with a URL Parameter */
          var setCpVariableWithURLParameter = function(cpUserVariableName, urlParameterName){
              /* Get the requested URL Parameter from the URLParams Object */
              var variableValue = queryString[urlParameterName];
              /* Check for HTML5 vs. SWF output */
              if (typeof window.cp==='undefined') {
                   /* We have SWF output, so Get the Captivate Object */
                   var objCp=document.getElementById('Captivate');
                   if(objCp && objCp.cpEISetValue){
                        /* Set the Captivate User variable with the JavaScript variabe, variableValue */
                        objCp.cpEISetValue('m_VarHandle.' + cpUserVariableName, variableValue);
              } else {
                   /* We have HTML5 output */
                   if(cp.vm && cp.vm.setVariableValue){
                      cp.vm.setVariableValue(cpUserVariableName, variableValue);
    Include this .js file in the header of the <ProjectName>.htm file of the swf published output by using a script tag:
    <script src="utilities.js" type="text/javascript"></script>
    Where utilities.js is at the root of the published project (where the published .swf file lives).
    Also add this script tag to the header of the HTML5 output index.html file. 
    To use the setCpVariableWithURLParameter() function, you would make this call inside of a JavaScript action in Captivate:
    setCpVariableWithURLParameter('v_Name', 'userName');
    Where 'v_Name' is the Captivate user Variable you want to set and 'userName' is the name of the URL parameter.
    Give that a try and let us know how it goes.
    Best,
    Jim Leichliter

  • How to persist URL parameters in OAM portal inserts?

    Hi,
    We have a requirement to redirect the users to different XSLs based on the containers configured in OID (ou=employees,ou=customers). We have configured different style directories (employees and customers) in OAM. For Identity Administration activities we are using another style (adminStyle) used by OAM Identity Administrators.
    We are using OAM portal inserts for navigating from webapplication (integrated with OAM) to OAM modify profile page to change user attributes.
    Also webapplication using different authenitcation scheme in OAM.
    User login into webapplication using login.jsp (form based authentication scheme) and clicks on Modify profile link (URL will be portal insert URL).
    After the user session timeout (Configured in webgate) user is redirected to OAM login page (form based authentication). Once the user enters valid credentials user is redirected to OAM user manager application (only navigation bar with back button is displayed).
    The parameters comp=true, style=employees and program=modify are lost. Hence user not able to see OAM Modify profile page. Again user needs to click on back button (portalid) to get into Modify profile page. How to persist these parameters in the URL?
    Following is the portal insert URL we are using:
    http://<host>:<port>/identity/oblix/apps/userservcenter/bin/userservcenter.cgi?program=modify&uid=UserDN&style=employees&xsl=usc_profile.xsl&comp=true &portalid=webapphome
    Anypointers on this is appreciated.
    Thanks in advance.
    Regards,
    Srikanth
    Edited by: Srikanth_idam on 16-Apr-2010 04:30

    Hi Srikanth,
    That looks like a bug (6158232) that was fixed in version 10.1.4.2 of OAM Access Server (maybe WebGate too). Are you on an earlier version?
    Regards,
    Colin

  • How to config URL parameters dynamiclly in URL iView?

    Hi all,
    I have 2 iViews, iView1 is a WD application iView, iView2 is a URL iView with some URL parameters.
    Firstly I navigate from IView1 to iView2 with some parameters, then I hope to pass these parameters to the URL parameters configued in iView2.
    For example,
    <b>iView2 configuration:</b>
    URL: http://server1/app
    URL parameter name: param
    <b>Navigate from IView1 to iView2:</b>
    WDPortalNavigation.navigateAbsolute("ROLES:"+iview, WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null, WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,(String)null,(String) null, "value=123");
    Then how can I pass the value 123 from iView1 to the parameter 'param' in iView2?
    Best regards,
    Bean

    Hi Bean ,
    The approach you are following is correct ,refer to these links , there you can find the concept of WDportalnavigation properly,Also check for the relative navigation.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    Thanx
    Pankaj

  • How to read url variable javascript problem

    How to read the variable of latitude 1.22 and longitude 103.56.
    This is my website: 127.0.0.1/1/map2.htm?latitude=1.22&longitude=103.56
    function getUrl_Map()
              //Get the variables in the URL
         var vars = [], hash;
              var latitude = getUrlVars()["latitude"];
              //To get the second parameter
              var longitude= getUrlVars()["longitude"];
         var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
         alert('DEBUG: hashes= ' + hashes);
              // read the file http://127.0.0.1/1/map2.htm
              // read the file http://127.0.0.1/1/map2.htm? -->hashes
         for(var i = 0; i < hashes.length; i++)
         hash = hashes.split('=');
                   //alert('DEBUG: i= ' + i);
                   //i=0
                   alert('DEBUG: i= ' + i + 'hash = ' + hash );
         vars.push(hash [0]);
         vars[hash [0]] = hash [1];

    by the way you know that 127.0.0.1 is the address you use to get to your own computer right? It's the loopback address. so posting it doesn't really help anybody see the page, if that was what you were hoping.

  • Need Read URL parameters from Adobe from

    Hi all,
    I have a specific application where in i need to read the parameters of the iview URL from an adobe form. The adobe form is a stand alone adobe form in KM. Its not developed using netweaver developer studio. 
    It would of very major help if some one can help me in this regard. Any javascript or formcalc to read iview URL parameters from an adobe form would be of great help.
    Thanks in advance.
    regards,
    Deepthi lakshmi.A.

    See http://forums.adobe.com/thread/1279496

Maybe you are looking for

  • Upgraded the software on my MacBook Pro now it won't switch on

    I hadn't used my macbook for a while, software update was available , once installed I can't get the machine to switch on, it starts the process then switches off. Any ideas? Thanks

  • AD RMS Offline - Use license for each file?

    Hello. We have protected with AD RMS many Excel files, all with the same RMS template and permissions. This template include a use license with expiration in 15 days. I need to allow opening any of this files while offline. The problem is that I thin

  • Contract cancellation

    Please, I don't try to CANCEL my contract . I want unsubscribe it as soon as possible! I have an  " Acrobat Pro DC - Annual " plan and I'm a PC user. what have I do? thanks,

  • Scanner recommedations:  OS 10.4.7 and my new G4 1.67 PowerBook?

    Greetings. I would like to scan/enhance old family photos and 35mm slides, and have true software compatability with 10.4.7. Price is always a concern, but I am willing to forkout for a clearly superior product! Reagrds from finally cooling-down Verm

  • Can I display RSS news feeds in Keynote?

    I'd like to embed an RSS feed to display the latest news at the bottom of a presentation, as well as current weather information. Is this possible with Keynote '08? There are news ticker apps but none that overlay a Keynote presentation. Thanks!