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

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

    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 ).

  • 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

  • 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 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

  • 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

  • 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

  • Reading URL Parameters from within PDF

    Is there a way to capture data appended to a PDF's URL for use by the Acrobat Javascript? Anyone have an example of this type of implementation?
    Thanks

    Hi Harry,
    You may find useful the following two articles dealing with portlets and parameters:
    [list]
    [*]A Primer on Portlet Parameters and Events
    [*]Adding Parameters and Events to Portlets
    [list]
    Peter

  • Reading Url Parameters

    I'm trying to read a value passed in the url parameter from my xdo file. What are the steps? I'm using XML Publisher Enterprise 5.6.2. Thanks...

    as Ive understood Ive worked with it in this way :
    sql param : select 'http://www.xxx.com/image.gif' PARAM from dual
    url param : url:{PARAM}
    it seems working but I'm trying with the 10.1.3.3.3 version and in the same way is not working....
    Gian

  • Passing URL parameters to WD application

    Hi!
    To pass URL parameters to WD application I currenly inbound plug 'defauld' (of type 'Startup') of main window. I use following code:
    types:
        begin of param_t,
          name type string,
          value type string,
        end of param_t.
      data: params type standard table of param_t.
      data: param like line of params.
      wdevent->get_data(
        exporting
          name = '_ALL_URL_PARAMETERS'
        importing
          value = params
    It works fine but this plug is called after init methods of the component controller an of the view. So if I want to do something with parameters, I must do in this plug.
    Is there way to pass URL parameters in a WD app. so that they were available from the very beginning of the application work i.e. in init method of the component controller etc.?
    Thanks!

    I had the same requirement too. There are a couple of threads on the subject as well, I've posted in one of them but had no answer:
    Re: Read URL Parameters programmatically
    The workaround i've used is this, it's definitely not as neat as I would like to since you end up having two initialization methods per controller, WDDOINIT and the one you create (for each controller you want to run code in using the received parameters). Nevertheless, it works:
    1) Create an event in your component controller, for example INIT_COMPLETED.
    2) Define a new method in your component controller, e.g. INIT_AFTER_WINDOW. This method receives an Importing parameter TYPE tihttpnvp. It uses this received HTTP parameters for the initialization logic and finally raises the INIT_COMPLETED event (This is the method that "replaces" WDDOINIT).
    3) In the Window's Inbound plug handler, you get the HTTP parameters (with wdevent->get_data) and afterwards call the method WD_COMP_CONTROLLER->INIT_AFTER_WINDOW (maybe you need to declare the usage previously in the Window to have the reference available).
    4) Finally, if you need some of the Views to be initialized afterwards the component controller's INIT_AFTER_WINDOW runs (for example to show some initialization messages), you'll have to replace the WDDOINIT method with an INIT_AFTER_COMPCTRL method and subscribe it to the component controller's INIT_COMPLETED event.
    I hope you got the idea, and more importantly, that we get some cleaner solution from SAP for achieving this in the future.
    Regards
    Edited by: Alejandro Bindi on Nov 6, 2008 10:08 PM
    INIT_AFTER_WINDOW is the method to be called on step 3

  • Not able to pass parametrs to URL in SICF Handler method

    Hi everyone,
    We have create a WDA Object which Calls a OCI Catalog and passes the control to catalog using resume plug.
    Once the the materials from catalog are selected and we click on submit button controls return back to a SICF Service which contains a Handler class.
    In this handler class we are reading the selected Materials using statement-
    server->request->get_form_fields( CHANGING fields = lt_cat_fields ).
    i am able to get the materials here, now i want to attach these materials & there details to the WDA URL as parameters.
    So that we can read the selected maerial details in WDA from URL parameters in the resume plug handler of WDA using-
    wdr_task=>server->request->get_form_fields( CHANGING fields = lt_fields ).
    How can we achieve this in SICF handler class.
    Regards,
    Akash Rana

    You shouldn't use WDR_TASK directly in WDA. It isn't release for customer/partner usage. Plus these wouldnt' be form fields, but instead header fields if they are URL parameters. Instead of access WDR_TASK and the request/response object directly, you can get the url paramters of a start or resume plug via the WDEVENT importing parameter of the DEFAULT inbound plug (and its handler method).
    From the online help:
    Suspend and resume plugs can have user-defined parameters. For more information, see Window: Inbound and Outbound Plugs.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/2233b60c21072ce10000000a155369/frameset.htm
    method HANDLEDEFAULT .
      data: l_url_parameters type tihttpnvp.
      wdevent->get_data(
        exporting
          name =  if_wd_application=>all_url_parameters
        importing
          value = l_url_parameters  ).
    endmethod.

  • WD ABAP - Reading the URL Parameters for FPM application

    Hi,
    As per the Custom requirment,
    I want to pass URL parameters for WD ABAP application (sap/bc/webdynpro/dbm/app_veh_cus_search) which uses FPM.
    example: sap/bc/webdynpro/dbm/app_veh_cus_search?Customer=12345&fromExternal=true
    I am facing difficulty in reading the URL parameters.
    How to read/get the URL Parameters for an FPM WD ABAP application????
    Observation:
    I tried reading the parameter in Window --> HANDLEDEFAULT method. But could NOT read the Parameters from here for FPM application whereas if I create a Z Custom application then I could read the URL Parameters. so the issue is in reading the URL Parameters for FPM application.
    Kindly support
    Regards,
    Hussain

    Hi Hussain,
    You can do this either with the methods of interface if_fpm_parameter...
    DATA lo_param TYPE REF TO if_fpm_parameter.
    lo_param = cl_fpm_factory=>get_instance( )->mo_app_parameter.
    CALL METHOD lo_param->get_value
        EXPORTING
            iv_key   = parameter_name
        IMPORTING
            ev_value = parameter_value.
    or a more generic approach using class cl_wd_runtime_services...
    cl_wd_runtime_services=>get_url_parameter
    Cheers,
    Amy

  • Problem reading custom property file from custom event handler.

    Hi,
    My custom event handler needs some bits of information that I have set up in a property file. However, when the event handler runs it throws a FileNotFound exception - actually its because permission was denied.
    I have added the code System.getProperty("user.name") to find out the actual user that the event handler is running as. It reports that "oracle" is the user.
    That's great. However, the permissions on the file will allow oracle to read/write the file. If I log onto the server where OCDB runs (as oracle), I can vi the file.
    The file is owned by another user, but the "oracle" is a member of the group that has read/write (we're running on a unix box). The file is not 777.
    The event handler is actually calling a static utility method that returns the Properties. This utility is used elsewhere in other custom apps in conjunction with OCDB (on the same server). It works there, so the utility is functioning correctly.
    Is there something going on that I'm missing? Like somehow the event handler is acually runn as somebody else?
    Here is the node log.
    2007/07/17 12:52:16 [oracle.ifs] [37] 434364 system FINE: Error /opt/csc/sfi/configuration/sfi.properties (Permission
    denied) Additional INFO: java.io.FileNotFoundException: /opt/csc/sfi/configuration/sfi.properties (Permission denied)
    Thanks in advance for the help.
    Winston

    Matt,
    Sorry to have wasted your time. It was a server reboot issue. The ocdb server hasn't been restarted since early July. We added the users and groups late last week. Although we tested on line, the server wasn't quite up to speed with the new changes.
    We bounced the server and all is well.
    Thanks
    Winston

Maybe you are looking for