Application Development 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: 

Open URL from a report

Former Member
0 Kudos

Hi, I need to make a connection to URL from a report. Is it posible? thanks.

1 ACCEPTED SOLUTION

manuel_bassani
Contributor
0 Kudos

Hi Josè,

i thing there is more than one way to do this.

For example in a report you can call


call function 'WS_EXECUTE'
 EXPORTING
*   DOCUMENT                 = ' '
*   CD                       = ' '
   COMMANDLINE              = 'http://www.google.com'
*   INFORM                   = ' '
   PROGRAM                  = 'iexplore.exe'
*   STAT                     = ' '
*   WINID                    = ' '
*   OSMAC_SCRIPT             = ' '
*   OSMAC_CREATOR            = ' '
*   WIN16_EXT                = ' '
*   EXEC_RC                  = ' '
* IMPORTING
*   RBUFF                    =
* EXCEPTIONS
*   FRONTEND_ERROR           = 1
*   NO_BATCH                 = 2
*   PROG_NOT_FOUND           = 3
*   ILLEGAL_OPTION           = 4
*   GUI_REFUSE_EXECUTE       = 5
*   OTHERS                   = 6
          .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

Regards, Manuel

PS: uhm...but i think that the solution from Ravi is better

Message was edited by: Manuel Bassani

7 REPLIES 7

former_member181962
Active Contributor
0 Kudos

Use the function:

Call_browser.

CALL FUNCTION 'CALL_BROWSER'

EXPORTING

URL = 'www.yahoo.com'

EXCEPTIONS

FRONTEND_NOT_SUPPORTED = 1

FRONTEND_ERROR = 2

PROG_NOT_FOUND = 3

NO_BATCH = 4

UNSPECIFIED_ERROR = 5

OTHERS = 6.

Reagards,

ravi

Former Member
0 Kudos

Hi,

Take a look at TCODE DWDM.

Thanks

manuel_bassani
Contributor
0 Kudos

Hi Josè,

i thing there is more than one way to do this.

For example in a report you can call


call function 'WS_EXECUTE'
 EXPORTING
*   DOCUMENT                 = ' '
*   CD                       = ' '
   COMMANDLINE              = 'http://www.google.com'
*   INFORM                   = ' '
   PROGRAM                  = 'iexplore.exe'
*   STAT                     = ' '
*   WINID                    = ' '
*   OSMAC_SCRIPT             = ' '
*   OSMAC_CREATOR            = ' '
*   WIN16_EXT                = ' '
*   EXEC_RC                  = ' '
* IMPORTING
*   RBUFF                    =
* EXCEPTIONS
*   FRONTEND_ERROR           = 1
*   NO_BATCH                 = 2
*   PROG_NOT_FOUND           = 3
*   ILLEGAL_OPTION           = 4
*   GUI_REFUSE_EXECUTE       = 5
*   OTHERS                   = 6
          .
if sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.

Regards, Manuel

PS: uhm...but i think that the solution from Ravi is better

Message was edited by: Manuel Bassani

Former Member
0 Kudos

hi jose,

please try the following.

CALL FUNCTION 'GUI_RUN'

EXPORTING

command ='IEXPLORE.EXE'

PARAMETER ='WWW.YAHOOMAIL.COM'.

  • CD =

  • IMPORTING

  • RETURNCODE =

.

and if u want hyperlink then,

*REPORT ZURL NO STANDARD PAGE HEADING.

DATA: BEGIN OF URL_TABLE OCCURS 10,

L(25),

END OF URL_TABLE.

URL_TABLE-L = 'http://www.lycos.com'.APPEND URL_TABLE.

URL_TABLE-L = 'http://www.hotbot.com'.APPEND URL_TABLE.

URL_TABLE-L = 'http://www.sap.com'.APPEND URL_TABLE.

LOOP AT URL_TABLE.

SKIP. FORMAT INTENSIFIED OFF.

WRITE: / 'Single click on '.

FORMAT HOTSPOT ON.FORMAT INTENSIFIED ON.

WRITE: URL_TABLE. HIDE URL_TABLE.

FORMAT HOTSPOT OFF.FORMAT INTENSIFIED OFF.

WRITE: 'to go to', URL_TABLE.

ENDLOOP.

CLEAR URL_TABLE.

AT LINE-SELECTION.

IF NOT URL_TABLE IS INITIAL.

CALL FUNCTION 'WS_EXECUTE'

EXPORTING

program = 'C:\Program Files\Internet Explorer\IEXPLORE.EXE'

commandline = URL_TABLE

INFORM = ''

EXCEPTIONS

PROG_NOT_FOUND = 1.

IF SY-SUBRC <> 0.

WRITE:/ 'Cannot find program to open Internet'.

ENDIF.

ENDIF.

0 Kudos

thanks you´re the best.

0 Kudos

Can the same thing be done from SAP screen (eg. IL03 - Viewing Functional Location)? I want to open Browser if I clicked on a field (eg. manufacturer or class characteristic). If user presses F7, the screen name and field name would be passed to Browser that would open a web page.

Can this be done?

Thanks in advance.

Ian

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

It should work just fine...