写点什么

会说话的 ABAP report

用户头像
Jerry Wang
关注
发布于: 2021 年 05 月 23 日
会说话的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.
*
复制代码


用的也是很老的 OLE 技术:



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



这个 report 只是 call 了 dll 里其中一个 speak 方法:



要获取更多 Jerry 的原创技术文章,请关注公众号"汪子熙":



发布于: 2021 年 05 月 23 日阅读数: 7
用户头像

Jerry Wang

关注

个人微信公众号:汪子熙 2017.12.03 加入

SAP成都研究院开发专家,SAP社区导师,SAP中国技术大使。

评论

发布
暂无评论
会说话的ABAP report