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.
Showing results for 
Search instead for 
Did you mean: 
SAP Project Manufacturing Management and Optimization in S/4HANA helps achieve greater efficiency with project manufacturing in an Engineer to Order (ETO) environment to deliver complex end products (e.g. military aircrafts, ships and submarines, complex industrial machinery etc.), that often involves complex engineering and production processes. On the other hand, it maintains visibility into detailed actual cost reporting and progress analysis for non-valuated grouped project stock.

I encourage you to check out the new features that were released in S/4HANA 2021 FPS0 release. In this blog post, I would like to explain the costed stock gain feature in Project Manufacturing Management and Optimization (PMMO).

Stock Gain

Inventory gains and losses during inventory counts are exceptional cases but not uncommon within project manufacturing. These inventory adjustments often have an impact on the allocation of project costs. In this release, stock gains in grouped project stock segment can be allocated costs which can be critical for high value parts that are found.

The following are some of the key movement types that result in stock gains:

501/Q - Goods Receipt without Purchase Order

521/Q - Goods Receipt without Production Order

531/Q - Goods Receipt by-product

701/Q - Goods Receipt of Physical Inventory Differences

The default behavior in PMMO when stock gains are posted for a given material is to create a dummy replenishment element (in the format SG + Material Document Number + Material Document Item + Material Document Year) for any quantity exceeding prior loss quantity. This dummy replenishment element is not a cost object and therefore cannot carry any costs. Therefore, from a cost perspective, the dummy replenishment element is allocated at zero cost to the assigned operative WBS element based on the pegging assignments.

PMMO offers the capability to allocate costs to stock gains. Instead of the dummy replenishment element, a production order without header material or components is created in the background during the material document posting of the stock gain movement. This enables assigning costs to this order and later distributing the costs to the individual projects within the group as part of PMMO Distribution.

Let's take a look at the configuration and an example.

Costed Stock Gain Configuration

Transaction: PMMO_IMG

Integration Materials Management (MM) - Inventory Management (IM) -> Configure Client Specific Setting for Integration

The highlighted fields above control whether a production order without header material and without any component is created in the background when stock gains are posted for grouped project stock. If either or both the fields are left empty, then the dummy replenishment element is created.

The stock gain order type refers to the Production Order type that is configured for stock gains. This way, you can easily identify such production orders to manually post costs. The reference operation set defines the routing and the operation for the stock gain production order created without header material.  The reference operation set can be created via transaction code CA11.

To enable costed stock gain, I have set the stock gain order type and the reference operation set as shown below.

Note that the setting is client wide. You can turn on or off the costed stock gain for the entire client. Therefore, the setting affects all allowed movement types that are assigned the category "Stock Differences". For more information, see help documentation.

Costed Stock Gain

Now, let's run the scenario with costed stock gain in PMMO.

Below is the pegging assignment results for an example I setup before the inventory gain is posted.

Next, during inventory count (transaction code MI10), let's say instead of 10 EA of the semi-assembly PMMO_TEST_S2 material, 11 EA was counted in the group WBS stock segment. Therefore, a material document for 1 EA with movement type 701/Q is posted. While this material document is posted, a production order is created in the background and saved in the PMMO_STOCK table.

Below is the pegging results after the inventory gain is posted. The production order created as a stock gain is now visible in the pegging result.

Navigating to the production order, you will notice the production order does not have a header material and is account assigned to the group WBS element stock segment. The production order is also released automatically when the material document is posted.


With the costed stock gain feature, you can now post primary and secondary costs on this production order using the relevant transactions (KB11N, KB21N). Note that the determination of the actual costs are customer specific. Check out the PMMO roadmap, in S/4HANA 2022 release, there is a roadmap item to deliver a standard report for order cost rollup. This report would be relevant to help determine costs for the same material from a similar order. Once the costs are posted, the stock gain production order can be set to completed and closed. PMMO Distribution will pick up the costs for the stock gain order and distribute the costs to the assigned WBS based on PMMO Pegging assignments.

Note also that inventory count differences for project stock at vendor (Stock Type R) is also supported in PMMO. I plan to publish a blog post on subcontracting features in PMMO, so stay tuned.

I hope you found this blog post useful. I am looking forward to your comments and questions below.

Thank you!