Ansicht
Dokumentation

WRB_RFC_VENDOR_GET_OUTOFSTOCKS - NOTRANSL: Liefert eine Fehlbestandsstatistik für die Materialien eines Lie

WRB_RFC_VENDOR_GET_OUTOFSTOCKS - NOTRANSL: Liefert eine Fehlbestandsstatistik für die Materialien eines Lie

General Material Data   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Funktion module WRB_RFC_VENDOR_GET_OUTOFSTOCKS

Functionality

This RFC-enabled function module provides out-of-stock statistics for all orderable materials for a vendor and for a list of plants (distribution centers and stores). These statistics are calculated depending on two threshold values (one for distribution centers and one for stores).

You can limit the maximum number of materials considered for a vendor by entering an upper limit for the number of combinations considered.

The module is normally called from the iView VendorOutOfStocks in the SAP Enterprise Portal component to display the out-of-stock statistics for a selected vendor and selected plants. It is also used in module WRB_RFC_GET_OOS_OVERVIEW to calculate an out-of-stock overview for each vendor, aggregated across stores and distribution centers as well as all materials.

In order to be flexible with requests for calculating out-of-stocks, the entire program logic is implemented in the BAdI WRBX_OUT_OF_STOCK. The module then just defines the call sequence of the BAdI methods. The following describes the individual steps and the BAdI method that implements the process step is cited:

  • Create a BAdI object
An instance of the BAdI is created. If an instance cannot be created, the function module returns an error code and terminates processing.
  • Authorization check (BAdI method CHECK_AUTHORITY)
A check is performed to see whether the user is authorized to execute the module.
  • Initialization (BAdI method INIT_VENDOR_OUT_OF_STOCKS)
Initialization and preparatory steps for executing the BAdi data. The implementation for this step is optional.
  • Check for valid material groups (BAdI method MERCH_CAT_IS_NOT_VALID)
A check is performed to see whether master data exists for the material groups transferred.
  • Read the vendor name (BAdI method GET_VENDOR_NAME)
The vendor name for the vendor is displayed in the iView.
  • Read the plant list (BAdI method GET_SITES_BY_TYPE)
The table of plant keys is checked for valid plant master data.
  • Read the material list for the vendor (BAdI method GET_MATERIALS)
A material list for which the out-of-stock overview is to be determined is created for the vendor transferred. If no material is found, an error code is returned and processing is canceled. If more materials than the maximum number of material plant combinations to be processed are found, only the maximum number of materials is processed.
  • Read stocks and calculate out-of-stock overview (BAdI method CALC_VENDOR_OOS_DETAIL)
Stock data is read for the combination of materials and plants indicated. By comparing this with reference stocks, it is determined whether there is an out-of-stock situation for a material plant combination.
The out-of-stock situation is displayed as a percentage using the total number of material plant combinations read (separated according to stores and distribution centers) and the number of out-of-stock situations. A value of 0% means there are no out-of-stock situations for any plants in the list. A value of 100% means there is an out-of-stock situation in all plants. The stocks read and the formula for calculation are defined in the BAdI implementation class.

A standard implementation is already provided with the BAdI (class CL_DEF_IM_WRBX_OUT_OF_STOCK), which calculates an out-of-stock situation from the warehouse stock and the safety stock as reference stock for listed materials (listing check can be switched off).

Example

Notes

Further information

For more information, see the documentation for the following program objects:





Parameters

MAX_COMBINATIONS
MERCHANDISE_CATEGORY
MERCHANDISE_CAT_NOT_MAINTAINED
OUT_OF_STOCK_LIST
REGULAR_VENDOR
RETURN_CODE
SITES_NOT_MAINTAINED
SITE_LIST
THRESHOLD_DCS
THRESHOLD_STORES
USED_COMBINATIONS
VENDOR_NAME
VENDOR_NUMBER

Exceptions

Function Group

WRB_STOCK

BAL_S_LOG - Application Log: Log header data   CL_GUI_FRONTEND_SERVICES - Frontend Services  
This documentation is copyright by SAP AG.

Length: 6239 Date: 20240523 Time: 151356     sap01-206 ( 88 ms )