cancel
Showing results for 
Search instead for 
Did you mean: 

get the paramters value set in the url of webdyn pro application

Former Member
0 Kudos

hi,

how to get the parameters value which is set in the url of the webdyn pro application.

suppose the url is something like as

http://peol.blr.peol.com:1080/sap/bc/webdynpro/sap/zwd_test?id=2&mode=disp

so for that link i want to get the value of the id as well as the mode in the application. so please help me out as i am in middle of an application.

Thanks in advance

gopal

Accepted Solutions (1)

Accepted Solutions (1)

mh97
Contributor
0 Kudos

Gopal,

Your application is assigned a default window and plug. Go to this window and the handler method for that plug, In the handler method you need something like:


DATA parameter_tab TYPE tihttpnvp.
DATA ls_params TYPE ihttpnvp.

wdevent->get_data( EXPORTING name = '_ALL_URL_PARAMETERS' IMPORTING value = parameter_tab ).
  LOOP AT  parameter_tab INTO ls_params.
    CASE ls_params-name.
      WHEN 'ID'.
        .....
      WHEN 'MODE'.
       .....
    ENDCASE.
  ENDLOOP.

Hope this helps!

Margaret

Answers (4)

Answers (4)

Former Member
0 Kudos

Sorry for late but the Last post solves my issue

Former Member
0 Kudos

I have change my requirement

saravanan_narayanan
Active Contributor
0 Kudos

Hello Gopal,

You can follow the suggestion from Margaret or you can do the following

1. In the "Default" Inbound plug of the Window controller, define two importing parameters (ID and MODE) and mark them as optional.

2. In the component controller, define a context node (say DEFAULT) with cardinality as 1..1 and define two attributes ID and MODE

3. Map this DEFAULT node to the window controller

4. In the "DEfault" event handler of the window controller, check whether ID and MODE are not initial. If not initial then populate the same to the DEFAULT context node

5. now the DEFAULt node data will be available in View/Component controller. You write your logic accordingly.

BR, Saravanan

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

have you checked the WDEVENT ?