Skip to Content
author's profile photo Former Member
Former Member

Get url parameter OnInitialisation

Hi,

i want to get the url parameter in the event OnInitialisation. How can i do this ?

Example :

.../test1.htm?param1=test¶m2=ttt

I want values of param1 and param2

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 26, 2004 at 02:50 PM

    I've found a solution :

    in the event OnInitialization, i make :

    return = request->get_form_field(name = 'param1' ).

    Add comment
    10|10000 characters needed characters exceeded

    • Using request->get_form_field is perfectly correct.

      What you can also consider if you have many form fields are:

      DATA: ffs TYPE TIHTTPNVP.

      FIELDS-SYMBOLS: <ff> TYPE IHTTPNVP.

      request->get_form_fields( changing fields = ffs ).

      And then look at the parameters with either:

      READ TABLE ffs ASSIGNING <ff> WHERE name = ...

      or

      LOOP AT ffs ASSIGNING <ff>.

      ....

      ENDLOOP.

      ++bcm