Entering content frameSyntax documentation set_fieldtype Locate the document in its SAP Library structure

Use this method to set or change the field type of a field in the pivot table. You can, for example, change the type of a field (row, column, or data field), or its summarization type (sum field, maximum, minimum, count, or average).

Note

You can only use this method with fields that are already in the pivot table. To add or remove fields from the table, use the method set_source_table.

CALL METHOD pivot->set_fieldtype
       EXPORTING name          = name
                 type          = type
                 pivot         = pivot
                 consolidation = consolidation
                 no_flush      = no_flush
       IMPORTING error         = error
                 retcode       = retcode.

Description of parameters

Parameter

Optional

Description

name

 

Name of the field in the pivot table

type

 

New type of the field. Possible values:

  • i_oi_pivot=>rowfield : Each value of the field is a row of the pivot table
  • i_oi_pivot=>columnfield : Each value of the field is a column of the pivot table
  • i_oi_pivot=>datafield : The field is part of the body of the table

pivot

 

The name of the pivot table in the workbook

consolidation

 

The summarization type of the field. Possible values:

  • ADD : Sum
  • CNT : Count
  • MIN : Minimum value
  • MAX : Maximum value
  • AVG : Mean value
  • NOP : No special summarization option
Leaving content frame