Fonction SAP BAPI_COSTACTPLN_READACTOUTPUT - Activity/Price Planning: Read

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

Paramètre Reférence Long. Facultatif Description
CONTRL BAPIACPCTRL 30 X Control Data
COOBJECT BAPIACPOBJ 34 Object List (Cost Center/Activity Type or Business Process)
INDEXSTRUCTURE BAPIACPSTRU 18 Assignment of Objects, Values and Control Data
PERVALUE BAPIACPVAL 772 X Plan Values Per Period
RETURN BAPIRET2 548 Error Messages
TOTVALUE BAPIACPTOT 83 X Plan Values Per Fiscal Year and Distribution Key

Functionality
This method reads activity planning records.

Example
You want to know what quantities and prices were planned on cost center4210, activity type 110, cost center 4220, activity type 110 and thebusiness process 1004210.
You can fill the tables as follows for this purpose:
INDEXSTRUCTURE:
OBJECT_INDEX | VALUE_INDEX
1 | 1 |
2 | 2 |
3 | 3 |
COOBJECT:
OBJECT_INDEX|COSTCENTER|ACTTYPE|CO_BUSPROC
1 | 4210 | 110 |
2 | 4220 | 110 |
3 | | | 1004210
TOTVALUE:
VALUE_INDEX |
1 |
2 |
3 |
The records are then read accordingly and entered in the correspondingrow of the value table. Note that the VALUE_INDEX field in theINDEXSTRUCTURE table must be uniquely filled in a different way fromthe write BAPIs. This means that each value may only be listed once,since the system must be able to make a unique assignment of the valuesto 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 the values are transferred

  • PERIOD_TO - Last period for which the values are transferred

  • VERSION - Version in which the planning data is saved

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

  • PLAN_CURRTYPE - Are the prices planned in controlling area currency or
  • object currency?

    Value range

    • PERIOD_FROM, PERIOD_TO - the following must apply:

    • 1 <= PERIOD_FROM <= PERIOD_TO <= number of true posting periods.
      • PLAN_CURRTYPE - the following values are allowed:

      • C - Planning in controlling area currency
        O - Planning in object currency.

        Description
        This is where you transfer the control data that describes the activityoutput. This is as follows:

        • ATTRIB_INDEX : A unique key of the row referred to in the
        • INDEXSTRUCTURE table.
          • ACTIVITY_CAT : Activity type category

          • ACT_CAT_ACTUAL : Variant activity type category
          • for actual processing.
            • PRICE_INDICATOR : Price indicator for determination
            • of the output price.
              • ACT_PRICE_IND : Price indicator of the actual
              • output price.
                • ALLOC_COST_ELEM : Allocation cost element

                • PREDIS_FXD_COST : Indicator: Fixed cost
                • predistribution - activity type/business process.
                  • MANUAL_ACT_QTY : Indicator: confirm quantity in
                  • actual data manually.
                    • AVERAGE_PRICE_IND : Price determination with
                    • periodic average calculation.
                      • SWITCH_LAYOUT : Switching structure for
                      • component calculation.

                        Description

                        • OBJECT_INDEX - Index that uniquely identifies the row and thus the
                        • object. The index must be greater than zero and must not appear in thetable more than once. If the index is not in INDEXSTRUCTURE, the systemignores the index.
                          • COSTCENTER - Cost center providing the activity. Must be filled
                          • together with ACTTYPE.
                            • ACTTYPE - Activity type that is provided by the cost center. Must be
                            • filled together with COSTCENTER.
                              • CO_BUSPROC - Business process that provides the activity. If the field
                              • is filled, COSTCENTER must be empty. The system ignores ACTTYPE.

                                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, and the ATTRIB_INDEX fieldto the control data.
                                If one of these is not to be transferred, set the field to zero.

                                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 tables in the VALUE_INDEX field.
                                The ATTRIB_INDEX field may only contain values that are in the transfertable CONTRL in the ATTRIB_INDEX field.

                                Description
                                This is where you transfer the values that describe the activityoutput. These are as follows:

                                • VALUE_INDEX: A unique key for the row referred to in the INDEXSTRUCTURE
                                • table. If the index is not in this table, the system ignores the row.
                                  • ACTVTY_QTY_PER01-16: Activity quantities for periods
                                  • 1-16
                                    • ACTVTY_CAP_PER01-16: Capacity for periods 1-16

                                    • PRICE_FIX_PER01-16 : Fixed price for periods 1-16

                                    • PRICE_VAR_PER01-16 : Variable price for periods 1-16

                                    • PRICE_UNIT_PER01-16: Price unit for periods 1-16.
                                    • Required entry field for filled price fields, otherwise ignored.
                                      • EQUIVAL_NO_PER01-16: Equivalence number for periods
                                      • 1-16

                                        Description
                                        Return table that contains the error messages that were issued.

                                        Description
                                        This is where you transfer the values that describe the activityoutput. These are as follows:

                                        • VALUE_INDEX : A unique key of the row referred to in the
                                        • INDEXSTRUCTURE table. If the index is not in INDEXSTRUCTURE, the row isignored.
                                          • ACTVTY_QTY : Activity quantity for the planned
                                          • periods.
                                            • DIST_KEY_QUAN : Distribution key for the
                                            • activity quantity. A required entry field.
                                              • ACTVTY_CAP : Capacity for the planned periods.

                                              • DIST_KEY_CAPCTY : Distribution key for the
                                              • capacity. Required entry field.
                                                • PRICE_FIX : Fixed price for the planned
                                                • periods .
                                                  • DIST_KEY_PRICE_FIX: Distribution key for the fixed
                                                  • prices. A required entry field.
                                                    • PRICE_VAR : Variable price for the planned
                                                    • periods.
                                                      • DIST_KEY_PRICE_VAR: Distribution key for the
                                                      • variable prices. A required entry field.
                                                        • PRICE_UNIT : Price unit for the planned
                                                        • periods. A required entry if the price fields contained entries.Otherwise, this is ignored.
                                                          • EQUIVAL_NO : Equivalence numbers for the planned
                                                          • periods.