Running Internet Explorer From Abap
Running Internet Explorer From Abap
Running Internet Explorer From Abap
Scope:
This document briefly explains how to open a web browse from ABAP program .The user has to
give the web address in the pop up window . The given web address will be opened in a Internet
Explorer window.
Conventional Method:
The following section will briefly describe the steps followed to select data using Conventional method:
Step1:
Create a Z program.
Step2:
*&---------------------------------------------------------------------*
*&Report ZOPENING_INTERNET_EXPLORER
*&---------------------------------------------------------------------*
REPORT ZOPENING_INTERNET_EXPLORER.
**********************Data deceleration**************************************
INITIALIZATION.
FILE = 'C:\Program Files\Internet Explorer\iexplore.exe'.
By Sivaprasath Sekar, KAAVIAN Systems
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'CRET'.
PERFORM EXECUTE.
ENDCASE.
START-OF-SELECTION.
CALL SELECTION-SCREEN 9000 STARTING AT 10 10.
*&---------------------------------------------------------------------*
*& Form EXECUTE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM EXECUTE .
PERFORM START_NETSCAPE.
IF RC = 1.
DO.
CALL FUNCTION 'WS_FILENAME_GET' “Function for getting the file name
EXPORTING
DEF_FILENAME = 'IEXPLORE.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.
ENDFORM. " EXECUTE
By Sivaprasath Sekar, KAAVIAN Systems
*---------------------------------------------------------------------*
* FORM START_NETSCAPE *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM START_NETSCAPE.
I = STRLEN( FILE ).
I = I - 12.
CHECK = FILE+I(12).
TRANSLATE CHECK TO UPPER CASE.
IF CHECK = 'IEXPLORE.EXE'.
CALL FUNCTION 'WS_EXECUTE' “Function for starting the Internet Explorer
EXPORTING
PROGRAM = FILE
COMMANDLINE = P_PATH
INFORM = ''
EXCEPTIONS
PROG_NOT_FOUND = 1.
RC = SY-SUBRC.
ELSE.
RC = 1.
ENDIF.
ENDFORM. "start_netscape
Step3: