Fonction SAP BAPI_PDTRANSCO_CHECKPRIMCOST - Plan data transfer: Check 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.

Example
You want to plan primary costs on cost center 4210, cost center 4220,activity type 110, and business process 1004210.
In each case, you plan using cost element 400000 - both cost centerswith $2400 fixed and $100 variable, (controlling area currency), thebusiness process with just $3000 fixed.
You fill the tables 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. The system takesthe planned values or the default values from the master data instead.
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 DIST_KEY_XXXX (distribution key) in each case.
TRANS_CURR does not need to be specified here. You only need to set thePLAN_CURRTYPE field in the HEADERINFO to "C" (Controlling areacurrency).
The system then checks the records accordingly.

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 - Final period for which values are transferred

  • PLAN_CURRTYPE - Are the prices to be planned in the CO area-,

  • object-, or transaction currency?
    • PLANTYPE - What type of source supplies the data?

    • OBJ_SYS - Logical system of the data source

    • OBJ_KEY - Reference key of the data source
    • 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
          T - Planning in 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 in the table more than once.
                  If the index does not occur 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.

                    • Only one object may be filled, 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
                      Transfers the following values:

                      • VALUE_INDEX - A unique key of the row referred to in the

                      • INDEXSTRUCTURE table.
                        If the index does not appear in 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 system only takes into account the quantity fields if you havedefined a unit of measure.

                          Description
                          Return table containing error messages that have occurred.

                          Description
                          Contains the values that are updated, namely:

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

                          • INDEXSTRUCTURE table.
                            If the index does not appear in 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 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 fixed quantity. Req. entry field

                            • VAR_QUAN - Variable quantity

                            • DIST_KEY_VAR_QUAN - Dist. key for variable quantity. Req. entry field

                            • The quantity fields are only processed if you have specified a unit ofmeasure.