IS-Retail powered by SAP HANA Rapid Replenishment Planning Customer Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Overview – Introduction Performance optimization of SAP ERP Retail Replenishment (transaction WRP1, report RWRPLPRO). – Replacement of core functionality for determination of requirement elements (stock, forecast, open receipts/issues) and calculation of requirement quantity in existing replenishment process. – Some simplifications of the planning process (e.g. consideration of MM forecast only, consideration of most important receipts/issues only). – Massive code push-down to the database via CDS views (technology not database specific). Very high optimization potential (factors > 10 for complete planning process w/o follow-on document creation), in particular on SAP HANA database. Optimization potential increases with data volume, planning scope (planning objects to be considered and number of data records in the system) and packet size. Available with SP07 for ERP 6.17 (ERP 6.0 EHP7). SP07 delivery is restricted to usage with SAP HANA database, SP08 delivery can be used on other database platforms as well. Activation of business function ISR_APPL_RRPL required. Usage via new transaction / report (WRP1R / RWRPLRRP). Parallel usage with classic replenishment planning (WRP1 / RWRPLPRO) possible. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 3 Rapid Replenishment Planning Overview – Differences Classic vs. Rapid Replenishment Most important differences to classic replenishment planning: Can only be used for (internal) sites, not for (external) customers (VMI scenario). Considers only MM forecasts (table PROW), not forecasts from flexible planning (info structure S130). Considers only most important requirement elements and receipts/issues (not the full potential scope of ATP check): – Stock (storage locations, different stock types on storage location and site level) – Forecast (all period types) as issues and for dynamic target stock calculation – Purchase requisitions (internal and external) as receipts/issues – Purchase orders (internal and external) as receipts/issues and order confirmations Netted consideration of receipts/issues up to next goods receipt date. Optimizations not available for multi-step replenishment. Replenishment ID from number range is also consumed in dialog mode w/o follow-on document creation. Additional options with Rapid Replenishment Planning: Additional BAdIs for flexible control of requirement calculation per item. Re-use of core function possible outside of replenishment process. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 4 Rapid Replenishment Planning Overview – “Migration” from Classic to Rapid Replenishment No migration efforts from classic replenishment planning (besides tests and job definition): Existing master data, transaction data and customizing is used without any changes. Same selection screen, result screen and overall process integration (e.g. replenishment monitor, parameter overview). User exits from classic replenishment are further on supported. Usage of same number range object and number range. Usage of same lock object. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 5 Rapid Replenishment Planning Information specific for S/4HANA Following points deviating from the description in this document valid for SAP ERP apply to Rapid Replenishment on SAP S/4HANA: Rapid Replenishment is the only Retail Replenishment option available on SAP S/4HANA, see SAP Note 2370106. Activation of Rapid Replenishment via business function is not required on S/4HANA. Business function ISR_APPL_RRPL does not exist on S/4HANA. With S/4HANA, the inventory data model changed, see SAP Note 2267788. This change does not affect the general logic of retrieving stock information described in this document. For reasons of simplicity, this document only refers to table(s) MARD (and MARC) for stock data, although stock figures are retrieved from other tables via corresponding views on S/4HANA. With S/4HANA, the master data maintenance and MRP options have been simplified, see SAP Notes 2268045 and 2466264. This change does not affect the general logic of retrieving stock information and open receipts/issues described in this document. For reasons of simplicity, this document only refers to storage location MRP indicator (MARD-DISKZ), although exclusion of storage locations from replenishment is done via MRP areas on S/4HANA. CDS views used for Rapid Replenishment have been renamed to meet common naming conventions on S/4HANA. The diagrams explaining Rapid Replenishment CDS views in this document show the CDS view names used in SAP ERP only, and a table lists the corresponding view names on S/4HANA. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 6 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Input Data – Customizing 1/2 MRP Type (T438A) DISVF Replenishment relevancy Static vs. dynamic target stock PROKZ MRP Control per site (T399D) Relevant stock types KZUMB NFVBC XFAN1 © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 8 Rapid Replenishment Planning Input Data – Customizing 2/2 ATP Checking group (TMVF) Determination of receipts/issues VERPN EISBP UMLMP QMBSP SBSTP NFVBC BESTP BANFP ATP Control per checking group and checking rule (T441V) Relevant stock types Settings for determination of receipts/issues LAVIP TBBEP RPAST © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 9 Rapid Replenishment Planning Input Data – Master Data Article / site logistic data (MARC, WRPL): MRP type Reorder point and safety stock Replenishment parameters Checking group for availability check Scheduling and source of supply information DISMM MINBE EISBE SOBST PRWUG PRWOG TRCOV NIMGT PLIFZ BWSCL WEBAZ Usage of requirement groups possible for maintenance of replenishment parameters per site / merchandize category. MTVFP © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 10 Rapid Replenishment Planning Input Data – Selection Parameter Selection screen WRP1R (RWRPLRRP): Determine receipts/issues Include forecasted issues © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 11 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Calculation Logic – Overview stock Target Stock Reqrmnt Quantity Rcpts / Issues Current Stock Reorder Point Dyn. Trgt Stock Expected Stock Legend RLT: Replenishment lead time RLT TRC: Target range of coverage TRC GR: Goods receipt 0 time Planning Date Next GR Date © 2015 SAP SE or an SAP affiliate company. All rights reserved. End of TRC Customer 13 Rapid Replenishment Planning Calculation Logic – Definitions Time Ranges Replenishment Lead Time (RLT): Time it takes to replenish goods, that is the time from replenishment planning until availability of goods in the receiving site. Is calculated via a scheduling function based on master data parameters (planned delivery time, goods receipt processing time, …). Target Range of Coverage (TRC): Replenishment master data parameter that controls which time range (starting with the availab ility of goods) should be covered by the requirement quantity. Is used for the calculation of dynamic target stock. Dates Planning Date: Date for which replenishment planning is executed. Can be entered as WRP1R selection parameter. Next Goods Receipt (GR) Date: Date at which the goods are expected to become available in the receiving site for current planning. End of Target Range of Coverage (TRC): Date up to which the calculated requirement quantity is supposed to cover demands. Stock Levels Current Stock: Available stock on hand at the time replenishment planning is executed. Expected Stock: Stock expected to be available at the (beginning of the) next goods receipt date. Target Stock: Desired stock level at the (beginning of the) next goods receipt date. Additional Stock Parameters Minimum and Maximum Target Stock: Lower and upper limit for dynamic target stock. Reorder Point: Stock level threshold (referring to expected stock) for requirement quantity calculation. Safety Stock: Stock amount for covering higher demand than forecasted due to demand volatility. Can be entered manually as ma ster data parameter or can be calculated by the forecast calculation. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 14 Rapid Replenishment Planning Calculation Logic – Detailed Calculation Requirement Quantity = Target Stock – Expected Stock Requirement Quantity is only calculated if Expected Stock < Reorder Point (MARC-MINBE, if > 0). Target Stock procedure depending on customizing of MRP type (MARC-DISMM): – T438A-PROKZ <> ‘+’ Static Target Stock from master data (WRPL-SOBST) – T438A-PROKZ = ‘+’ Dynamic Target Stock for Target Range of Coverage (WRPL-TRCOV) Rounded sum of forecast values (PROW-KOPRW) between next GR Date (including) and next GR Date plus Target Range of Coverage (excluding). Fractions of forecast periods are considered according to the number of workdays. Safety stock (MARC-EISBE) is added to the forecast sum. Resulting value is limited to Minimum and Maximum Target Stock (WRPL-PRWUG, -PRWOG). Expected Stock = Current Stock + Receipts/Issues – Forecasted Issues Two stock management options for Current Stock depending on master data setting (WRPL-NIMGT): – WRPL-NIMGT = ‘X’ RP inventory management (simple stock value, WRPT-STOCK) – WRPL-NIMGT = ‘ ‘ MM inventory management (stock from MARD and other sources*) Receipts/Issues within RLT (only with MM inventory management and if flagged on selection screen of WRP1R): Sum of open receipts/issues from purchase requisitions and purchase orders (including order confirmations) until next GR Date (including). This sum can be positive or negative and is independent of the amount and timely order of the individual elements. Forecasted Issues within RLT (only with MM inventory management and if flagged on selection screen of WRP1R): Rounded sum of forecast values (PROW) between Planning Date (excluding) and next GR Date (excluding). Fractions of forecast periods are considered according to the number of workdays. Negative Expected Stock not allowed (with determination of Receipts/Issues): If Current Stock plus Receipts/Issues is negative, this sum is set to 0. Forecasted Issues are limited to the sum of Current Stock plus Receipts/Issues (already clipped to 0). © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 15 Rapid Replenishment Planning Calculation Logic – Example and Further Explanations Dates Planning Date Next GR Date End of TRC = day 0 = day 3 (RLT = 3) = day 6 (TRC = 4) Additional Stock Parameters Reorder Point Safety Stock Target Stock Min/Max Trgt Stck = none = none = dynamic = none =5 = 4 per day = 7 on day 1 = 9 on day 2 Requirement Calculation (steps) Receipts/Issues Forecasted Issues Expected Stock Dyn. Target Stock Reqrmnt Quantity =9-7 =2x4 =5+2-8 =4x4 = 16 - 0 2 4 9 3 5 - 3 4 -1 1 0 Expected stock figures are supposed to reflect stock at the beginning of the day. Therefore, expected receipts/issues of that day are included, whereas forecasted issues of that day are not included, but forecasted issues of the day before. Expected stock of the next GR day (day 3 in the example) includes expected receipts/issues of that day. This is particularly important in order to consider an existing order / requisition that might have been created by a subsequent replenishment run for the same planning date; otherwise, the same requirement quantity would be ordered again. Expected stock calculation in replenishment planning is based on the sum of forecasted issues and sum of receipts/issues until next GR date. There is no calculation on daily base as it is shown in the table above (daily calculation). In reality, stock cannot be negative. This fact is considered in the second expected stock calculation variant above (daily calculation, no negative stock) and also in the expected stock calculation performed in replenishment planning based on sums. Receipts/Issues within RLT Open Issue Open Receipt - 1 4 7 -2 0 - Forecasted issues (sales) are expected to happen during the day. Receipts/issues (e.g. from purchase orders or stock transfer orders) are expected to happen at the beginning of the day (before forecasted issues). Forecasted Issues up to end of TRC Forecast 0 5 Explanations: Stock Level Current Stock Day Current Stock Forecasted Issues Expected Issues Expected Receipts Expected Stock, daily calculation Expected Stock, daily calculation, no negative stock Expected Stock, based on sums for next GR date =2 =8 = -1 => 0 = 16 = 16 © 2015 SAP SE or an SAP affiliate company. All rights reserved. Depending on the kind of demand (e.g. consumer sales or open order), the demand will be lost or might be fulfilled later on in reality. Replenishment planning uses the “lost demand” assumption as default and ignores such demand by setting the expected stock to 0 in case the calculation based on sums would return a negative value (this behavior can be changed via BAdI for both the sum of forecasted issues and the sum of receipts/issues, so that “lost demand” increases the requirement quantity). In case the expected stock would have been negative and was set to 0, and a replenishment order was created to cover the target stock, a repeated replenishment planning for the same planning date would result in a another (probably smaller) requirement quantity, since a part of the previously created replenishment order would be consumed by the “lost demand” that has been ignored beforehand. Customer 16 Rapid Replenishment Planning Calculation Logic – Determination of Current Stock (MM Inv. Mngmnt) Storage Locations: Stock from all relevant storage locations is accumulated for one site. Stock Types: Different stock types on level of storage location (MARD) and site (MARC) are added up to current stock depending on customizing settings (ATP control / control parameters for MRP) and determination of receipts/issues (WRP1R selection parameter): Stock Types With determination of receipts/issues Without determination of receipts/issues or if no checking group (MARC-MTVFP) is assigned to article/site, or if indicator “no check” (TMVF-VERPN) is set for the checking group MARD-LABST always added always added MARD-KLABS always added always added MARD-INSME added if T441V-QMBSP is set always added MARD-KINSM added if T441V-QMBSP is set always added MARD-UMLME added if T441V-UMLMP is set always added MARD-SPEME added if T441V-SBSTP is set added if T399D-XFAN1 is set MARD-KSPEM added if T441V-SBSTP is set added if T399D-XFAN1 is set MARD-EINME added if T441V-NFVBC is set added if T399D-NFVBC is set MARD-KEINM added if T441V-NFVBC is set added if T399D-NFVBC is set MARD-BSKRF stock value = stock value * ( 1 + BSKRF ) stock value = stock value * ( 1 + BSKRF ) MARC-UMLMC added if T441V-UMLMP is set added if T399D-KZUMB is set MARC-EISBE subtracted if T441V-EISBP is not set not considered Storage Locations Storage location considered if MARD-DISKZ = ‘ ‘ Storage location considered if MARD-DISKZ = ‘ ‘, or MARD-DISKZ = ‘2’ and MARD-LOEKZ = ‘X’ Note: Consideration of different settings due to compatibility with classic replenishment planning (WRP1/RWRPLPRO). If quantity updating is not active for the valuation area (site) and material type (T134M-MENGU not set), stock is taken from RP inventor management (WRPT-STOCK) as fallback. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 17 Rapid Replenishment Planning Calculation Logic – Determination of Forecasts Forecast Determination for: – Determination of forecasted issues (if flagged on WRP1R selection screen). – Calculation of dynamic target stock (if T438A-PROKZ = ‘+’ for the MRP type assigned to the article/site, MARC-DISMM). Forecast Version: Selection of forecast version for an article/site via table MAPR (with WERKS and MATNR) PROP (with MAPR-PNUM1, HSNUM = ‘00’, VERSP = ‘00’) PROW (with PROP-PNUM2 and ERTAG in relevant time range). Corrected forecast values (PROW-KOPRW) are considered. Period Indicators: All period indicators (MAPR-PERKZ) are supported (day, week, month, fiscal year periods). Period Shares: Forecast values are accumulated in the relevant time range on a day-to-day base. In case of period indicator <> day, values of forecast periods not fully included in the relevant time range are multiplied by: number of workdays in forecast period included in relevant time range divided by total number of workdays in forecast period (according to the factory calendar of the site) Rounding: Sum of forecast values in relevant time range is rounded to the allowed number of decimal places of the base unit of measure of the article (T006-ANDEC) by rounding up values >= 0.5 and rounding down values < 0.5 of the respective decimal place. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 18 Rapid Replenishment Planning Calculation Logic – Determination of Purchase Requisitions Consideration of requisitions to external vendor and stock transport requisitions. Consideration of purchase requisitions as receipts/issues: Consideration as receipt (replenishment site = EBAN-WERKS) Consideration as issue (replenishment site = EBAN-RESWK) General Control T441V-BANFP = ‘X’ T441V-TBBEP = ‘X’ Time Range Considered up to next GR date. Considered in past if T441-RPAST = ‘ ‘ or ‘A’, otherwise from current date on. Relevant date: EBAN-LFDAT Considered in past and future (up to next GR date). Relevant date: EBAN-FRGDT if available, otherwise EBANLFDAT. Committed Quantity (for stock transport) Original quantity (EBAN-MENGE) is considered. Committed quantity (EBAN-MNG02) is considered. Ordered Quantity Quantity is reduced by quantity already ordered (EBANBSMNG). Quantity is reduced by quantity already ordered (EBANBSMNG). Storage Location Only considered if MARD-DISKZ = ‘ ‘ (or no MARD record exists) for receiving storage location (EBAN-LGORT), or no receiving storage location maintained. Only considered if MARD-DISKZ = ‘ ‘ (or no MARD record exists) for issuing storage location (EBAN-RESLO), or no issuing storage location maintained. Document Category and Type: Purchase requisitions with document category (EBAN-BSTYP) ‘B’ are considered. All document types (EBAN-BSART) for document category ‘B’ (as defined in T161) are considered. Restriction of document types possible via BAdI. Account Assignment Category / Special Stock Indicator: Only purchase requisitions without account assignment category (EBANKNTTP) and special stock indicator (EBAN-SOBKZ) are considered. Consideration of particular account assignment categories / special stock indicators possible via customer entries in control table WRRP_KNTP_SBKZ. Other Conditions: – – – – – EBAN-LOEKZ not set EBAN-EBAKZ not set EBAN-NODISP not set EBAN-BSAKZ not set EBAN-PSTYP <> ‘5’ © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 19 Rapid Replenishment Planning Calculation Logic – Determination of Purchase Orders Consideration of purchase orders to external vendor and stock transport orders. Consideration of purchase orders as receipts/issues: Consideration as receipt (replenishment site = EKPO-WERKS) Consideration as issue (replenishment site = EKKO-RESWK) General Control T441V-BESTP = ‘X’ or ‘A’ T441V-TBBEP = ‘X’ or ‘A’ Returns Items (EKPO-RETPO = ‘X’) Returns (negative receipts) are considered as effective issues. Returns (negative issues) are considered as effective receipts. Time Range Considered up to next GR date. Considered in past if T441RPAST = ‘ ‘ or ‘A’, otherwise from current date on. Note: Returns (negative receipts) are considered as issues. Relevant date: EKET-EINDT (also for returns as negative receipts). Considered in past and future (up to next GR date). Note: Returns (negative issues) are considered as receipts. Relevant date: EKET-MBDAT if available, otherwise EKETEINDT (also for returns as negative issues). Committed Quantity (for stock transport) Original quantity (EKET-MENGE) is considered, if T441VBESTP = ‘X’. Committed quantity (EKET-MNG02) is considered, if T441V-BESTP = ‘A’. Note: Original quantity is considered for returns. Committed quantity (EKET-MNG02) is considered. Note: Original quantity is considered for returns. Reduced Quantity Quantity is reduced by quantity already considered via order confirmations (EKET-DABMG). Note: Not for returns (negative receipts). Not considered. Received / Issued Quantity Quantity is reduced by quantity already received (EKETWEMNG) exceeding EKET-DABMG, only down to zero. Note: Also for returns (negative receipts). Quantity is reduced by quantity already issued (EKETWAMNG), only down to zero. Note: Also for returns (negative issues). Delivery Complete / Final Delivery Indicator Quantity is reduced to zero, if EKPO-ELIKZ is set. Note: Also for returns (negative receipts). Quantity is reduced to zero, if EKPO-ELIKZ is set or EKPOEGLKZ is set. Note: Also for returns (negative issues). Storage Location Only considered if MARD-DISKZ = ‘ ‘ (or no MARD record exists) for receiving storage location (EKPO-LGORT), or no receiving storage location maintained. Note: EKPO-LGORT is also checked for returns (negative receipts). Only considered if MARD-DISKZ = ‘ ‘ (or no MARD record exists) for issuing storage location (EKPO-RESLO), or no issuing storage location maintained. Note: EKPO-RESLO is also checked for returns (negative issues). © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 20 Rapid Replenishment Planning Calculation Logic – Determination of Purchase Orders / Confirmations Document Category and Type: Purchase orders with document category (EKKO-BSTYP) ‘F’ are considered. All document types (EKKO-BSART) for document category ‘F’ (as defined in T161) are considered. Restriction of document types possible via BAdI. Account Assignment Category / Special Stock Indicator: Only purchase order items without account assignment category (EKPOKNTTP) and special stock indicator (EKPO-SOBKZ) are considered. Consideration of particular account assignment categories / special stock indicators possible via customer entries in control table WRRP_KNTP_SBKZ. Other Conditions: – – – – EKKO-LOEKZ not set or = ‘S‘ EKPO-LOEKZ not set or = ‘S‘ EKPO-STAPO not set EKET-NODISP not set (only for receipts) Order confirmations for purchase orders as receipts are always considered if purchase orders are considered as receipt (T441V-BESTP = ‘X’ or ‘A’). Otherwise, order confirmations for purchase orders as receipts are considered, if T441V-LAVIP = ‘X’. Order confirmations are considered up to next GR date. They are considered in past if T441-RPAST = ‘ ‘ or ‘A’, otherwise from current date on. Relevant date is EKES-EINDT. Confirmation quantity (EKES-MENGE) is reduced by quantity already received (EKES-DABMG), only down to zero. Order confirmations are only considered for purchase order items that are considered (conditions above) and that are not finally delivered yet (EKPO-ELIKZ not set). They are not relevant for returns order items. Other conditions for confirmations: – EKES-KZDIS is set – EKES-ESTKZ <> ‘4‘ Order quantity and confirmation quantity are converted from ordering unit (EKPO-MEINS) into the base unit of measure of the article using the conversion factors stored with the purchase order: Quantity in base unit = quantity in ordering unit * numerator (EKPO-UMREZ) / denominator (EKPO-UMREN) © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 21 Rapid Replenishment Planning Calculation Logic – Structured Articles Determination of requirement quantity for structured articles (set, prepack, display) based on information of their components (defined via bill of material): Replenishment parameters must be maintained for the component articles, so that they are picked up in replenishment workload determination. The header article is determined for each component article and added to the list of replenishment items. In case one article is component of more than one structured article, only one of them is considered as header in replenishment (first entry according to internal sorting). – Articles only listed as components of structured articles are not replenished as single articles but contribute to the requirement calculation of the header article. – Articles (also) listed as single articles are replenished as single articles (i.e. requirement calculation and follow-on document creation for the single article only). The expected stock (open receipts/issues) is determined for both header and component articles. Forecasted issues and forecasts for dynamic target stock calculation are only determined for the component articles, not for the header. The expected stock (open receipts/issues) of header articles is distributed to their components according to the quantity mix in the bill of material. The requirement quantity of the header article is finally calculated based on the weighted sum of its components (weighting by quantity mix in bill of material). The requirement quantities of the components are discarded, replenishment results only in requirement quantities (with follow-on documents) for the header article. Same logic is used for logistic variants of logistic articles. In case of logistic variants, there is only a quantity conversion required from one article to the other (without quantity mix as in structured articles). © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 22 Rapid Replenishment Planning Calculation Logic – Special Error Handling Area Stock, Receipts/ Issues Stock, Receipts/ Issues Receipts/ Issues Receipts/ Issues Dynamic Target Stock Dynamic Target Stock Situation MARC-MTVFP not maintained (i.e. no checking rule assigned to the item). Reaction Determination of current stock as if determination of receipts / issues was not requested, no determination of receipts/issues. No entry in T441V for MARC-MTVFP and checking group ‘RP’, TMVF-VERPN is set (i.e. no check for the checking group). No entry in TMVF for MARC-MTVFP (i.e. checking group not defined). No entry in T441V for MARC-MTVFP and checking group ‘RP’, TMVF-VERPN not set (i.e. control for availability check not maintained). No (positive) target range of coverage (WRPL-TROC) is defined. Determination of current stock as if determination of receipts / issues was not requested, no determination of receipts/issues. No forecast is available at all or there are not enough forecast periods to cover the complete target range of coverage. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Error AG 020 “No control data maintained for checking group <xx>” is issued for the item, no requirement quantity calculated. Error AG 021 “No control data maintained for checking group <xx> and checking rule RP” is issued for the item, no requirement quantity calculated. Error message WT 126 (“No target stock determined (target range of coverage <= 0)”) is issued and the calculation of the requirement quantity is not performed for the item (item status is set to error). Error message WT 131 (“Forecast values for determining target stock do not exist”) is issued and the calculation of the requirement quantity is not performed for the item (item status is set to error). Error handling can be skipped if not enough forecast periods are available, see note 595158. Customer 23 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning BAdIs and User Exits Existing user exits from WRP1 supported by WRP1R for reasons of compatibility EXIT_SAPLWRPL_001: Calculation of replenishment requirements. EXIT_SAPLWRPL_002: Determination of forecasted issues per item. EXIT_SAPLWRPL_004: Determination of target stock per item. New BAdIs available for WRP1R Detailed adjustments of data determination and calculation logic per item. Pre-Processing BAdI: Allows to adjust control parameters, and individually determine requirement elements before the standard logic for determination of requirement elements and calculation of the requirement quantity. – Method CHANGE_RRP_CORE_DATA Post-Processing BAdI: Allows to change the (intermediate) results of the requirement quantity calculation. As intermediate results, the previously determined, pre-aggregated requirement elements can be adjusted before the requirement calculation is executed. As a result of the requirement calculation, the calculated requirement quantity can also be adjusted. – Method CHANGE_RRP_REQU_DATA – Method CALCULATE_REQUIREMENT See documentation of IMG activity and BAdI methods for more detailed information. System table for account assignment category / special stock indicator By default, only purchase requisitions and purchase orders without particular account assignment category (KNTTP) and special stock indicator (SOBKZ) are considered as receipts/issues. Purchase requisitions and purchase orders with particular values for KNTTP and SOBKZ can be considered by adding corresponding entries into control table WRRP_KNTP_SBKZ via table maintenance (SM30), customer namespace for key field CREATED_BY is Z*. Note that entries with identical values for KNTTP and SOBKZ must be avoided for proper results. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 25 Rapid Replenishment Planning Re-Use of Core Method Method RRC_CORE_REQ_CALC of class CL_RRP_WRAPPER encapsulates the database accesses for the determination of requirement elements and the requirement quantity calculation. The method does not read master data or customizing but retrieves all control data via its interface. Thus it can be also used outside of the context of replenishment planning for similar purposes. See documentation of new BAdIs for more information about the interfaces of this method. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 26 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Technical Information – Guiding Principles for Optimization Reduce data transfer between DB and application – Few mass data accesses instead of many single item access – Read required fields only instead of complete rows – Reduce roundtrips between application and DB – Apply filter criteria as low as possible (on the DB) – Read only data that is really required Push-down logic to the DB – Join information from different tables as low as possible (on the DB) – Perform calculation (aggregates) as low as possible (on the DB) Leverage DB parallelization capabilities Simplification of overall requirement calculation process Appl. Server DB Server Data Determination / Calculation Step 1 … … Data Determination / Calculation Step n … © 2015 SAP SE or an SAP affiliate company. All rights reserved. Appl. Server DB Server Prep.St ep Data Determination Calc. Step … Customer 28 Rapid Replenishment Planning Technical Information – Processing Blocks WRP1 Replenishment Planning Run WRP1 (RWRPLPRO) in Batch Mode Workload Determination / Packet Handling Packet PacketProcessing Processing(LUW) (LUW) Item Preparation / Master Data Read / Data Prefetches Item Preparation / Master Data Read / Data Prefetches Requirement Calculation (RPL_PLANNING) Determination of Receipts / Issues (via ATP) Data accesses per item Read Stock Read purchase orders Read Purchase Requisitions etc. Stock Determination (via MRP) Data accesses per item (partly buffered) Determination of Forecasted Issues (per item) Dynamic Targest Stock Calculation (per item) Calculation of Requirement Quantity Follow-On Document Creation (via Store Order) Purchase Requisition Creation Purchase Order Creation Delivery Creation Sales Order Creation Source of Supply Determination Update Replenishment Movement and Protocol Data Update Replenishment Movement and Protocol Data © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 29 Rapid Replenishment Planning Technical Information – Processing Blocks WRP1R Rapid Replenishment Planning Run WRP1R (RWRPLRRP) in Batch Mode – Selection Screen Workload Determination / Packet Handling Replenishment Planning Run WRP1 (RWRPLPRO) in Batch Mode Workload Determination / Packet Handling Packet PacketProcessing Processing(LUW) (LUW) Item Preparation / Master Data Read / Data Prefetches Item Preparation / Master Data Read / Data Prefetches Rapid Requirement Calculation (RRP_PLANNING) Data Mapping and Preparation Rapid Requirement Calculation Core (RRC_CORE_REQ_CALC) Stock Dtrmntn via CDS Pre-Processing BAdI Forecast Dtrmntn via CDS Get Requirement Data Purchase Order / Order Confirmation Dtrmntn via CDS Post-Processing BAdI Requirement Calculation Follow-On Document Creation (via Store Order) Purchase Requisition Dtrmntn via CDS Purchase Requisition Creation Purchase Order Creation Delivery Creation Sales Order Creation Source of Supply Determination Update Replenishment Movement and Protocol Data Update Replenishment Movement and Protocol Data © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 30 Rapid Replenishment Planning Technical Information – Process Flow in Planning Process Workload determination (including locking of planning objects) and packet handling Packet processing (LUW) – Determination of control data (from master data and customizing) – Write control data for CDS consumption temporarily into DB tables – Determination of requirement elements (stock, forecasts, open receipts / issues) via several CDS joining master data, transaction data and temporary control data – Delete temporary control data from DB tables – Calculation of requirement quantities – Creation of follow-on documents – Update of status and protocol data – Commit work Color legend: ABAP with OpenSQL OpenSQL with CDS views © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 31 Rapid Replenishment Planning Technical Information – CDS Views Overview Individual CDS views for retrieval of different types of requirement elements. Selection of requirement elements via particular CDS views only if the type of requirement element is required for at least one planning object. Master control table WRPP_CTRL holds one entry for each planning object with relevance indicators for the different types of requirement elem. Final calculation of requirement quantity in ABAP. Note for SAP S/4HANA: CDS views used for Rapid Replenishment have been renamed to meet common naming conventions. The diagrams on this and following four slides refer to CDS view names and tables used in SAP Business Suite. Corresponding names for SAP S/4HANA are listed in following table: © 2015 SAP SE or an SAP affiliate company. All rights reserved. Name in Diagram View Name S/4HANA MARC MARD V_FC_RLT V_FC_TRC V_RRP_STOCK_MARC V_RRP_STOCK_MARD V_RRP_STOCK_SUM V_GI_PO V_GI_PR V_GR_GI_PO V_GR_GI_PR V_GR_GI_PO_OC V_GR_OC V_GR_PO V_GR_PR NSDM_V_MARC NSDM_V_MARD RRP_V_FC_RLT RRP_V_FC_TRC RRP_V_STOCK_MARC RRP_V_STOCK_MARD RRP_V_STOCK_SUM RRP_V_GI_PO RRP_V_GI_PR RRP_V_GR_GI_PO RRP_V_GR_GI_PR RRP_V_PO_OC_SUM RRP_V_GR_OC RRP_V_GR_PO RRP_V_GR_PR Customer 32 Rapid Replenishment Planning Technical Information – CDS View Stock © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 33 Rapid Replenishment Planning Technical Information – CDS View Forecast © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 34 Rapid Replenishment Planning Technical Information – CDS View Purchase Requisitions © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 35 Rapid Replenishment Planning Technical Information – CDS View Purchase Orders / Confirmations © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 36 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Performance Improvements – Optimization Potential Performance optimization potential is very high on SAP HANA database: Up to 95% of run time of central function for determination of requirement elements and requirement quantity calculation can be saved. Up to factor 25 run time improvement for complete planning process (without follow-on document creation) measured in lab tests. Realistic factors in customer installations expected to be about 5 to 15 (feedback welcome). Performance optimization potential increases with: Planning scope: Number and types of requirement elements to be considered, such as stock, forecasts, purchase requisitions, purchase orders, order confirmations. Data volume: Total number of data records for relevant tables. Number of planning objects: Number of articles/sites to be planned. Packet size: Number of planning objects to be planned in one LUW in batch mode). The execution performance may also improve significantly on other database platforms than SAP HANA database. You should evaluate the performance of rapid replenishment planning for your actual use case before using it in production. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 38 Rapid Replenishment Planning Performance Improvements – Lab Test Results SAP HANA vs. AnyDB – Run time of complete replenishment planning run (RWRPLPRO / RWRPLRRP) in batch, excluding follow-on document creation. – Average run time numbers from at least three representative measures. – Test data set: 10 stores with 50.000 articles each (500.000 SKUs total), weekly forecasts per SKU for 50 weeks (25 mio. period values total), open purchase requisitions for 60% of SKUs (300.000 requisition items total), purchase orders for 60% of SKUs (300.000 order items in 60 purchase orders total, plus 4 mio. order items base load), 2 order confirmations for 33% of order items (100.000 confirmations total); values varying over SKUs. – For test cases with a very small number of items (not included in the table), measured run time factors AnyDB / HANA can be < 1. Absolute run times for such cases are typically in the sub-second area. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 39 Rapid Replenishment Planning Performance Improvements – Additional Optimizations Example distribution based on typical replenishment scenario: Runtime Distribution WRP1/RWRPLPRO (Example) Requirement Calculation: – Dynamic target stock – Determination of receipts/issues – Include forecasted issues Optimization Potential Follow-On Document Creation Follow-On Document Creation: – Requirement for 20% of planned items – Creation of purchase requisitions up to ~15-35% Requirement Calculation Planning Framework Planning Framework includes: – Determination of workload and master data – Update of replenishment transaction data High variation of run time and run time distribution depending on replenishment scenario, input and output data, e.g.: Target stock procedure (static vs. dynamic) Optimization Potential Rapid WRPT Update up to ~25% Follow-On Document Creation Optimization Potential Rapid Replenishment Planning up to ~95% © 2015 SAP SE or an SAP affiliate company. All rights reserved. Determination of receipts/issues Inclusion of forecasted issues Ratio of items with requirement quantity Follow-on document type (direct creation of purchase order takes longer than purchase requisition, in particular pricing and ATP check) Customer 40 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Additional Optimizations – Rapid WRPT Update Updating replenishment movement data (WRPT) can take a significant amount of time in the planning process. Rapid update of replenishment movement data (WRPT) provides an alternative, faster method for updating this information: Single updates are replaced by array update within a planning packet. New update method is available with classic and Rapid Replenishment Planning. Since the new update method can potentially interfere with existing processes (see below), the new update method needs to be switched on via customizing. Switch is possible for classic or Rapid Replenishment only or for both. This customizing is available with activation of business function ISR_APPL_RRPL. Note: Rapid WRPT update can potentially interfere with replenishment net change logic and updates of replenishment stock (when RP inventory management is used). There is a short time frame (some seconds) in the planning process of each packet, where updates of the change counter (WRPT-CHCNT) by other processes (e.g. by stock changes or replenishment parameter changes) and updates of the replenishment stock (WRPT-STOCK) are disregarded. Therefore, rapid WRPT update should only be activated if replenishment net change logic is not used or no updates of the change counter are expected during replenishment planning run, and if replenishment inventory management is not used or if no updates of replenishment stock by other processes are expected during replenishment planning run. Hint: Rapid Replenishment Planning might be faster w/o net change planning than classic replenishment w/ net change planning. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 42 Rapid Replenishment Planning Additional Optimizations – Follow-On Document Creation Optimizations of follow-on document creation (via store order functionality) already available with ERP 6.0 EHP7 SP04 and SP05. Optimizations are mainly data prefetches and replacements of single record operations by mass data operations. Optimizations are delivered as corrections (no activation required). Optimizations are not specific for SAP HANA. New BAdI available for adjustments of prefetches to customer scenario. See note 1983614 and related notes for more details. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 43 Rapid Replenishment Planning Overview Input Data Calculation Logic BAdIs and User Exits Technical Information Performance Improvements Additional Optimizations Further Information Rapid Replenishment Planning Further Information Help Portal Documentation for Replenishment: Help Portal Documentation (English) Help Portal Documentation (German) Documentation of business function ISR_APPL_RRPL. Innovation including the product features Rapid Replenishment Planning Rapid Update of Replenishment Movement Data © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 45 © 2015 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. Please see http://global12.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP SE or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP SE or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, which speak only as of their dates, and they should not be relied upon in making purchasing decisions. © 2015 SAP SE or an SAP affiliate company. All rights reserved. Customer 46