ErpDetails.Com

MRP with SAP S4 HANA

Why use MRP with SAP HANA?

SAP HANA, a new technology, was introduced in 2010. SAP HANA was a revolutionary in-memory columnar database that could significantly improve application performance. With SAP HANA, software engineers could create previously impossible-to-create applications, and existing applications could be executed faster than ever before.
Following the release of SAP HANA, SAP began redesigning applications in its portfolio to make the most of this new technology. It began with SAP Business Warehouse (SAP BW) powered by SAP HANA, which was a huge success, and quickly progressed to material requirements planning (MRP).
But why was it necessary to redesign MRP in order for it to run on SAP HANA?
MRP selects data from a wide range of application areas (sales orders, production orders, purchase orders, stocks, and so on) and consumes a large amount of it.

But why was it necessary to redesign MRP in order for it to run on SAP HANA?
MRP selects data from a wide range of application areas (sales orders, production orders, purchase orders, stocks, and so on) and consumes a significant amount of database resources. Because hundreds of materials are planned at the same time, MRP typically takes hours to complete and is often scheduled to run overnight as a background job to avoid disrupting the business.
MRP was designed to work with traditional relational databases; the source code and database selects were optimized to improve performance.

Overall MRP performance over time. The approach was to use an ABAP code to process and validate each record selected from the database.
This record would then be saved into an internal table, and a new record from the database would be chosen.
This logic works extremely well with traditional relational databases. However, if we applied the same logic to MRP on SAP HANA, a critical feature of SAP HANA, parallelization, would be underutilized.

Because of the multi-core parallelization in SAP HANA, multiple tables can be selected and processed at the same time. Processing records one by one in the ABAP code would be extremely inefficient in this case because parallelization would not be used.
As a result, SAP decided to redesign the MRP logic in order to achieve maximum performance with SAP HANA.

The classic MRP transactions were optimised to run in a SAP HANA database as of Enhancement Package (EHP) 6 for SAP ERP 6.0, version for SAP HANA. The same transactions are used, but the logic for reading data from the database has been completely rebuilt. Now, the entire database selection is triggered at once, and SAP HANA can improve MRP performance by leveraging the power of parallel processing.

This optimization, however, was insufficient because it only optimised the database selection. SAP has rebuilt MRP from the ground up as of EHP 7. MRP Live, a new version of MRP, was created, and MRP is now run through a new transaction. The MRP logic (beginning with database selection, proceeding through net requirements planning, and finally saving the results on the database) is not executed directly on SAP HANA in MRP Live.
SAP Fiori applications (apps) were also delivered in EHP 7 to monitor material coverage, requirements, and manage shortages. These apps represent the first step in moving SAP ERP to the cloud, as they are a new multi-platform interface.

We have, of course, everything from previous releases in the latest SAP S/4HANA release: performance optimizations in classic MRP, MRP Live, and Fiori apps. Aside from that, SAP has used a “simplification” strategy with MRP, and some scenarios have been reviewed to make MRP implementation easier and faster.

Activation and Prerequisites

The primary database must be SAP HANA in order to activate performance optimizations for MRP on SAP HANA. In other words, if SAP HANA is used as a side-car database, MRP cannot be run on it. This is required because MRP will not simply read data from the database when running MRP Live, but will instead execute the entire MRP on SAP HANA.
Furthermore, you must be running SAP ERP 6.0 EHP 6 for SAP HANA (SAP APPL 616) or later to take advantage of performance optimizations for classic MRP transactions. Your system must be running SAP ERP 6.0 EHP 7, Support Package 1 (SAP APPL 616) or later to run MRP Live.

To use the MRP SAP Fiori apps, SAP ERP 6.0 EHP 7 must have Support Package 8 or higher installed.
In the following sections, we will go over all of the steps required to get the system ready to run MRP on SAP HANA.

Cleanup of All Requirements

Total requirements for sales orders or dependent requirements cannot be used to activate MRP on SAP HANA. SAP HANA no longer supports aggregate requirements because they can now be aggregated at runtime. As a result, before proceeding with the business function activation, ensure that no material has total requirements.
Table RQIT stores the total dependent requirements. As a result, you should see if there is anything in this table. If you see an entry in this table, it is because there is a repetitive manufacturing profile (Transaction OSP2) with the Aggregate reqmts setting (aggregate requirements)

