Fonction SAP BAPI_PDTRANSCO_POSTPRIMCOST - Transfer of Planning Data: Post Primary Costs

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

Paramètre Reférence Long. Facultatif Description
CONTRL BAPIPCPCTRL 15 X Control Data
COOBJECT BAPIPCPOBJ 70 Object List (Cost Center/Activity Type or Business Process)
INDEXSTRUCTURE BAPIACPSTRU 18 Assignment of Objects, Values and Control Data
PERVALUE BAPIPCPVAL 756 X Plan Values Per Period
RETURN BAPIRET2 548 Error Messages
TOTVALUE BAPIPCPTOT 172 X Plan Values Per Fiscal Year and Distribution Key

Functionality
This method checks whether primary costs can be planned correctly. Itthen updates them.

Example
You want to plan primary costs on cost center 4210, on cost center4220, activity type 110 and on business process 1004210.
You plan each time using cost element 400000 (the cost centers eachwith $2400 fixed and $100 variable, the business process with $3000fixed (controlling area currency)
The table is filled as follows:
INDEXSTRUCTURE:
OBJECT_INDEX | VALUE_INDEX | ATTRIB_INDEX
1 | 1 | 0
2 | 1 | 0
3 | 2 | 0
The zeros indicate that no values were transferred. Instead, the systemtakes the planned values values or the default value from the masterdata.
COOBJECT:
OBJECT_INDEX|COSTCENTER|ACTTYPE|ORDERID|WBS_ELEMENT|CO_BUSPROC
1 | 4210 | | | |
2 | 4220 | 110 | | |
3 | | | | | 1004210
TOTVALUE:
VALUE_INDEX|COST_ELEM|...|TRANS_CURR|...|FIX_VALUE|...|VAR_VALUE|DK|...
1 | 400000 | | | | 2400 | | 100 | |
2 | 400000 | | | | 3000 | | | |
DK is the relevant DIST_KEY_XXXX (distribution key)
TRANS_CURR does not need to be specified in this case. You only need toset the PLAN_CURRTYPE field in the HEADERINFO to "C" (Controlling areacurrency).
The records are then checked and updated by the system.

Description
The Header_Info structure contains 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

  • PLAN_CURRTYPE - Are the prices planned in controlling area, object

  • or transaction currency?
    • PLANTYPE - External source of plan data

    • OBJ_SYS - Logical system of source document

    • OBJ_KEY - Reference key
    • Value range

      • PERIOD_FROM, PERIOD_TO - The following must be valid:

      • 1 <= PERIOD_FROM <= PERIOD_TO <= Number of actual posting periods
        • PLAN_CURRTYPE - The following values are allowed:

        • C - Planning in the controlling area currency
          O - Planning in the object currency
          T - Planning in the transaction currency

          Description
          Transfers the control data.
          These are:

          • ATTRIB_INDEX - A unique key of the rows referred to in the

          • INDEXSTRUCTURE table.
            • RECORD_QUANTITY - Control indicator that defines

            • whether quantities must be recorded in the actual.
              • CELEM_ATTRIBUTE - Cost element attributes.
              • Description

                • OBJECT_INDEX - Index uniquely identifying the row, and thereby the

                • object. The index must be greater than zero and may
                  not appear more than once in the table. If the index
                  does not appear in the INDEXSTRUCTURE, the system
                  ignores the row.
                  • COSTCENTER - Cost center to be planned.

                  • ACTTYPE - Activity type; can only be filled

                  • together with COSTCENTER.
                    • CO_BUSPROC - Business process to be planned.

                    • ORDERID - Order to be planned.

                    • WBS_ELEMENT - WBS element to be planned.

                    • You may fill only one object, COSTCENTER, CO_BUSPROC, ORDERID orWBS_ELEMENT.

                      Description
                      The IDX_STRUCTURE table assigns the contents of the individual tablesto one another. In each row there must be an object that exists in theOBJECT_INDEX field.
                      You can also choose to transfer a row with periodic values from thePER_VALUE table or with annual values from the TOT_VALUE table and arow with control data.
                      The VALUE_INDEX field refers to the values. The ATTRIB_INDEX fieldrefers to the control data.
                      If one of the two is not transferred, the field is set to zero.

                      Value range
                      The OBJECT_INDEX field may only contain values contained in theOBJECT_INDEX field of the OBJECT table.
                      The VALUE_INDEX field may only contain values that are contained in theVALUE_INDEX field of either the PER_VALUE or TOT_VALUE transfer tables.
                      The ATTRIB_INDEX field may only contain values contained in theATTRIB_INDEX field of the CONTRL transfer table.

                      Description
                      Used to transfer values
                      These are:

                      • VALUE_INDEX - A unique key for the row linked to from the

                      • INDEXSTRUCTURE table. If the index does not
                        appear in the INDEXSTRUCTURE, the system ignores
                        the row.
                        • COST_ELEM - Cost element

                        • RESOURCE - Resource

                        • TRANS_CURRENCY_ISO - ISO code of the transaction currency

                        • TRANS_CURR - Transaction currency

                        • UNIT_ISO - ISO code of the unit of measure

                        • QUANTITY_UNIT - Unit of measure

                        • FIX_VAL_PER01-16 - Fixed values for periods 1-16

                        • VAR_VAL_PER01-16 - Variable values for periods 1-16

                        • FIX_QUAN_PER01-16 - Fixed quantities for periods 1-16

                        • VAR_QUAN_PER01-16 - Variable quantities for periods 1-16

                        • The R/3 System does not process the quantity fields if you do notspecify a unit of measure.

                          Description
                          Return table containing any error messages that have occurred.

                          Description
                          Used to transfer values
                          These are:

                          • VALUE_INDEX - A unique key for the row linked to from the

                          • INDEXSTRUCTURE table. If the index does not
                            appear in the INDEXSTRUCTURE, the system ignores
                            the row.
                            • COST_ELEM - The cost element to be planned

                            • RESOURCE - The resource to be planned

                            • TRANS_CURRENCY_ISO - ISO code of the transaction currency

                            • TRANS_CURR - Transaction currency

                            • UNIT_ISO - ISO code of unit of measure

                            • QUANTITY_UNIT - Unit of measure

                            • FIX_VALUE - Fixed value

                            • DIST_KEY_FIX_VAL - Dist. key for the fixed value. Req. entry field

                            • VAR_VALUE - Variable value

                            • DIST_KEY_VAR_VAL - Dist. key for variable value. Req. entry field

                            • FIX_QUAN - Fixed quantity

                            • DIST_KEY_FIX_QUAN - Dist. key for the fixed qty. Req. entry field

                            • VAR_QUAN - Variable quantity

                            • DIST_KEY_VAR_QUAN - Dist. key for the variable qty. Req. entry field

                            • The R/3 system only processes the quantity fields if you have specifieda unit of measure.