Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

It was friday , A famous day where people look at their watch 3 times more than often.

And techie like us try some R & D.

for me Last friday , target was OLE statements :

If you are not sure what is OLE , then let me tell you in short: its used to talk with presentation server. The ABAP processor normally buffers all successive OLE statements and sends them in a bundle to the presentation server and it will be executed there. Like : speech , excel integration etc..

For Text to Speech i created an object :

create object voice ‘SAPI.SpVoice’.

which is used while calling a method "Voice".(which converts the Text to speech )

The Report which i created had a simple selection screen for a meeting request.

Like : meeting name

          Date

          Start time & End Time.

and a validation : "meeting Start time should be less than meeting EndTime".

Copy paste the below report , and try entering meeting End Time less than meeting Start time.

this time with a normal error message display you can hear the error message too.

 
*&———————————————————————*
*& Report  ZTST_SCHEDULE_MEETING
*&
*&———————————————————————*
* copy the text elements
*P_DATE   Date
*P_MEND  Meeting End
*P_MNAME  Meeting name
*P_MST    Meeting Start
*&
*&———————————————————————*
report ztst_schedule_meeting.
tables : zmeetings.
include ole2incl.
parameters : p_mname type char20.
parameters : p_date type dats.
parameters : p_mst type sy-uzeit.
parameters : p_mend type sy-uzeit.
data : ole type ole2_object,
voice type ole2_object,
text   type string.
data : lv_time type t.

at selection-screen.
create object voice ‘SAPI.SpVoice’.
if p_mend < p_mst.
text = ‘Meeting Start time should be less than meeting End Time.’.
call method of voice ‘Speak’ = ole

exporting #1 = text.
  message ‘meeting Start time should be less than meeting End Time’ type ‘E’.
  endif.

8 Comments