SAP Tech Pro

SAP Technical Blog
Topprice Price Comparison

How to call a GUI transaction from webdynpro

How to call a GUI transaction from webdynpro



DATA: l_url type string.
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( ).

* Create the URL for ITS SAPGUI in HTML
    cl_its_runtime=>get_url(
      EXPORTING
        in_transaction = 'VA01'
      IMPORTING
        out_abs_url    =  l_url ).

* if needed pass additional parameters into url string also any ok_code/sy-ucomm
    CONCATENATE l_url '&VBELN=' lv_vbeln '&~OkCode=ONLI' INTO l_url.

* Open new browser window and execute transaction
    lo_window_manager->create_external_window(
      EXPORTING
        url    = l_url
      RECEIVING
        window = lo_window ).
    lo_window->open( ).

Add comment

Before Buying, Compare Prices at Topprice.in

Topprice.in