會說話的ABAP report

i042416發表於2018-03-25
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技術:

會說話的ABAP report

report程式碼直接call的MS的sound engine,透過sapi.dll暴露出來,

會說話的ABAP report

這個report只是call了dll裡其中一個speak方法:

會說話的ABAP report

要獲取更多Jerry的原創技術文章,請關注公眾號"汪子熙"或者掃描下面二維碼:

會說話的ABAP report
會說話的ABAP report

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2152211/,如需轉載,請註明出處,否則將追究法律責任。

相關文章