Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Call extern URL

Former Member
0 Likes
562

Hi everybody.

Is there any function module, that allows me to open an explorer window with an specific URL when, for example, i press a button???

Thanks in advance.

Regards.

1 ACCEPTED SOLUTION
Read only

amit_khare
Active Contributor
0 Likes
485

you can use this class -

call method cl_gui_frontend_services=>execute

exporting

document = 'https://www.sdn.sap.com'

exceptions

others = 1.

Regards,

Amit

Hi everybody.

Is there any function module, that allows me to open an explorer window with an specific URL when, for example, i press a button???

Thanks in advance.

Regards.

2 REPLIES 2
Read only

amit_khare
Active Contributor
0 Likes
486

you can use this class -

call method cl_gui_frontend_services=>execute

exporting

document = 'https://www.sdn.sap.com'

exceptions

others = 1.

Regards,

Amit

Read only

0 Likes
485

HI,

Please check the report

Module Pool SAPMZTEST_BALA_CUSTOM_CNTRL.

INCLUDE MZTEST_BALA_CUSTOM_CNTRLTOP . " global Data

PROGRAM SAPMZTEST_BALA_CUSTOM_CNTRL.

DATA: computop TYPE REF TO cl_gui_html_viewer,

my_container TYPE REF TO cl_gui_custom_container,

prog_repid LIKE sy-repid,

doc_url(255).

INCLUDE MZTEST_BALA_CUSTOM_CNTRLO01 . " PBO-Modules

module STATUS_0100 output.

SET PF-STATUS 'TESTBL'.

  • SET TITLEBAR 'xxx'.

PERFORM show_computop.

endmodule. " STATUS_0100 OUTPUT

INCLUDE MZTEST_BALA_CUSTOM_CNTRLI01 . " PAI-Modules

module USER_COMMAND_0100 input.

CASE sy-ucomm.

WHEN 'EXIT'.

LEAVE to SCREEN 0.

WHEN 'BACK'.

LEAVE to Screen 100.

WHEN 'COMPUTOPINIT'.

PERFORM show_computop.

ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

INCLUDE MZTEST_BALA_CUSTOM_CNTRLF01 . " FORM-Routines

FORM show_computop .

prog_repid = sy-repid.

CREATE OBJECT my_container

EXPORTING

container_name = 'COMPUTOP'.

CREATE OBJECT computop

EXPORTING

parent = my_container.

CALL METHOD computop->show_url

EXPORTING

  • url = 'logo.svg'.

url = 'http://www.google.com'.

ENDFORM. " show_computop

SCreen 100.

PROCESS BEFORE OUTPUT.

MODULE STATUS_0100.

*

PROCESS AFTER INPUT.

MODULE USER_COMMAND_0100.

Screen Attributes

COMPUTOP CCtrl 1 1 117 25

OK

Copy this program.

Regards

Balu.Malvatu