Thursday, 16 February 2017

SRM UI5 Add-on : SC Creation Important classes to remember

I am going to share some helpful information for SRM UI5 Add-on developers ( with ABAP knowledge ) about important classes that you need to remember while debugging any issues related to SC creation and also how these classes communicate with each other and their purpose in overcall SC creation.

SAP Supplier Relationship Management, SAPUI5, All SAP Modules

There are five important class involved.

/SRMNXP/CL_BO_DA_SHOPPING_CART:  this class is runtime class for SRMSHOPPING_CART OData service (responsible for entity types ShoppingcartItemCollection and ShoppingcarCollection) that is responsible for SC creation. So everything starts and end in this class. Data entered on the UI5 screen is passed to this class and also data that is to be displayed finally in the screen is passed back to this class. Inside most of the methods of the class the actual work is delegated to /SRMNXP/CL_TEMPORARY_CART and /SRMNXP/CL_INTL_PDO_SC.

/SRMNXP/CL_BO_DA_PDO_CART:  This class has same purpose as above class but is responsible for entity types SRMShoppingcartItemCollection and SRMShoppingcarCollection. This class comes into picture, if you are adding item to a SC which was already saved in database or when you click on item details or any other tab in the item details.

/SRMNXP/CL_TEMPORARY_CART:  This class manages the temporary cart until it is completely ordered or SAVE&CLOSE button is clicked or entire minicart is deleted. This class communicates with class /SRMNXP/CL_BO_DA_SHOPPING_CART and /SRMNXP/CL_INTL_PDO_SC.

/SRMNXP/CL_INTL_PDO_SC: This class acts as an intermediate layer (I assume that is the reason for INTL in its name) between /SRMNXP/CL_TEMPORARY_CART and /SAPSRM/CL_PDO_BO_SC_ADV.

/SAPSRM/CL_PDO_BO_SC_ADV:  This is our old PDO friend that is responsible for creation of SC in SRM (this class existed since golden era of webdynpro in SRM 7.0).

SAP Supplier Relationship Management, SAPUI5, All SAP Modules

Saturday, 11 February 2017

MRP and Safety Stock in SAP PP

The SAP ERP system offers two types of safety stocks: absolute safety stock and safety days’ supply. The absolute safety stock enables the system to subtract it from material availability calculations (net requirements calculations). The safety stock must always be available to cover for unforeseen material shortages or unexpected high demand.

For days’ supply/safety time, the system plans the goods receipt in advance by the period specified as safety time. Thus, planned days’ supply of the stock, in fact, corresponds to the number of days specified as safety time. The system shifts backs the date of the receipts by the number of working days and also takes the factory calendar into account.

You make the relevant entries in the MRP 2 view of the material master. The system refers to the planning of a safety days’ supply as safety time. To consider the safety time, you need to set the Safety time ind. to “1” (for independent requirements) or “2” (for all requirements), and then also give the Safety time/act.cov. in days. Further, you can define deviations from the constant safety time using a safety time period profile (STime period profile field).

MAN Production Planning (PP), SAP PP, All SAP Modules

Let’s take a look at how the safety stock availability can be used in net requirements calculations and also the selection method that the system uses for receipts.

1. Safety Stock Availability


To avoid the unnecessary creation of planned orders for a smaller quantity, which can otherwise be covered by the safety stock, you can define the percentage (share) of safety stock that the system can use in such business scenarios. For example, during the MRP run, the system assesses a shortage of 2 PC of a material. You have, however, maintained a safety stock of 40 PC for this material, which the system doesn’t consider in the MRP run. If you define that a 10% safety stock can be used to account for smaller shortages, which for this example means that 4 PC come from safety stock, then the system can cater to this small requirement or shortage of 2 PC from the 4 PC available from safety stock and no longer creates a procurement proposal.

To define the safety stock parameters, use configuration (Transaction SPRO) menu path, Logistics > Production > Material Requirements Planning > Planning > MRP Calculation > Stocks > Define Safety Stock Availability. For this example, the system can consider 10% of the safety stock for Plnt 3000 and MRP group 0010 for net requirements calculation (see below). You eventually assign the MRP group in the MRP 1 view of the material master.

MAN Production Planning (PP), SAP PP, All SAP Modules

2. Master Data Selection


For material that’s produced in-house, you also create a BOM and routing (or master recipe). There might be several alternatives available for a BOM or a routing, so you can control the selection of alternatives. This ensures that the system is able to assign the relevant BOM and routing to the created planned orders, and it enables you to perform functions such as availability checks, and so on.

With the right control in place, the system automatically assigns the correct selection or alternate in the planned orders created from the planning run. This is accessed and managed in the MRP 4 view of the material master (Transaction MM02) as shown below.

MAN Production Planning (PP), SAP PP, All SAP Modules