Show TOC

Using the Pivot InterfaceLocate this document in the navigation structure

Use
Process

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 must be installed on the frontend (see also SAP note 722513 ). To find out whether the document type of the document instance supports the pivot interface, use the method has_pivot_interface .

  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.

  2. Use the method get_pivot_interface on the document management instance to create the instance for the pivot interface.

  3. Use the instance from step 2 and the following methods to work with the pivot table:

Method

Function

set_source_table

Inserts the contents of an ABAB 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 .