cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member184155
Participant
0 Kudos

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

ramakrishnappa
Active Contributor
0 Kudos

Hi Santhosh,

Are the url parameters of std component static? if so, you can read it from table WDY_APP_PROPERTY, here pass the application name and you get the url parameters defined at design time.

If the url parameters are dynamic, you cannot be able to read the url parameters in other component unless you are storing it in some global attributes or other means.

Hope this helps you.

Regards,

Rama