SAP ABAP IMG Activity SIMG_ISHMED_DI07 (Assign Dictation Function to a WordContainer Document Category)
Hierarchy
IS-H (Software Component) SAP Healthcare
   IS-HMED (Application Component) Clinical System
     NMED_DI (Package) i.s.h.med: Dictation System-API
IMG Activity
ID SIMG_ISHMED_DI07 Assign Dictation Function to a WordContainer Document Category  
Transaction Code S_P7C_98000375   (empty) 
Created on 20080311    
Customizing Attributes SIMG_ISHMED_DI07   Assign Dictation and Speech Recognition System to WordContainer 
Customizing Activity SIMG_ISHMED_DI07   Assign Dictation and Speech Recognition System to WordContainer 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name ISHMED_DI07    

Use

In this IMG activity, you determine for which WordContainer document categories you wish to use the dictation function.

Requirements

If you set the Assignment indicator, the dictation functions are activated in the document category and the pushbutton for calling the dictation functions is displayed in the application toolbar of the document category.

The Word template must contain a user-defined macro to transfer the dication. If no Word macro is specified, the delivered macro ISHMED_DICTATION is called. The text marks have the format [DICTATION_alias name], where the alias name is defined in the IMG activity Assign Keywords to Text Fields.

Here you also stipulate whether you wish to use the dictation functions in simplified mode.

Standard settings

Activities

Example

The macro ISHMED_DICTATION can look like this:

Public Sub ISHMED_DICTATION()

Dim R3Dictation As Object 'Import dictation table from R/3

Dim key As String 'keyword

Dim key_art As String 'replacement type

Dim content As String 'dictation for insert

Dim lfn As String 'technical sequence number of dictation

Dim I As Integer 'run index for

loops

'* access to filled dictation transfer table. Set R3Dictation =

ActiveDocument.Container.LinkServer.Items("R3Dictation").Table

If R3Dictation Is Nothing Then Selection.TypeText ("R3Dictation Ttabelle does not exist" +

vbCrLf)

Exit Sub

End If

For I = 1 To R3Dictation.RowCount

key = Empty

content = Empty

lfn = Empty

key_art = Left(R3Dictation(I, 1), 1)

key = Mid(R3Dictation(I, 1), 2)

content = R3Dictation(I, 2)

lfn = R3Dictation(I, 3)

If R3Dictation.RowCount > I Then

If key = R3Dictation(I + 1, 1) Then

content = content + R3Dictation(I + 1, 2)

I = I + 1

End If

End If

If key = "[DICTATION_CURSOR]" Then

Selection.TypeText (content)

Else

Call WriteInBookmark(key_art, key, content)

End If

Next I

Set R3Dictation = Nothing

End Sub

'* Private Sub WriteInBookmark(ByVal KeyArt, ByVal sBookmarkName As

String, _

ByVal sBookmarkText As

String)

'Writes a new value to an existing bookmark

If ActiveDocument.Bookmarks.Exists(sBookmarkName) Then

Dim lRange As Range

Set lRange = ActiveDocument.Bookmarks(sBookmarkName).Range

If KeyArt = "C" Then 'C replace existing text

lRange.Text = sBookmarkText

End If

If KeyArt = "A" Then 'A insert text at start of

field

With lRange

.MoveEnd Unit:=wdCharacter, Count:=-1

.Collapse Direction:=wdCollapseEnd

.InsertParagraphAfter

.InsertAfter sBookmarkText End With

End If

If KeyArt = "E" Then 'E insert text at end of field

(default)

With lRange

.MoveEnd Unit:=wdCharacter, Count:=-1

.Collapse Direction:=wdCollapseEnd

.InsertParagraphAfter

.InsertBefore sBookmarkText

End With

End If

ActiveDocument.Bookmarks.Add sBookmarkName, lRange

End If

End Sub

Business Attributes
ASAP Roadmap ID 203   Establish Master Data 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type C   Customizing Object 
Assigned objects
Customizing Object Object Type Transaction Code Sub-object Do not Summarize Skip Subset Dialog Box Description for multiple selections
TN2DICTATION S - Table (with text table) SM30  
History
Last changed by/on SAP  20081013 
SAP Release Created in