Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Standard Production Order Settlement


When a Production Order is settled using the standard settlement process, the actual costs (value type 4) incurred on the Production Order are settled to one or more receiver cost objects. The receiving cost object can be a cost center, WBS element, Sales Order etc. The settlement receiver is determined from the settlement profile specified on the Order Type. In this blog post, I would like to share insights when settling orders that are account assigned to a grouping WBS element and therefore relevant for PMMO.

Project Manufacturing Management and Optimization


With Project Manufacturing Management and Optimization (PMMO) in S/4HANA, you can combine and group requirements across multiple WBS elements (that can belong to the same or different Projects) into one or more grouping WBS elements for common inventory management and MRP planning.

Cost Distribution in PMMO


With PMMO, pegging (transaction code PMMO_PEGGING) establishes the relationship between the replenishments (for example, purchase orders, production orders) account assigned to grouping WBS elements to the individual operative WBS elements that generated the demand. PMMO Distribution uses the pegging assignments to move the costs the costs proportionally from the grouping WBS elements to the individual WBS elements based on the Pegging Assignments. If Breakpoints are used, then the costs could be distributed to a different WBS element or a network activity or cost center.

One important factor to consider when using PMMO (or the predecessor Grouping, Pegging, Distribution - GPD in short) is that the PMMO Distribution run (transaction code PMMO_DISTRIBUTION) is performing the settlement of actual costs from Production Orders, by distributing the costs on the Production Order that are account assigned to a grouping WBS element to an operative WBS element (or an alternative breakpoint cost object like network activity or cost center). Therefore, such Production Orders that are account assigned to a grouping WBS element should never be settled via the normal settlement process (using transaction code KO88 or CO88 or report RKO7CO88). In case these orders are settled via the normal settlement process, costs will be settled from the Production Order to the settlement receiver (for example, another WBS element). The controlling postings generated from the Production Order settlement typically have the business transaction KOAO. However, PMMO Distribution would distribute the actual costs (business transaction RKL) from the production order again (irrespective of whether the order was settled or not) causing the balance on the order to become negative leading to reconciliation issues during period end closing.

PMMO Distribution specifically excludes reading cost postings on production order that were generated from settlement process based on the following business transactions:

  • KOAO (Actual Settlement)

  • KOAQ (Debit from Actual Settlement)

  • KOAR (Credit from Actual Settlement)

  • KOAV (Settlement of Variance Data)

  • KOAW (Settling Results Analysis Data)


This is to ensure that the actual cost postings on such production orders are distributed by PMMO Distribution to the correct cost receivers based on the PMMO Pegging Assignments.

Enhancement options to prevent Order Settlement


This blog explains how you can prevent Settlement of such production orders, which are account assigned to a grouping WBS element and that are to be only settled via the PMMO Distribution process.

The simplest approach one might think as a solution is to use the “Not for Settlement” option in the settlement profile (transaction code OKO7).


Since the settlement profile is assigned to an order type (transaction code OPJH), this means that any Production Order that is created with this order type, irrespective of whether the account assignment is a grouping WBS or not, cannot be settled. Therefore, this solution can be only effective if all orders of this order type will have a grouping WBS as the account assignment. Unfortunately, there is no configuration option that is available to exclude production orders that are account assigned to a grouping WBS to be not settled.


One alternative is to use a custom user status, that can be set on a production when account assigned to a grouping WBS and this custom user status can be configured to disallow settlement. One drawback with this approach is that the settlement run would write errors in the log for all such orders with the custom user status set. Further, the user status must be either set manually or via a batch process that scans all production orders account assigned to a grouping WBS element.

There are no standard checks when creating a production order, if the production order has a settlement profile (stored in table COBRA) and is account assigned to a grouping WBS. Another alternative to consider is to change the settlement profile while creating and saving a production order so that the configured settlement profile for the order type is not used, however an alternative settlement profile configured to be “Not for Settlement” is saved in the production order when account assigned to a grouping WBS element. This would have to be done within the production order BADI (perhaps in one of the methods of  WORKORDER_UPDATE BADI).

Recommendation


I had been looking to identify a suitable BADI within the order settlement where a custom enhancement could be implemented to check whether the order is account assigned to a grouping WBS and skip the settlement process. The only BADI that was promising was K_SETTLEMENT_3 (method MODIFY_SRULE), which unfortunately is an SAP internal BADI. Therefore, customers and partners are not allowed to implement it without modification.


The solution which I would recommend and would like to share here is to use an enhancement point rules_read_01 that is available in include LKO72F30 within the order settlement. See below code snippet that can be added in this enhancement. The check is performed for only production orders and those that are account assigned to a grouping WBS element. If this condition is met, then the settlement profile is changed within this enhancement to a different settlement profile that is configured as “Not for Settlement”. In the below code snippet, I have configured the settlement profile NS1 as “Not for Settlement”. Therefore, the order settlement is skipped for this production order causing the balance to be only distributed by PMMO Distribution.
ENHANCEMENT-POINT rules_read_01 SPOTS es_saplko72 .
*$*$-Start: RULES_READ_01-----------------------------------------------------------------------$*$*
ENHANCEMENT 1 ZKB_READ_SETTLEMENT_RULES. "active version
*Enhancement code

"check for standard production order
IF auak-objnr(2) = objektart_or.
DATA: lv_aufnr TYPE aufnr.

"Get production order number
lv_aufnr = substring( val = auak-objnr off = 2 len = 12 ).

DATA: lv_projn TYPE ps_posnr.
"Find account assignment WBS
SELECT SINGLE projn FROM afpo INTO @lv_projn WHERE aufnr = @lv_aufnr.
IF sy-subrc = 0.
DATA: lv_grpkz TYPE grpspkz.

"Check if account assignment WBS is a grouping WBS
SELECT SINGLE grpkz INTO @lv_grpkz
FROM prps
WHERE pspnr = @lv_projn
AND grpkz IN ('1','2').

IF sy-subrc = 0.
CLEAR cobra-absch.
"change to settlement profile "Not for Settlement"
cobra-aprof = 'NS1'.
ENDIF.
ENDIF.
ENDIF.

ENDENHANCEMENT.
*$*$-End: RULES_READ_01-----------------------------------------------------------------------$*$*

Conclusion


This enhancement works whether you try to settle the order individually (using KO88) or collectively (using CO88 or report RKO7CO88). With this enhancement in place, when you run order settlement, any production order that is account assigned to a grouping WBS element would not be settled.

To test the enhancement, I have created a production order account assigned to a grouping WBS element and posted actual costs on the order.


Without the enhancement, if the order is settled, the result is that the order settlement will try to settle the balance on the order to the receiving cost object.


With the enhancement, if the order is settled, there are no changes to the balance on the order as there is no settlement. However, all other orders that are not account assigned to a grouping WBS element will be settled.


If you are using PMMO Distribution in S/4HANA, I recommend you understand the implications of order settlement and consider this during the project implementation. I hope you find this blog useful. Feel free to check out my other blog posts on PMMO.
1 Comment