cancel
Showing results for 
Search instead for 
Did you mean: 

To call standard tcode in webdynpro( thru webgui) : Assistance class

Former Member
0 Kudos

Hi Gurus,

I have an alv display in which the vbeln entries have link to action control.

i.e when i click vbeln( sales order no), it should open a new window through its/webgui.

1.I am getting following error when i activate , get_execute_location is private/protected.

2. How do i go about the following code:

wd_comp_controller->execute_get_location(

IMPORTING

e_host = lv_host

e_out_protocol = lv_out_protocol

e_port = lv_port ).

Within my method of my assistance class I call an interface in class cl_http_server to procure my host,

protocol and port number.

CALL METHOD cl_http_server=>if_http_server~get_location

IMPORTING

host = e_host

port = e_port

out_protocol = e_out_protocol.

Can some one explain in detail.

Best Regards,

Navin Fernandes.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You said your method is defined in assistance class, in that case you need to call


wd_assist->execute_get_location(
IMPORTING
e_host = lv_host
e_out_protocol = lv_out_protocol
e_port = lv_port ).

That should solve your error.

Best Regards,

Loveline Thomas.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Navin,

To display a standard tcode in your webdynpro application using ITS you can use the following code

DATA: url TYPE string,
        host type string,
        port type string.

*Call below method to get host and port
  cl_http_server=>if_http_server~get_location(
     IMPORTING host = host
            port = port ).

*create URL
  CONCATENATE 'http'
  '://' host ':' port
  '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'SE11'
   INTO url.

*get the window manager as we are opening t code in external window.

  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( ).

*  call the url which we created above

  lo_window_manager->create_external_window(
  exporting
  url = url
  receiving
  window = lo_window ).
  
  lo_window->open( ).

Hope this helps!

Best Regards,

Radhika Vadher.

Former Member
0 Kudos

Hi Radhika,

Can we call WebGUI for windows instead of webGUI for HTML ? Also can we call a custom transaction which displays a simple write statement as a result?

E.g.

The transaction contains a report code as above;

write 'test'.

Former Member
0 Kudos

Thank You everyone ,

My problem is solved.

Best REgards,

Navin Fernandes.