Entering content frameProcess documentation Working With The Word Processor Interface Locate the document in its SAP Library structure

Purpose

The word processor interface allows you to address application-specific word processing functions in the office application (if it has a word processor interface) from your ABAP program (refer also to has_wordprocessor_interface)

Prerequisites

You must create the instance document for document management before you can use the interface.

Process flow

1. Declare an instance with reference to the interface i_oi_word_processor_document:

data: wp type ref to i_oi_word_processor_document.

2. Use the method get_wordprocessor_interface on the document instance for document management to create the instance for the word processor interface.

3. Use the application-specific functions:

Methods of the word processor interface

Method

Function

get_version

Returns the version of the word processor application

install_template

lnstalls a template locally

set_template

Calls an existing template

remove_template

Deletes an existing template

get_template_info

Returns the name and location of the template

search

Searches for a string

replace

Replaces a search string with a new term

insert_table

Inserts the contents of an internal table into a table in the document

insert_table2

Inserts the contents of an internal table into a table in the document

clear_table

Deletes the contents of a table in the document

get_table_info

Returns the size of each table in the word processor document

Note

Remember that you should include error handling after each method call.

Note

Any parameters not contained in the individual method descriptions are listed under Generic Parameters.

 

 

Leaving content frame