cancel
Showing results for 
Search instead for 
Did you mean: 

How to call transaction from webdynpro application

Former Member
0 Kudos

Hi Experts,

I have a web dynpro component zxx_comp.its corresponding web dynpro application zxx_app.

my requirement is , when i test the webdynpro application, i have to call a transaction zxx_txn corresponds to the module pool program zxx_pgm  directly . How can i do that?

Regards

Ashwin KV

Accepted Solutions (1)

Accepted Solutions (1)

former_member212124
Active Participant
0 Kudos

Hi Ashwin,

You can do it easily.

Use: cl_http_server=>if_http_server~get_location.

Please follow the method suggested in below link.

http://scn.sap.com/thread/1579378

http://scn.sap.com/thread/1364541

http://scn.sap.com/thread/1113189

Answers (3)

Answers (3)

venuarun
Active Participant
0 Kudos
harsha_jalakam
Active Contributor
0 Kudos

Hi Ashwin,

Check with following tutorial , where in you can call a sap transaction from WD application.

Calling Transaction Codes through Web Dynpro Application

Regards,

Harsha

harsha_jalakam
Active Contributor
0 Kudos

Hi Ashwin,

Use the following to open a T-Code from WD application.

CALL METHOD cl_http_server=>if_http_server~get_location

IMPORTING

  host = lv_host

  port = lv_port

  out_protocol = lv_protocol.

DATA lv_url type string.

concatenate lv_protocol  '://' lv_host  ':' lv_port  '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction='zxx_txn' into lv_url.

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_manager->create_external_window(

     EXPORTING

       url    = lv_url

     RECEIVING

       window = lo_window ).

Regards,

Harsha

former_member184578
Active Contributor
0 Kudos

Hi,

You can achieve this using ITS: In the WDDOINIT method, pass the ITS url to the Exit plug, or you can cal an external window and pass the ITS url.

http://domain:port/sap/bc/gui/sap/its/webgui?~TRANSACTION=ZXX_PGM

You can check this doc for Exit plug reference:

hope this helps,

Regards,

Kiran