Ansicht
Dokumentation

FSH_BADI_ARUN_STOCK_ - BAdI: Stock Protection for Order Allocation Run

FSH_BADI_ARUN_STOCK_ - BAdI: Stock Protection for Order Allocation Run

CL_GUI_FRONTEND_SERVICES - Frontend Services   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in the Order Allocation Run (LO-RFM-ARN) component.

You can use this BAdI to set aside stock for certain segments that should be given the highest priority for their orders or planned independent requirements (PIRs). When you execute the order allocation run, the existing stock is set aside based on the priority of these segments. Stock is allocated to lower priority segments only if sufficient stock remains.

The method READ_REQUIREMENT is available. You can use this method to consider which requirements (unallocated sales orders, unallocated stock transport orders, and unconsumed PIRs) are used during ARun processing.

You have made the following settings:

  • Made the following changes for requirement/stock segments and PIRs:
  • Entered segment strategies in Customizing for Define Segmentation Strategies under Logistics - General → Segmentation.

  • Selected the Stock Protection checkbox for the relevant segmentcombination values (relevant for requirement segments) for which you want to use stock protection. Also, you should enter the priorities for the above segment values. You can do this in Customizing under Logistics - General → Segmentation → Define Segmentation Strategies → Segment Strategies → Segment Combinations.

  • SAP recommends 1:1 mapping for requirement and PIR segments in Customizing under Logistics - General → Segmentation → Define Segmentation Strategies → Segment Strategies → Planned Ind. Requirements Consumption.
  • SAP recommends adding a segment priority field (CH_PRIO) in the requirement sorting rules in Customizing for Maintain Rules to Sort Requirements under Logistics - General > Order Allocation Run (ARun) → Online ARun → Sorting.

For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).

  • FSH_BADI_ARUN_STOCK_PROTECTION
Using the default implementation, requirements (unallocated sales orders, unallocated stock transport orders, and unconsumed PIRs) are considered for ARun processing. These PIRs are selected from the available requirements (sales orders and stock transport orders (STOs)) and then sorted based on the priorities defined in the requirement sorting rule.
The requirements are processed using the FIFO allocation strategy. The allocation details for these requirements are not saved in a database table and do not appear in the list of allocation results. However, an information message is displayed stating the quantity of the protected stock along with the requirement details.

Note

The BAdI for stock protection is applicable for the spread allocation strategy. However, the allocation rule field checks in the BAdI are not applicable.

Consider the segments: Retail, e-commerce, and Wholesale. E-commerce has the priority 1, Retail has the priority 2, and Wholesale has the priority 3. Any orders from the e-commerce segment will be of higher priority and the stock will be kept aside for these orders. Stock is allocated to lower priority segments only if sufficient stock remains.

Segment Priority Planned Forecast
E-Commerce 1   1000
Retail 2   1000
Wholesale 3   1000

The total stock in the common stock pool is 3000.

  • An order from the E-commerce segment with a requirement of 600 is received.
The stock is allocated for this requirement. The stock available in the common pool is now 2400.
  • An order from the Retail segment with a requirement of 700 is received.
Before allocating the stock to this requirement, the stock for unconsumed PIRs at the preceding priority level (1) is kept aside. In this case, stock for 400 unconsumed PIRs is kept aside. The stock for this requirement of 700 is allocated as sufficient stock is available in the common stock pool. The stock available in the common stock pool reduces to 1700.
  • An order from the Wholesale segment with a requirement of 1500 is received.
Before allocating stock for this requirement, the stock for unconsumed PIRs for unconsumed PIRs at preceding priority levels (1 and 2) is kept aside. In this case, stock for 400 unconsumed PIRs (e-commerce segment) and 300 unconsumed PIRs (Retail segment) is kept aside. Though the stock available in the common stock pool is 1700, 700 are kept aside for unconsumed PIRs from higher priority segments. Therefore, for this order, only 1000 will be allocated. Complete allocation is not possible for this order as the segments with the higher priority are given preference over the lower priority segments.

Further Information

For information about implementing BAdIs as part of the enhancement framework, see SAP Library for SAP NetWeaver Platform on SAP Help Portal at http://help.sap.com/nw_platform. Choose a release and then Application Help. In SAP Library, choose SAP NetWeaver Library: Function-Oriented View → Application Server → Application Server ABAP → Application Development on AS ABAP → ABAP Customer Development → Enhancement Framework.






PERFORM Short Reference   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 6960 Date: 20240607 Time: 035555     sap01-206 ( 122 ms )