cancel
Showing results for 
Search instead for 
Did you mean: 

Execute Webdynpro application from ABAP with parameters

Former Member
0 Kudos

Hi all,

i created a new Webdynpro application and i need to execute it from a ABAP report but i need to pass some specifics parameters to my Webdynpro like customer number or executive date.

I searched the solution on SDN but nothing conclusive.

To execute my Webdynpro application from report ABAP i use the following code :

DATA : link TYPE string,

            lv_param TYPE string.

  CALL FUNCTION 'WDY_CONSTRUCT_URL'

   EXPORTING

*   PROTOCOL     =

*   INTERNALMODE = 'X'

     application  = 'ZMY_WD_APPLICATION' " Your application name

   IMPORTING

     out_url      = link. " here you will recive the url for application

*class for opening the application in browser

CALL METHOD cl_gui_frontend_services=>execute

   EXPORTING

     document  = link

     parameter = lv_param

   EXCEPTIONS

     OTHERS    = 1.


And it's work fine, but i would like to pass some parameters.


Thanks for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (1)

Answers (1)

harsha_jalakam
Active Contributor
0 Kudos

Hi Eric,

Please use the class cl_http_server=>append_field_url to add parameters to a URL.

DATA : link TYPE string,

            lv_param TYPE string.

  CALL FUNCTION 'WDY_CONSTRUCT_URL'

   EXPORTING

*   PROTOCOL     =

*   INTERNALMODE = 'X'

     application  = 'ZMY_WD_APPLICATION' " Your application name

   IMPORTING

     out_url      = link. " here you will recive the url for application



call method cl_http_server=>append_field_url

exporting

name = * Name of the field

value = *Value of the field

changing

url = link.


CALL METHOD cl_gui_frontend_services=>execute

   EXPORTING

     document  = link

     parameter = lv_param

   EXCEPTIONS

     OTHERS    = 1.


In the webdynpr component if you want to retrieve the passed values,, this piece of code will help you in fetching.


Data: lv_value type String.

lv_value = wdr_task=>client_window->get_parameter( ‘Parameter  name’ ).


Regards,

Harsha