SAP 调用 OCX
程序名: ZREPORTFAIRY
1.变量定义:
data:conttypereftocl_gui_custom_container.
classcl_flashdefinitiondeferred.
data:o_flashtypereftocl_flash.
2.类与方法定义
*--------------------------------------------------------------------
-*
*CLASScl_flashDEFINITION
*--------------------------------------------------------------------
-*
classcl_flashdefinitioninheritingfromcl_gui_control.
publicsection.
methods:
constructor
importing
value(shellstyle)typeioptional
value(disp_mode)typeioptional
value(life_time)typeioptional
value(name)typestringoptional
exceptions
cntl_error
cntl_install_error.
endclass."cl_flashDEFINITION
*--------------------------------------------------------------------
--*
*CLASScl_flashIMPLEMENTATION
*--------------------------------------------------------------------
--*
classcl_flashimplementation.
methodconstructor.
data:ctrl_name(80)typec,
wf_clsid(100)typec.
ifnotcl_gui_object=>activexisinitial.
wf_clsid='{00D347F1-DFFD-4FFE-BADF-1A66983DB227}'.”OCX 注册号
else.
raisecntl_error.
endif.