Entering content frameProcess documentation Using the Pivot Interface Locate the document in its SAP Library structure

Purpose

You use an instance of the pivot interface to communicate directly with a pivot table in Microsoft Excel.

Prerequisites

Before you can use the pivot interface, you must create the central document management instance document. Microsoft Excel 97 or 2000 must be installed on the frontend. To find out whether the document type of the document instance supports the pivot interface, use the method has_pivot_interface.

Process Flow

  1. In the data declaration part of your program, declare a data object with reference to the interface i_oi_pivot:

DATA pivot TYPE REF TO i_oi_pivot.

  1. Use the method get_pivot_interface on the document management instance to create the instance for the pivot interface.
  2. Use the instance from step 2 and the following methods to work with the pivot table:

Methods of the pivot interface i_oi_pivot

Method

Function

set_source_table

Inserts the contents of an R/3 internal table into a pivot table

set_fieldtype

Reassigns the type of an existing field in the pivot table

get_allfields

Returns a list of fields in a specified pivot table

get_allpivottables

Returns a list of the names of all pivot tables in a workbook

drill_down

Expands the data display for a particular value to display more detail

drill_up

Collapses the data display for a particular value to display only a summary

Note

Remember to 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