# 会说话的ABAP report


report z.

INCLUDE ole2incl.

DATA: ole   TYPE ole2_object,

voice TYPE ole2_object,

text  TYPE string.

text = 'With the advent of ES6 (referred to as ES2015 from here on), which not only made promises native to the language without requiring one of the countless available libraries,'

&& 'we also got generators. Generators have the ability to pause execution' &&

'within a function, which means that by wrapping them in a utility function, ' &&

'we have the ability to wait for an asynchronous operation to finish before' &&

' moving on to the next line of code. Suddenly your asynchronous code could' &&

' start to look synchronous!'.

DATA: it_tline TYPE STANDARD TABLE OF tline.

CREATE OBJECT voice 'SAPI.SpVoice'.

CALL METHOD OF voice 'Speak' = ole

EXPORTING #1 = text.

*


report代码直接call的MS的sound engine，通过sapi.dll暴露出来，