CO-PA Derivation User Exit: What I_DERIVATION_DATE Contains for Actual and Plan Data
In ECC 6.0 CO-PA characteristic derivation (KEDR), the user exit EXIT_SAPLKEDRCOPA_001 (include ZXKKEU11) receives a parameter called I_DERIVATION_DATE. This post records, with the ABAP debugger, which date arrives in that parameter for actual postings and which date arrives for plan data.
Note: screen names, menu paths and settings can differ by SAP release and system configuration. The screenshots are from a Korean-language GUI.
1. What to check
The line inside the user exit that builds a year+period key (P_YMM) from the derivation date:
CONCATENATE I_DERIVATION_DATE(4) '0' I_DERIVATION_DATE+4(2) INTO P_YMM.
| Item | Detail |
|---|---|
| P_YMM format | YYYY0MM (for example 2026009). Used as the lookup key against the period range (FJAHRPER to TJAHRPER) of a profit-center mapping table |
| Question | Which date does I_DERIVATION_DATE carry for an actual document, and which for plan data? |
2. Actual postings
KEDR → Derivation → Test. Enter a company code and a derivation date, set a breakpoint on the line above, and run.
| Derivation date entered | I_DERIVATION_DATE | P_YMM |
|---|---|---|
| 2014.02.01 | 20140201 | 2014002 |
For actual postings the posting date is passed as the derivation date.
3. What got in the way on the KEDR test screen
| Item | Detail |
|---|---|
| Controlling area | There is no input field. When you enter a company code, a standard derivation step fills it |
| Plan/actual indicator | There is no input field. In the test it arrives blank |
| Cost center | The check-table validation (CSKS) runs before the controlling area is derived, so entering a cost center gives a "value does not exist" error. Workaround: set P_COPA_ITEM-AKSTL directly in the debugger |
4. Plan data
| Item | Detail |
|---|---|
| Line item tables | Plan line items are in CE2xxxx, actual line items in CE1xxxx |
| Upload program | Found with RPR_ABAP_SOURCE_SCAN by searching for BAPI_COPAPLANNING_POSTDATA. The source is KP06 cost center planning (COSP) |
| Test procedure | Enter a plan value in KP06 → run the upload program in test mode → the breakpoint on line 41 stops |
5. Values at line 41 on the plan path
| Variable | Value |
|---|---|
| I_DERIVATION_DATE | 20140101 (the plan year was 2019) |
| P_COPA_ITEM-PLIKZ | blank |
| P_COPA_ITEM-PERDE | 000 |
The plan derivation date has nothing to do with the plan period. At the time the exit runs, PLIKZ is not filled yet.
6. Where the plan derivation date comes from
OKEQ → select the version → Settings for operating concern → operating concern details → Derivation date (characteristic derivation date).
This value was 2014.01.01. After changing it to 2019.01.01 and running the upload again, line 41 shows I_DERIVATION_DATE = 20190101.
7. Summary
| Item | Detail |
|---|---|
| Derivation date, actual | Posting date |
| Derivation date, plan | The derivation date in the OKEQ version settings for the operating concern. It has to be updated for each business plan year |
| PLIKZ | Blank when the exit runs, so it cannot be used to tell plan from actual inside the exit |
| Line item tables | Plan CE2xxxx, actual CE1xxxx |
Korean version of this post: blog.naver.com/jeonnow/224413973882
Comments
Post a Comment