cancel
Showing results for 
Search instead for 
Did you mean: 

Determine WDY Application

Former Member
0 Kudos

Hello,

I have a Web Dynpro ABAP component that is being used in two different applications. I'm just wondering if there's a way to programmatically tell which application it was that called the component when a certain method is executed? Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Yes there are APIs for that:

From a method of the component controller:

data lr_api type ref to if_wd_component.
  data lr_appl type ref to if_Wd_application.
  data lr_appli type ref to if_wd_rr_application.
  lr_api =  wd_this->wd_get_api( ).
  lr_appl = lr_api->get_application( ).
  lr_appli = lr_appl->get_application_info( ).
  lr_appli->get_name( ).

If you were inside a view, then just replace the WD_THIS with WD_COMP_CONTROLLER.

Answers (2)

Answers (2)

Former Member
0 Kudos

That was perfect - thanks!

Former Member
0 Kudos

You mean the component usages in the other applications.