Hi guys, this is my first blog in the community here. This time I will share my experiance for resvoling CK466 error which puzzled me a lot once before. I was serach CK466 in this community and found quite often questions casued by missing activity price in KP26. In this case, you can use COFC to postprocess the CO document when you update price without reverse previouse confirmation.
However still some CK466 casued by mistical reason behind. The solution given by the blog is not only valid for CK466 also valid for other CK errors during confirmation process.
Once we confirm the order, the correspondence CO document will be generated at the same time. The following prerequisites must be fulfilled for logistics so that Controlling documents (CO documents) can be created during a confirmation:
For example,CK466 error occurred may due to different reason, one of them is due to plan price set too small.
e.g.cost center1074502 with activity type 74RM1 in 2016 01, the price in object currency is CNY 0.05. With the exchange rate, the price in controlling area is CHF 0. This will cause error CK466 happens
Then you can use either transaction CO1P or the report CORUPROC to post CO document.
The other reason may due to activity type is changed or of which valid date is not fitable. For example, the valid period of activity type defined in work center is bellowing:
However, the order planning cost was occured during order creation on 16-Dec-2015
As a result, no valid activity type is copied into order :
The planning cost of order had no value of activity. During the confirmation, the CK466 occured due to no valid actitity type used. You can apply SAP note 162906 which is forced that during the determination of actual costs in general the activity type of the work center valid for the posting date is used. Thus, the activity documented in the activities of the order is used only for the standard cost estimate but not for the actual costing.
How to find out root cause of actual costing errors and resolve it? You can check the following
If errors occur in this case, error records are again created for them for the reprocessing.
If you want to change CO document posting date due to some reason, you shall use program 'ZAFRC' to further process.
Program 'ZAFRC' provides the following functions:
Parameter:
You can execute program ZAFRC in the test mode (parameter 'TESTRUN'). No database changes are made in this mode.
The number of the records to be edited can be entered into parameter 'NUMBER'. On the one hand, you can divide into portions, on the other
hand, you can test with a small dataset (for example, 1) first. This procedure is highly recommended by SAP!
If you want to change the posting date, you must enter the new posting date into parameter 'PDAT_NEW'. All records are changed for which
its date is before the date entered into parameter 'PDAT_TO'. We recommend to select the date in field 'PDAT_TO' so that every earlier date falls into a
completed posting period. You must always enter parameters 'PDAT_NEW' and 'PDAT_TO' together. Remark: the changing of the posting date has no effect on the reprocessing of failed goods movements via Transaction COGI. After run, the new posting date will be update:
If all costs errors are issued in a list, you must enter parameter 'PROTOCOL'.
You can restrict the processing to certain order types (for example, network) via parameter 'ORDERTYP'
3.Have you changed activity types or the work center of the confirmed operation after releasing the order? When you create an order, the system copies activity types that are valid at this time from the work center. Nevertheless, if you create confirmations at a point in time at which the validity is expired or work center data was changed manually, the determination of actual costs occurs with the original activity types in the order. Therefore, the confirmed activities are either incorrectly valuated, or a valuation cannot occur because the activity type is no longer valid in the meantime.
You can subsequently update the data if you change (and save) the work center in the production order for a short time and immediately reset it
to the original work center. The subsequent confirmation then generates the updated data and activities.
If confirmations were made for the wrong activity types then you must take account of the following:
In general the confirmations should be cancelled in the production order before the work center is changed. The work center is then updated using the procedure mentioned above. Then the confirmations have to be created again.
CAUTION !!!
If confirmations have mistakenly been created for activities for which no costs have been calculated - for example because no activity types
were maintained in the work center - then the confirmations must be cancelled before changing the work center in the production order! Otherwise when you
cancel the confirmations negative costs are generated! Only then can the confirmations be created with the corrected activities.
4.If you confirmed to a different work center than you have planned, this work center would be proposed for this operation during all further confirmations. For example, if no activity types are assigned to this work center, no costs will be posted during the confirmation although costs could have been planned.
5.Have you changed the attributes of an operation control key involved in the Customizing after creating an order? Example: When
you create an order, an operation is not relevant to costing because of its operation control key. This is noted in the operation data (AFVC-SELKZ = " "). If you change the operation control key in the Customizing afterwards so that it is relevant to costing, this information cannot be transferred to the orders involved. If you enter a confirmation for the corresponding order, no costs will be posted.
If you want to further check program, you can refer bellowing :
Branching from the confirmation to CO:
You call the form routine DET_CONF_COST (LCORFFD1 or LCORFF40) in the function module CO_RU_CONF_POST.
No reprocessing possible using transaction COFC:
When you enter confirmations via the time sheet (CATS), you could transfer times that are in a locked posting period. You can display these
records in transaction COFC after the transfer. For these records, you must either reopen the posting period or change the posting date in the confirmation
records as specified in SAP Note 212705 or in SAP Note 301574.
Debugging help:
Subroutine DET_CONF_COST (LCORFF40):
* Istkostenermittlung nur wenn "Kalkulationsvariate Ist
* gesetzt" ist
CHECK NOT CAUFVD_TMP-KLVARI IS INITIAL.
* CO-Baustein zur Kostenermittlung aufrufen
CALL FUNCTIONTKOMP-FUNCTION
EXPORTING
CAUFVD_IMP = CAUFVD_TMP
PROTOCOL = SPACE
EXCEPTIONS
NO_COSTING = 01.
Function module CK_F_ACTUAL_COST_CALC (LCK00U05):
* Keine Kostenermittlung ohne Kalkulationsvariante
PERFORM CHECK_KLVAR USING CAUFVD_IMP-AUART
CAUFVD_IMP-KLVARI
SYSUB.
* KALKTAB-Einträge zu Rückmeldungen generieren.
CALL FUNCTION 'CK_F_AFRU_AMOUNT_CALC'
EXPORTING
CAUFVD_IMP = CAUFVD_IMP
CKCOUEB_IMP = CKCOUEB_HDR
OPS_SETTEL = VORGANGSKONTIERUNG
EXCEPTIONS
NO_ENTRY =01.
Function module CK_F_AFRU_AMOUNT_CALC (LCK01U06):
* Arbeitsplatz gesetzt ?
CHECK NOT AFRUD_TMP-ARBID IS INITIAL.
* Nur kalkulierbare Vorgänge
CHECK NOT T430_TMP-KALKZ IS INITIAL.
CHECK NOT AFVGD_OPR-SELKZ IS INITIAL.
* Fremdbearbeitung obligatorisch ? Oder optional und
* keine Eigenbearbeitungsdaten ? Dann abbrechen.
CHECK (T430_TMP-LIEF IS INITIAL ) OR
(T430_TMP-LIEF = 'X' AND
( NOT AFRUD_TMP-ARBID IS INITIAL ) ).
IF RCR01_TMP-KOSTL IS INITIAL.
CALL FUNCTION 'CM_F_MESSAGE'
EXPORTING
ARBGB =C_MSGID
MSGNR ='282'
MSGTY ='E'
MSGV1 =AFRUD_TMP-WERKS
MSGV2 =RCR01_TMP-ARBPL
EXCEPTIONS
MESAGE_TYPE_NOT_VALID = 01
NO_SY_MESSAGE = 02. Der Arbeitsplatz <(>&<)> hat keine Kostenstelle RAISE NO_ENTRY.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |