You can create a SAP shortcut to your report or transaction and import it to your Web Dynpro component as a MIME object (right click on your component -> create -> MIME object -> Import). Then you can use the following code in the action of your button where zabc_launch.sap is the name of your shortcut. When the user clicks on that button, the shortcut will be automatically downloaded and opened.
DATA: lv_mr TYPEREFTO if_mr_api,
lv_url TYPE string,
lv_component TYPEREFTO if_wd_component,
lv_component_info TYPEREFTO if_wd_rr_component,
lv_name TYPE string,
lo_api_component TYPEREFTO if_wd_component,
lo_window TYPEREFTO if_wd_window,
lo_window_manager TYPEREFTO if_wd_window_manager.
* Get name of component
lv_component = wd_comp_controller->wd_get_api().
lv_component_info = l_component->get_component_info().
lv_name = l_component_info->get_name().
* Get mime object
lv_mr = cl_mime_repository_api=>get_api().
CALLMETHOD cl_wd_utilities=>contruct_wd_url(
EXPORTING application_name = lv_name
IMPORTING out_local_url = lV_url ).
CONCATENATE lv_url '/''zabc_launch.sap'INTO lv_url.
* Get window manager
lo_api_component = wd_comp_controller->wd_get_api().
lo_window_manager = lo_api_component->get_window_manager().
* Call above created URL
lo_window_manager->create_external_window(
EXPORTING
url = lv_url
RECEIVING
window = lo_window ).
* Open new window tab
lo_window->open().