Try this:
<i>REPORT zbeep .
INCLUDE ole2incl.
DATA wordbasic TYPE ole2_object.
DATA objectvar1 TYPE ole2_object.
CREATE OBJECT wordbasic 'Word.Basic' .
CALL METHOD OF wordbasic 'Beep' = objectvar1
EXPORTING #1 = '1' .
</i>
Incho
data: h_com1 type ole2_object.
data beep type x.
data command(100) type c.
beep = '07'.
concatenate 'cmd /c echo' beep into command separated by space.
create object h_com1 'SAPINFO' no flush.
if sy-subrc <> 0.
exit.
endif.
if not h_com1 is initial.
constants: sw_hide type i value 0,
sw_shownormal type i value 1,
sw_show type i value 5.
call method of h_com1 'EXEC' = return
exporting #1 = command
#2 = sw_hide.
if sy-subrc = 0.
endif. "// SY-SUBRC
free h_com1.
endif.
Add a comment