Find the constraint

capacity evaluation in PP

The topic of this blog post is to show you how can SAP PP help you to find the constraint on the shop floor.
If you use ToC (Theory of Constraint) in your plant or you would like to or you are at least aware of ToC and its principles then you know that its keystone is knowing your constraint. How to find a constraint in your production using SAP, that is the topic of my post.

In SAP PP there are standard transactions for capacity evaluation and planning like CM01 and other CMXX transactions using actual data and CM38 for Planning Scenarios. Working with these TAs to get the overall picture about the distribution of capacity loads and overloads across the entire plant is quite challenging. That was the reason I decided to build my own tool which I could customize to my own requirements. From the beginning of my journey, I was trying to use SAP function module CY_FILL_KUBEL. Without having the right documentation, it was hard and almost impossible to get what I wanted. Eventually, I decided to take another approach.
In the coding below you can see my way through with all needed notes. The function of the code is very simple and straightforward. Through parameters you can select capacity IDs and the time area (from, to) you are focusing on. Then it provides the basic tables for each selected ID with available capacity for time period chosen above and with a time grid selected by the parameter p_peart ( Methode get_available => FM ‘CR_CAPACITY_PERIODS’ and ‘CR_CAPACITY_AVAILABLE_PERIODS’ ). You can choose whether to go on with a sum from the table (as in my case) or to use load_tab for details according to your preferences and time grid. The next method provides a sum of all capacity requirements for the capacity ID and time area (expanded by backlog, which is set by the parameter p_back) using the internal table lt_kbeds. The function module ‘CY_AMOUNT_KBED_COMPUTE’ provides the exact amount of the duration for each working step according to settings in work-centre master data. In the last step, the sum of capacity requirements and available capacity are divided to get the percentage of the capacity load.

Here is my coding….

If it is run through all your capacity IDs you can get the ID with the highest load for the time interval which shall be than your constraint you are looking for. With this constraint, according to ToC, you can proceed to 5 focusing steps where SAP can help you too. But this topic is for another blog post. 🙂

Leave a Reply

Your email address will not be published.