Fonction SAP BAPI_COSTACTPLN_READACTINPUT - Activity Input 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
COOBJECT BAPIACIOBJ 70 Object List
INDEXSTRUCTURE BAPIACISTRU 12 Assign Objects and Values
PERVALUE BAPIACIVAL 418 X Plan Values Per Period
RETURN BAPIRET2 548 Error Messages
TOTVALUE BAPIACITOT 186 X Plan Values Per Fiscal Year and Distribution Key

Functionality
This method reads activity input records.

Example
You want to know what activity input quantities are planned on costcenter 4210 from cost center 4220 / activity type 110 and on businessprocess 1004210.
To do this, you can fill the tables as follows:
INDEXSTRUCTURE:
OBJECT_INDEX | VALUE_INDEX
1 | 1
1 | 2
COOBJECT:
OBJECT_INDEX|COSTCENTER|ACTTYPE|CO_BUSPROC|ORDERID|WBS_ELEMENT
1 | 4210 | | | |
TOTVALUE:
VALUE_INDEX|SEND_CCTR|SEND_ACTIVITY|SENBUSPROC|...
1 | 4220 | 110 | |
2 | | | 1004210 |
The value and unit fields are then filled accordingly. Note that theVALUE_INDEX field in the INDEXSTRUCTURE table needs to be filled withunique values (unlike the write BAPIs), meaning that they can only beentered once since the system needs to be able to make a uniqueassignment to an object of the values to be read.

Description
The header_info structure contains the following fields:

  • CO_AREA - Controlling area

  • FISC_YEAR - Fiscal year

  • PERIOD_FROM - First period

  • 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 in integrated
  • planning
    • PLAN_CURRTYPE - Is ignored as only used for internal purposes
    • 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 must not be in thetable more than once. If the index is not in the INDEXSTRUCTURE thenthe system ignores the row.
          • COSTCENTER - Cost center that receives the activity.

          • ACTTYPE - Activity type that receives the activity.
          • This must be filled together with COSTCENTER and is only required foractivity-dependent activity input.
            • CO_BUSPROC - Business process that receives the
            • activity.
              • ORDERID - Order that receives the activity.

              • WBS_ELEMENT - WBS element that receives the
              • activity.
                Only one object can be filled, either COSTCENTER, CO_BUSPROC, ORDERIDor WBS_ELEMENT.

                Description
                The IDX_STRUCTURE table assigns the contents of the tables to eachother . Each row must use an object that is listed in the OBJECT_INDEXfield. In addition, you can either transfer a row with periodic valuesfrom the PER_VALUE table or with annual values from the TOT_VALUE tableas well as a row with control data. The VALUE_INDEX field refers to thevalues in this case.

                Value range
                The OBJECT_INDEX field may only contain values that are also in thetransfer table OBJECT in the OBJCT_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.

                Description
                This is where you transfer the values that refer to the sender of theactivity relationships. These are as follows:

                • VALUE_INDEX: A unique key of the row that is referred to in the
                • INDEXSTRUCTURE table. If the index is not in this table, the systemignores the row.
                  • SEND_CCTR: Sending cost center that must be filled
                  • together with SEND_ACTIVITY.
                    • SEND_ACTIVITY: Sending activity type that must be
                    • filled together with SEND_CCTR.
                      • SENBUSPROC: Sender business process. You must either
                      • specify this field or SEND_CCTR/SEND_ACTIVITY.
                        • ORDER_CELEM: Order settlement cost element. You only
                        • need to specify this if an order is to be planned with a sender.
                          • QUANTITY_FIX_PER01-16: Fixed quantities for periods
                          • 1-16.
                            • QUANTITY_VAR_PER01-16: Variable 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 sender of theactivity relationships. These are as follows:

                              • VALUE_INDEX : A unique key of the row referred to in the
                              • INDEXSTRUCTURE tabe. If the index is not in INDEXSTRUCTURE, the systemignores the row.
                                • SEND_CCTR : Sending cost center, must be filled
                                • together with SEND_ACTIVITY.
                                  • SEND_ACTIVITY: Sending activity type, must be filled
                                  • together with SEND_CCTR.
                                    • SENBUSPROC : Sender business process. You either
                                    • need to specify this field or SEND_CCTR/SEND_ACTIVITY.
                                      • ORDER_CELEM : Cost element for order settlement.
                                      • You only need to specify this if you want to plan an order with asender.
                                        • QUANTITY_FIX : Fixed quantity for all periods.

                                        • DIST_KEY_QUAN_FIX: Distribution key for
                                        • QUANTITY_FIX. This is a required entry field.
                                          • QUANTITY_VAR : Variable quantity for all periods.

                                          • DIST_KEY_QUAN_VAR: Distribution key for
                                          • QUANTITY_VAR. This is a required entry field.