REPORT YWEBHELP.
* This program is used to define a transaction ( e.g. YWEB ), that
* can be started from the help menu of the sapgui.
* When started, it runs netscape and opens the root web page of
* the company's help pages.
* If the default location of the netscape is not correct, the program
* starts a file browser window to locate it.
* To set it up, you have to create a new transaction with se93 and
* modify the statuses of menusyst using se41.
DATA: FILE(100), CHECK(12), RC LIKE SY-SUBRC, I TYPE I.
FILE = 'Y:\apps\windows\netscape.exe'.
PERFORM START_NETSCAPE.
IF RC = 1.
DO.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
DEF_FILENAME = 'netscape.exe'
DEF_PATH = 'c:\'
MASK = ',*.*,*.*.'
MODE = 'O'
TITLE = 'Please specify the locaton of netscape.exe'
IMPORTING
FILENAME = FILE
EXCEPTIONS
INV_WINSYS = 1
NO_BATCH = 2
SELECTION_CANCEL = 3
SELECTION_ERROR = 4
OTHERS = 5.
IF SY-SUBRC = 3.
EXIT.
ELSEIF SY-SUBRC = 0.
PERFORM START_NETSCAPE.
IF RC = 0.
EXIT.
ENDIF.
ENDIF.
ENDDO.
ENDIF.
*---------------------------------------------------------------------*
* FORM START_NETSCAPE *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM START_NETSCAPE.
I = STRLEN( FILE ).
I = I - 12.
CHECK = FILE+I(12).
TRANSLATE CHECK TO UPPER CASE.
IF CHECK = 'NETSCAPE.EXE'.
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
PROGRAM = FILE
COMMANDLINE = 'file:///c:/basfhelp/index.htm'
INFORM = ''
EXCEPTIONS
PROG_NOT_FOUND = 1.
RC = SY-SUBRC.
ELSE.
RC = 1.
ENDIF.
ENDFORM. "start_netscape