cancel
Showing results for 
Search instead for 
Did you mean: 

Launch Webdynpro ABAP application with parameters & events questions

Former Member
0 Kudos

Hi all,

i need to launch a specific Webdynpro application from report ABAP, below is the code i use :

*   Get Web Dynpro Appplication URL

CALL METHOD cl_wd_utilities=>construct_wd_url

   EXPORTING

     application_name = 'MY_WD_APPLICATION' " Application Name

   IMPORTING

     out_absolute_url = lv_url.


CALL METHOD cl_gui_frontend_services=>execute

   EXPORTING

     document = lv_url.

It's work fine but i would like to send parameters to my application so i used the following way :

lv_param = zcl_fi_iscan_tools=>encrypt_data( im_data = ls_iscan ).

CALL METHOD cl_http_server=>append_field_url

   EXPORTING

     name  = 'P_PARAMS'

     value = lv_param

   CHANGING

     url   = lv_url.


CALL METHOD cl_gui_frontend_services=>execute

   EXPORTING

     document = lv_url.


It's work fine, 'P_PARAMS' is recovered in the HANDLEDEFAULT method of the main window of my application, but this event is at the end of all events ordering, now i have to trigger an event from HANDLEDEFAULT method to launch a method in Component controller. I created a new event and function in Component controller. In HANDLEDEFAULT method i execute the following code, but it's not work :


DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .

   lo_componentcontroller =   wd_this->get_componentcontroller_ctr( ).

     lo_componentcontroller->fire_evt_data_loaded_evt(

     ).


The event is not triggered.


Thanks for help.




Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

20 seconds of Google:

http://scn.sap.com/docs/DOC-45729

Note: The parameter value will not be available with in the WDDOINIT of our main view as WDDOINIT method of this view is called before the HANDLEDEFAULT method of Window. So we have to write our code in the method WDDOMODIFYVIEW of our main.

Former Member
0 Kudos

Yep, Google is my friend, sorry...

Thanks a lot Christopher.

Answers (1)

Answers (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Did you registered that method for that event? And why don't you simply call that method from HandleDefault method of window using

wd_comp_controller->method_name( ).



hope this helps,



Regards,

Kiran