Fonction SAP BAPI_COSTACTPLN_READKEYFIGURE - Statistical Key Figure Planning: Read

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
HEADERINFO BAPIPLNHDR_SKF u 67 Header Data

Paramètre Reférence Long. Facultatif Description
COOBJECT BAPISKFOBJ 70 Object List
INDEXSTRUCTURE BAPIACISTRU 12 Assign Objects and Values
PERVALUE BAPISKFVAL 330 X Plan Values Per Period
RETURN BAPIRET2 548 Error Messages
TOTVALUE BAPISKFTOT 98 X Plan Values Per Fiscal Year and Distribution Key

Functionality
This method reads planned statistical key figures.

Example
You want to know what values were used for planning statistical keyfigures KF01 and KF02 on cost center 4210.
You can make entries in the tables as follows to find this out:
INDEXSTRUCTURE:
OBJECT_INDEX | VALUE_INDEX
1 | 1
1 | 2
COOBJECT:
OBJECT_INDEX|COSTCENTER|ACTTYPE|CO_BUSPROC|ORDERID|WBS_ELEMENT
1 | 4210 | | | |
TOTVALUE:
VALUE_INDEX|STATKEYFIG|
1 | KF01 |
2 | KF02 |
The system then reads the records accordingly.
Note that the VALUE_INDEX field in the INDEXSTRUCTURE table must beuniquely filled in a different way from the write BAPIs. This meansthat each value may only appear once as the system must be able touniquely assign the values to be read to an object.

Description
The Header_Info structure has the following fields:

  • CO_AREA - Controlling area

  • FISC_YEAR - Fiscal year

  • PERIOD_FROM - First period for which values are transferred

  • PERIOD_TO - Last period for which values are transferred

  • VERSION - Version in which the planning data is saved

  • DOC_HDR_TX - Document header text, only saved in integrated
  • planning

    Value range

    • PERIOD_FROM, PERIOD_TO - the following must apply:

    • 1 <= PERIOD_FROM <= PERIOD_TO <= number of true posting periods.

      Description

      • OBJECT_INDEX - Index that uniquely identifies the row and thus the
      • object. The index must be greater than zero and may not appear in thetable twice. If the index is not in INDEXSTRUCTURE, the system ignoresthe row.
        • COSTCENTER - Cost center on which the statistical

        • key figure is to be planned.
          • ACTTYPE - Activity type, can only be filled together
          • with COSTCENTER.
            • CO_BUSPROC - Business process on which the
            • statistical key figure is to be planned.
              • ORDERID - Order on which the statistical key figure is
              • to be planned.
                • WBS_ELEMENT - WBS element on which the statistical
                • key figure is to be planned.
                  Only one object (COSTCENTER, CO_BUSPROC, ORDERID or WBS_ELEMENT) may befilled.

                  Description
                  The IDX_STRUCTURE table assigns the contents of the tables to eachother. In each row, an object must be used that is in the OBJECT_INDEXfield. In addition, you can choose whether a row is transferred withperiodic values from the PER_VALUE table or with annual values from theTOT_VALUE table, as well as a row with control data.
                  The VALUE_INDEX field refers to the values.

                  Value range
                  The OBJECT_INDEX field may only contain values that are in the transfertable OBJECT in the OBJECT_INDEX field.
                  The VALUE_INDEX field may only contain values that are either in thePER_VALUE or TOT_VALUE transfer table in the VALUE_INDEX field.

                  Description
                  This is where you transfer the values that refer to the statistical keyfigure. These are as follows:

                  • VALUE_INDEX: A unique key for the row referred to in the INDEXSTRUCTURE
                  • table. If the index is not in INDEXSTRUCTURE, the system ignores therow.
                    • STATKEYFIG: Statistical key figure

                    • QUANTITY_PER01-16: Quantities for periods 1-16

                    • QUANTITY_MAX_PER01-16: Maximum quantities for periods 1-16
                    • Description
                      Return table that contains the error messages that were issued.

                      Description
                      This is where you transfer the values that refer to the statistical keyfigure. These are as follows:

                      • VALUE_INDEX: A unique key for the row that is referred to in the
                      • INDEXSTRUCTURE table. If the index is not in INDEXSTRUCTURE, the systemignores the row.
                        • STATKEYFIG: Statistical key figure

                        • STAT_QTY: Quantity for all periods

                        • DIST_KEY_QUAN: Distribution key for STAT_QTY. Required entry.

                        • STAT_QTY_MAX: Maximum quantity for all periods.

                        • DIST_KEY_QUAN_MAX: Distribution key for STAT_QTY_MAX. Required entry.

                        • Important: If you are using the statistical key figures from the "TotalValues" category, then you must always enter the distribution key forthe quantity and maximum quantity (even if the maxmum quantity does notcontain a value).