Check to see if this setting has been removed from the repetitive manufacturing profile or if the profile with this setting is not being used in any material.
Following these changes, you must run MRP, re-exploding the bills of materials (BOMs) of the planned orders that have an entry on table RQIT. Running an MRP total planning run with the key NEUPL and parameter planning mode set to 2 – Re-explode BOM and routing is the simplest way to accomplish this. If you only have a few materials, you can plan them individually with Transaction MD02 and the same planning mode.

Table VBBS stores the total sales requirements. If you see a record in this table, it means you’ve created a checking group for an availability check with the total records per day set on customising.
This option is typically found in the MRP3 tab of the material master (Transaction MM02). The standard checking group delivered by SAP with total records is the available-to-promise (ATP) checking group (Availability Check).

A custom checking group with total requirements is also an option. In this case, you must double-check the entries in the Define Checking Groups customizing activity.

You should run report SDRQCR21 from within Transaction SE38 to recreate sales orders and delivery requirements after ensuring that the ATP checking group is not used in any material and that there is no custom checking group with total records per day. After running the report, there should be no records in table VBBS.

Business Function LOG_PPH_MDPSX_READ

To enable the enhancements required to execute MRP on SAP HANA, we must first enable business function LOG PPH MDPSX READ.
In the Switch Framework, activation can be triggered (Transaction SFW5).
Warning
Because this is a delicate process, you should contact your system administrator before proceeding.
SAP recommends that you close the system to other users and that no background jobs are executed during business function activation.
Please keep in mind that this specific business function is reversible, so you can deactivate it later if necessary. A business function, on the other hand, cannot be disabled on a production system.

Note
For more information on this procedure, see SAP Note 1641394: How to activate Business Function in Switch Framework (SFW5).
To activate the business function, check the Planned Status flag in the business function LOG PPH MDPSX READ and click the Activate Changes button as shown in Figure .


The popup shown in Figure will be displayed, in which you need to
confirm the changes by pressing Activate change button.

Figure Popup Confirming the Business Function Activation

Following that, another popup screen will appear informing you that a background job has been initiated to implement the necessary changes and activate the business function.

Figure Popup That a Background Job Was Triggered

The Job Overview screen (shown in Figure ) allows you to monitor the execution of the background job (Transaction SM37).

Figure Status of the Background Job

On this screen, you can review the job log to ensure that no errors occurred during the process. If all of the message types indicate success, as shown in Figure , your system’s business function has been correctly activated.

Figure Job Log with Successful Messages

BAdI PPH_MDPSX_DBSYS_OPT

The first step in activating MRP on SAP HANA is to ensure that the BAdI PPH_ MDPSX DBSYS OPT is active and that the correct value has been defined for the BAdI implementation’s filter.
Note
SAP typically delivers this BAdI with an active implementation and the correct value set. Nothing needs to be changed in this case.
Nonetheless, we must confirm that this step is correct.
Transaction SE18 can be used to validate the BAdI implementation by entering the value PPH MDPSX DBSYS OPT in the BAdI name field (see Figure ).

BAdI PPH_MDPSX_DBSYS_OPT in Transaction SE18

In Transaction SE18, check if the enhancement spot PPH_DBSYS_OPT is
active, as show in Figure

Enhancement Spot PPH_DBSYS_OPT is Active

Now, under Enhancement Implementation, click the tab Enh. Spot Element Definitions and double-click PREPARE_ READ MDPSX (see Figure). This is the SAP-supplied default implementation.

Enhancement Implementation PREPARE_READ_MDPSX

we can observe that the Enhancement Implementation PREPARE_READ_MDPSX has the status Active.

PREPARE_READ_MDPSX is Active

Now, under the BAdI implementation, double-click the option Filt. Val. (filter values), and you should see the value HDB under the Filter DBSYS _TYPE, as shown in Figure . This value indicates that this BAdI implementation is compatible with the SAP HANA database.

Filter DBSYS_TYPE with the Value HDB

Configure the MRP Live Number Ranges

MRP Live employs a different number range interval than classic MRP, and it is necessary to configure this interval for planned orders (object PLAF), reservations/dependent requirements (object RESB), and purchase requisitions before running MRP in Transaction MD01N. (object BANF).
For each of these elements, a new interval with the key PP must be created. The following guidelines must be followed:

We can’t use letters because it has to be a numeric interval. This interval cannot be overlapping with any other interval for this object. This interval is only for MRP Live and should not be used for anything else.
The following is the procedure for creating a new interval for object BANF, which must be repeated for objects PLAF and RESB:

Open Transaction SNRO, input object BANF, and click on the Ranges
button (see Figure ).

Figure Ranges Button in Transaction SNRO

