"-Begin-----------------------------------------------------------------
Program Z_TEST.
"-Variables---------------------------------------------------------
Data Ref_Dock Type Ref To CL_GUI_DOCKING_CONTAINER.
Data Ref_Media Type Ref To Z_CL_MEDIA.
"-GUI---------------------------------------------------------------
Selection-Screen Begin Of Block Media.
Parameters pa_Dummy(1).
Selection-Screen End Of Block Media.
"-Main--------------------------------------------------------------
At Selection-Screen.
Create Object Ref_Dock
Exporting
REPID = sy-repid
DYNNR = sy-dynnr
SIDE = CL_GUI_DOCKING_CONTAINER=>dock_at_right
RATIO = 50
Exceptions
Others = 1.
Create Object Ref_Media
Exporting
PARENT = Ref_Dock
Exceptions
Others = 1.
Call Method Ref_Media->setdatasource
Exporting
FileName = 'file://MyHTML.html'. "InternetExplorer
"FileName = 'MyPDF.pdf'. "Acrobat
"FileName = 'MyMovie.mp4'. "Mediaplayer
Call Screen 1000.
"-End-------------------------------------------------------------------
"-Begin-----------------------------------------------------------------
Class Z_CL_MEDIA Definition Public Inheriting From CL_GUI_CONTROL
Final Create Public .
Public Section.
Type-Pools CNTL .
Methods Constructor Importing Parent Type Ref To CL_GUI_CONTAINER.
Methods Dispatch Redefinition.
Methods SetDataSource Importing FileName Type String.
EndClass.
Class Z_CL_MEDIA Implementation.
Method Constructor.
Call Method Super->constructor
Exporting
CLSID = 'Shell.Explorer' "InternetExplorer
"CLSID = 'AcroPDF.PDF' "Acrobat
"CLSID = 'MediaPlayer.MediaPlayer' "MediaPlayer
PARENT = Parent
LIFETIME = 2
Exceptions
Others = 1.
EndMethod.
Method Dispatch.
Call Method CL_GUI_CFW=>Flush.
EndMethod.
Method SetDataSource.
"Call Method Set_Property
" Exporting
"PROPERTY = 'Src' "Acrobat
"PROPERTY = 'FileName' "MediaPlayer
" VALUE = FileName.
Call Method Call_Method "InternetExplorer
Exporting
METHOD = 'Navigate'
P_COUNT = 1
P1 = FileName.
Call Method CL_GUI_CFW=>FLUSH.
EndMethod.
EndClass.
"-End-------------------------------------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 |