cancel
Showing results for 
Search instead for 
Did you mean: 

Calling TCODE on click of LinkToAction UI

Former Member
0 Kudos

HI All

I have a LinkToActionUI Element and i have a custom TCODE which i need to call on the click event of LinktoActionUI element,

is there any other way to call a TCODE from WDA

Best Regards

Chaitanya.A

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

closed

Former Member
0 Kudos

Hi All is there any other way to achieve the same process in browser also

Best Regards

Chaitanya.A

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

By TCODE I assume you mean a transaction code for a classic dynpro application. You can't just start the SAPGUI for Windows from Web Dynpro I'm afraid - which is what you would normally use to display a transaction code. If you are using the portal or the netweaver business client, you can use the Portal APIs to trigger portal navigation and go to a classic dynpro based iView. If you aren't using these tools, then you can use the SAPGUI for HTML via the integrated ITS. The SAPGUI for HTML transforms classic dynpro applications into HTML allowing them to run from the browser. Each classic dynpro transaction can be accessed via URL. This allows you to navigate to SAPGUI for HTML URLs via normal linkToURL UI element in Web Dynpro ABAP or via an Exit Plug fired from a LinkToAction.

Former Member
0 Kudos

Hi All

Created a TCODE for my ABAP Dynpro Application and from there[within SAP session] the following code works, but NOT from the browser

In your action use the following code.

DATA l_componentcontroller TYPE REF TO ig_componentcontroller .
  DATA l_api_componentcontroller TYPE REF TO if_wd_component.
  DATA l_sapgui_manager TYPE REF TO cl_wdr_sapgui_integration.

  l_componentcontroller = wd_this->get_componentcontroller_ctr( ).
  l_api_componentcontroller = l_componentcontroller->wd_get_api( ).
  l_sapgui_manager = l_api_componentcontroller->get_sapgui_manager( ).

  IF l_sapgui_manager IS NOT INITIAL.
    l_sapgui_manager->fire_start_transaction( transaction = 'SE11' ).
  ENDIF.

Best Regards

Chaitanya.A