Skip to Content
Author's profile photo Phani Rajesh Mullapudi

Calling SAP Transactions from WDA

There are people who still want to know if it is really possible to Call a Transaction/T-code from a WebDynPro ABAP application.

I put together a quick set of steps to help answer that. We will call the HUPAST transaction in SAP.

1) Create a WD application ZTEST_CALL_HUPAST.

2) In the main View, create a button “HUPAST”.

/wp-content/uploads/2013/05/app1_212105.jpg

3) Create an OnAction event handler method CALL_HUPAST & place the below code in it.

method ONACTIONCALL_HUPAST .

DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component  TYPE REF TO if_wd_component.
DATA lo_window         TYPE REF TO if_wd_window.

lo_api_component  = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window         = lo_window_manager->create_external_window(
                   url = http://ersbxdb0.gene.com:8040/sap/bc/gui/sap/its/webgui?~transaction=*hupast
                   ).
lo_window->open( ).

endmethod.

4) Create a WD Application for this component, Activate component & run the URL.

RESULT: Once user hits the HUPAST button, It will create a new window with the HUPAST transaction. You can replace the transaction with any of your choice.

/wp-content/uploads/2013/05/app2_212106.jpg

Assigned tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks!

      Author's profile photo Former Member
      Former Member

      Hi

      when I use this, it appears:

      Logoff

      What has happened?

      You have logged off from the system.

       
      Note

      • The logoff took place 20131105 at 154239 system time.

      HTTP 200 - OK

      Your SAP Internet Communication Framework Team

      is there any thing wrong?

      Thanks~~

      Author's profile photo Josip Istuk
      Josip Istuk

      How to show it in the same window? I am using TABs and want show one of the reports within one TAB and I do not want it to open in new window.

      edit: problem solved here Calling SAP Transaction from WDA in the same window