On the next screen, click the Intervals button, with the pencil icon (see
Figure).

Change Intervals Button in Transaction SNRO

Click the Add new line to include a new interval and create the new
interval PP, as shown in Figure . Choose the From and To number as
you desire, as long as there is no overlap.

Maintain Intervals Screen

Go back to the previous screen and click the button labeled NR Status
(see Figure ).

NR Status Button

As shown in Figure, the NR Status is defined as the lowest number in this interval. It is critical to ensure that no record exists on the respective table during this interval.

Setting the Number Range Status

Repeat the above mentioned steps for the number ranges for PLAF and
RESB.

MRP Live on HANA Procedures Activation (Delivery Units)

Before running MRP on SAP HANA, we must ensure that all SAP HANA delivery units have been successfully deployed; otherwise, errors and short dumps may be seen in MRP Live or any transactions that access the MRP on SAP HANA procedures.
SAP Note 1907934: MRP Live on Hana procedures activation specifies which SAP HANA Transport Containers (HTCs) should be activated for each release and support package.
For example, our system is running EHP 7 with Support Package 9; SAP Note 1907934 lists the HTCs as follows:

After finding the correct HTCs, we should run the report SNHI_NHDU_
POST_PROCESS with the flag Activate HTC checked for all of these HTCs
(see Figure).

Report SNHI_NHDU_POST_PROCESS

Report PPH_ADAPT_RESB_DISCONT

If you are activating MRP on SAP HANA on a live system with dependent requirements, we recommend that you run report PPH_ADAPT_RESB_DISCONT..
The report is very simple to run, and the plant is the only required field. You can use the material as the selection criteria if you know which materials must be checked ahead of time, or you can leave the field empty to check all the materials of a specific plant. If the Simulation field is left blank, the changes will be saved to the database; otherwise, the report will be run in test mode. The report selection parameters are depicted in Figure.

Report PPH_ADAPT_RESB_DISCONT

Planning File Entries Conversion

MRP Live no longer supports planning file entries in the old planning file table MDVM, as SAP S/4HANA introduced a new concept of planning file entries designed for improved performance within SAP HANA.
If you are still using the old planning file table MDVM, or if you are upgrading to SAP S/4HANA, the planning file entries must be converted. This section will go over the process for both SAP ERP and SAP S/4HANA.

SAP ERP File Entry Conversion Planning

The planning file entries must be converted if you are running MRP on SAP HANA within SAP ERP. Earlier SAP ERP releases saved planning file entries in database table MDVM. When the MRP area concept was introduced into the system, the planning file entries were migrated to the new table DBVM, which allows MRP area access and can be read more efficiently, avoiding deadlocks and improving MRP performance when reading the planning file entries.

To convert the planning file entries to table DBVM, execute Transaction OM0F or report RMDBVM00. The transaction is very simple, with only one parameter that specifies whether the transaction will be executed in test mode or whether the changes will be saved on the database.
Following the execution of the report, all planning file entries will be copied to table DBVM and deleted from table MDVM.

MRP planning file entries are stored in table DBVM. The new table DBVM has a better-designed key and can be read faster than the old table MDVM.
After running report RMDBVM00, you can write or read planning file entries in table DBVM. The report copies the planning file entries from table MDVM to DBVM and sets an indicator in table T000MD to ensure that all future planning file entries are written to the new table. See SAP Note 78115 for more information.

SAP S/4HANA File Entry Conversion Planning

A new planning file table called PPH DBVM was created for the SAP S/4HANA release. This table is optimised for the SAP HANA database and is even faster. If you are upgrading an older system to SAP S/4HANA, you must run report PPH_SETUP_MRPRECORDS to convert the planning file entries to this new table.
Tip Transaction PPH_MDAB can be used to start this programme in the background.
This report is used to create planning file entries in table PPH DBVM as well as to check the consistency of existing planning file entries.

You can use the plant as a selection criterion because this report can also be used to run a consistency check. If the Regenerative (w.BOM Explosion) flag is set, it will mark the net change flag as well as the BOM explosion flag for each material in the planning file, forcing a new MRP run with the BOM explosion. The figure depicts the repot selection screen with the previously mentioned parameters.
If you are also using Long-Term Planning (LTP), you must convert the planning file entries using report PPH_SETUP_MRPRECORDS_SIMU.
PPH_MSAB and PPH_MSAC transactions can be used to start a background job with this report.

Report PPH_SETUP_MRPRECORDS in SAP S/4HANA

Exit mobile version