Ansicht
Dokumentation
EXIT_SAPMKPT4_010 -
CL_GUI_FRONTEND_SERVICES - Frontend Services General Material DataThis documentation is copyright by SAP AG.
Functionality
This customer exit lets you change the data records selected by the transactions KP97 (Copy planning) or KP98 (Copy actual to plan) before executing the update. This is an enhancement to the standard functionality of these transactions.
Interface description for the module
The interface of this module consists of three parameters IS_PARX, ID_PQPLAN und CT_KPLV2. The first two parameters supply you with useful additional information, while the actual changes to the planning records occur in the table parameter CT_KPLV2.
- IS_PARX contains the relevant control parameters for the transaction and the copying transaction. It is structured as follows:
Fieldname | Description |
---|---|
FLG_MODUS | Indicator: Copying type |
"P": Copy planning(KP97) | |
"A": Copy Actual to Plan(KP98) | |
KOKRS | Controlling area |
VRGNG | Planning transaction |
FLG_TEST | Indicator: Test run |
"X": Test run | |
" ": Live run | |
FLG_UPDATE | Indicator: |
"X": Reset and overwrite data | |
" ": Do not change data | |
SGJAHR | Reference: Fiscal year |
SPERAB | Reference: First period |
SPERBI | Reference: Last period |
SVERSN | Reference: Version |
TGJAHR | Target: Fiscal year |
TPERAB | Target: First period |
TPERBI | Target: Last period |
TVERSN | Target: Version |
- The leading currency is stored in parameter ID_CURSW_C. The system uses this currency to determine the other currencies (for example, object currency) via translation.
"T": Transaction currency
"C": Controlling area currency
"O": Object currency
- Table CT_KPLV1 contains the read plan- and actual records, and refers to structure
RKPLV1 in the DDIC. This contains a description of the individual fields. Note that all changes made in this table are transferred, and, if required, updated in the planning interface.
- Table CT_RKU0RJA contains the plan values for the recipe to be copied. The mutual
assignment of the data records in tables CT_RKU0RJA and CT_KPLV1 is made through the R_INDEX field. Rows in these two tables that have the same R_INDEX-value (not zero) belong together. Note that the
CT_RKU0RJA table is only used for the copying of plan data. For more information about this table, see the DDIC.
Example
To demonstrate the access and handling of the interface data, Include LXPLVF01 for transaction KP98 (Copy plan to actual) contains example coding for the following applications:
- Different cost elements are to be grouped into one cost element (Routine Costelements_Collect).
- The average of a period interval is to be projected on to specified periods (Routine Periods_Extrapolate).
The source code contains commentaries to aid understanding.
Routine Costelements_Collect
This Routine groups multiple actual cost elements for a given fiscal year into plan cost elements. using the following table:
Act.CElem. | Plan CElem. | |
---|---|---|
416400 | 416999 | |
416500 | 416999 | |
420000 | 420999 | |
421000 | 420999 | |
422000 | 420999 | |
430000 | 430000 |
Routine Periods_Extrapolate
You want to project the data for periods 11 to 12.
First, the system determines the average value for each of the specified cost elements for periods 1 to 10. Then, the value fields for periods 1 to 10 are deleted and the mean value is distributed on periods 11 to 12.
Notes
To test this example coding, create cost center
Create cost element group CE_KOAGRP1 in cost element accounting. Beneath this group you can insert the groups
Group | Value |
---|---|
416400 | |
416500 | |
420000 | |
421000 | |
422000 | |
430000 |
For each group choose
Extras -> Report Info... to store a representative value.
For group
Activate the example coding by inserting the row
PERFORM main_program TABLES ct_rkplv1 USING is_parx id_cursw_c.
in function module EXIT_SAPMKPT4_010 of function group XKPT4.
- in the top include of this function group, enter the row
INCLUDE lxkpt4f01.
Start KP98 with cost center
Further information
For more information, see the comments in the source coding of the example.
PERFORM Short Reference General Material Data
This documentation is copyright by SAP AG.
Length: 7967 Date: 20240425 Time: 135401 sap01-206 ( 83 ms )