SNP Functions
Refer to the following table to find the function of your choice. The functions are listed in alphabetical order. You can find examples of macros that use some of these functions in the standard planning book 9ASNP94, view SNP94(1).
Function |
Explanation |
COVER_CALC(rows for stock on hand ; area
for demand from the next period to the end of the time period ; area
containing the number of workdays ; demand from the next period to the end of
the time period) returns the days’ supply of a product by considering
the current stock on hand, the total demand of subsequent time periods, and
the number of workdays in this time period.
Result at the end of m04: Total demand is 23.7 Total demand in the future is 27.5 Total number of work days in the next period is 31. Thus, (23.7/27.5) x 31 ~ 26 (only 26 days can be covered)
Using the above value (26) for w12: Days’ supply is 63 = 7 (from w13) + 30 (from m04) + 26 (from m05). for w11: Days’ supply is 70 = 7 (from w12) + 30 (from m13) + 26 (from m04) + 26 (from m05).
|
|
COVERAGE_SUM (necessary days’ supply ; area containing quantity ; area containing days in the period) returns the total quantity that corresponds to the days' supply required. Instead of the area, you can also enter two sequences with the same number of entries. For example: COVERAGE_SUM ( 10
;
|
|
DEMAND_CALC () |
|
DEP_LOCATION_PRODUCTS() |
|
FORWARD_CALC( number of days ; area containing the values ; area containing the number of working days in a period) returns the sum of the values in the area over the number of days specified. If the number of days does not coincide with the end of the period, the value for this last period is calculated proportionally. Period 1 2 3 4 5 6 Demand 100 120 130 120 100 Working 20 22 21 22 20 In the above example for period 1, FORWARD_CALC ( 63; ..) returns the value 350 (100 + 120 + 130). FORWARD_CALC ( 74;...) returns 410 (100 + 120 + 130 + 120 11*22).
|
|
INITIAL_STOCK() |
|
INTEGER_CALC() |
INTEGER_CALC( Row(nattribute) ) provides the integral sum of values from the detailed level of a key figure. For example: KF1 total 10.25 Detail 1 3.75 Detail 2 6.50 INTEGER_CALC (KF1 as attribute) provides 10. |
MATLOC_INC() |
Syntax MATLOC_INC( ‚Field name’ ; Product ; Location ; <Version> ; Date ) Field name: Literal in quotation marks containing the name of the field from the master data for product interchangeability. The following are valid names: ● VALIDFR: Valid from ● VALIDTO: Valid to ● USEUPDATE: Use up date Product: Product ID Location: Location ID Version: Version ID (optional) You can enter the product, the location, and the version with other operators or functions, such as ACT_PRODUCT, ACT_LOCATION and ACT_VERSION, or as a literal in quotation marks. If you do not enter a version, the system uses the active version. Date: You can enter the date with operators or functions, such as BUCKET_EDATE() for instance. Description |
MATLOC_INC_C() |
Syntax MATLOC_INC_C( ‘Field name’ ; Product ; Location ; <Version> ; Date ) Field name: Literal in quotation marks containing the name of the field from the master data for product interchangeability. The following are valid names: ● PRODUCTID: Internal product ID (GUID) ● PRODUCT: External product ID ● SUCEPRODID: Internal product ID of the successor product (GUID). ● SUCEPROD: External product ID of the successor product. ● USEUPFLG: Use-up strategy ● ICTYPE: Type of interchangeability group Product: Product ID Location: Location ID Version: Version ID (optional) You can enter the product, the location, and the version with other operators or functions, such as ACT_PRODUCT, ACT_LOCATION and ACT_VERSION, or as a literal in quotation marks. If you do not enter a version, the system uses the active version. Date: You can enter the date with other operators or functions, such as BUCKET_EDATE() for instance. Description |
MAX_STOCK() |
|
MULTILEVEL_DEMAND_MEAN() |
MULTILEVEL_DEMAND_MEAN( forecast key figure, actual key figure, product, location, version, <period>) returns the sum of demands from all locations in the supply chain. Values for the future are taken from the forecast key figure, for the past from the actual key figure, in both cases for the given product, location (here for instance the plant or distribution center for which you are planning), and version. The entries actual key figure and period are not strictly necessary but improve performance, if you use MULTILEVEL_DEMAND_VAR in the same macro. For more information, see Multilevel Functions in the Supply Chain Network. |
MULTILEVEL_DEMAND_VAR()
|
MULTILEVEL_DEMAND_VAR( forecast key figure, actual key figure, product, location, version, <period> ) returns the error variance between the forecast demand and actual demand for all locations in the supply chain. This value is determined for the whole historical period or the period specified. As above you also enter the product, location, and version of interest, for example ACT_PRODUCT, ACT_LOCATION, and ACT_VERSION. For more information, see Multilevel Functions in the Supply Chain Network. |
MULTILEVEL_LEAD_MEAN()
|
MULTILEVEL_LEAD_MEAN( forecast key figure, actual key figure, product, location, version, <period>) is similar to MULTILEVEL_DEMAND_MEAN(). From a customer view it calculates the lead time for a product in a location. For more information, see Multilevel Functions in the Supply Chain Network. |
MULTILEVEL_LEAD_VAR()
|
MULTILEVEL_LEAD_VAR( forecast key figure, actual key figure, product, location, version, <period> ) returns the error variance between the forecast lead time and actual lead time for the specified product and location. This value is determined for the whole historical period or the period specified. As above you also enter the product, location, and version of interest, for example ACT_PRODUCT, ACT_LOCATION, and ACT_VERSION. For more information, see Multilevel Functions in the Supply Chain Network. |
NET_DEMAND() |
Syntax NET_DEMAND( Stock ; reorder point ; target stock level ; net demand ; ‘method’ ; ‘material’ ; ‘location’ ; ‘version’ ) Stock: Current period stock Net demand: Net demand of previous period Method: 1, 2, 3 or 4 Description NET_DEMAND() calculates the net demand using various methods. For methods 1 and 2, the system cumulates the net demand. For methods 3 and 4, the system only considers the Net Demand parameter. If you have defined the reorder point method for the product Material at location Location, the system calculates the net demand according to the following formula, irrespective of the method selected: Net demand = Target stock level – current stock level. The following applies: Current stock level = stock + (cumulative) Net demand (of previous periods). A negative net demand is set to 0. If you have not defined a reorder point method in the location product master, the system calculates the net demand depending on the method selected: ● Methods 1 and 3: If the current stock level is lower than the reorder point, the system calculates the net demand using the following formula: Net demand = Target stock level – current stock level. In other cases, the following formula is used: Net demand = Reorder point – current stock level. ● Methods 2 and 4: If the current stock level is lower than the reorder point, the system calculates the net demand using the following formula: Net demand = Target stock level – reorder point.. In other cases, the following formula is used: Net demand = Reorder point – current stock level. |
ORDER_DATA_LOCPRODS() |
ORDER_DATA_LOCPRODS( ‘buffering (y/n)’ ; ‘category group’ ; ‘version’ ; from-date ; to-date ; ‘location 1’ ; ‘product 1’ ; ‘location 2’ ;…) provides the cumulated order quantities of any number of location products in the specified time series and in the specified category group. |
PHYSICAL_STOCK() |
|
PHY_STOCK_LOCPRODS() |
PHY_STOCK_LOCPRODS( ‘category group’ ; ‘version’ ; ‘location 1’ ; ‘product 1’ ; ‘location 2’ ;…) returns the cumulated stock of multiple location products from the specified category group. |
PRODUCTION_COST() |
|
REORDER_CALC() |
|
REORDER_DAYS() |
|
SAFETY_CALC() |
SAFETY_CALC( 'product' ; 'location' ; 'version' ; safety days’ supply ; '<name of key figure for safety days’ supply>’ ; safety stock ; '<name of key figure for safety stock>' ; key figure for planned demand ; key figure for number of workdays per period ) returns the safety stock for the location product while taking the parameters defined in the location product master data into account. If these parameters require a manual entry for the safety days' supply or the safety stock, enter a value , otherwise enter 0. You can use the optional parameters
name of key figure for safety days' supply and name of key figure
for safety stock in
|
SAFETY_DAYS() |
SAFETY_DAYS('product' ; 'location' ; 'version' ; safety days' supply ; ‘<name of key figure for safety days’ supply>’) returns the safety days’ supply for the location product while taking the parameters defined in the location production master data into account. If these parameters require a manual entry for the safety days' supply enter a value , otherwise enter 0. |
SB_ALPHA_CYCLE() |
SB_ALPHA_CYCLE( service level ; demand forecast ; forecast error demand (%) ; replenishment lead time ; forecast error replenishment lead time (%) ; days' supply ) returns the safety stock level for the Alpha service level according to the cycle method. The demand forecast is a quantity per day. The replenishment lead time and the days’ supply are measured in seconds. |
SB_ALPHA_POINT() |
|
SB_BETA_CYCLE() |
|
SB_BETA_POINT() |
|
SOS_CHECK_MULTI() |
Syntax SOS_CHECK_MULTI( procurement indicator ; version ; product ; location ; resource ) Procurement indicator: E (in-house production) or F (external procurement) Description |
STOCK_BALANCE_OPT() |
Syntax STOCK_BALANCE_OPT( Version ; location ; product ; maximum delay ; return value ; demand area ; total demand area; total receipt area ) Version: Version ID Location: Location ID Product: Product ID You can enter the version, the location, and the product with other operators or functions, such as ACT_PRODUCT, ACT_LOCATION and ACT_VERSION, or as a literal in quotation marks. Maximum Delay: Maximum delay in days Return value: Literal in quotation marks for defining the return value of the macro function. If you enter ‘S’ as the return value, the macro function provides the stock on hand. If you enter ’P’, the function provides the demand not covered due to capacity restrictions. Demand area: The system uses the planned independent demand available in this area as the input data for the macro function. Total demand area: The system uses the total demand available in this area as the input data for the macro function. Total receipts area: The system uses the total receipts available in this area as the input data for the macro function. Description STOCK_BALANCE_OPT() calculates the stock on hand for a location product by considering a maximum delay for the demand. For more information on using this macro function, see SAP note 701992. |
STOCK_CALC() |
|
TARGET_CALC() |
|
TARGET_DAYS() |
|
TRANSPORT_COST() |
|
VEC_COVER_CALC() |
VEC_COVER_CALC(area for stock on hand ; area for demand from the next period to the end of the time period ; area containing the number of workdays ; demand from the next period to the end of the time period) returns the days’ supply of a product by considering the current stock on hand, the total demand of subsequent time periods, and the number of workdays in this time period. |
VEC_GRID_PREQ_QUANTITY |
|
VEC_REORDER_CALC() |
VEC_REORDER_CALC( 'product' ; 'location' ; 'version' ; reorder days ; reorder point' ; offset ; key figure (area) for planned demand ; area for number of workings days per period ) returns the reorder point for the location product referring to the parameters saved in the location production master data. If the reorder point method in the master data requires a manual entry for the reorder point, for instance, you must enter a value, otherwise enter 0. This is the vector version of REORDER_CALC. |
VEC_SAFETY_CALC() |
VEC_SAFETY_CALC('product' ; 'location' ;
'version' ; safety days' supply ; safety stock , key figure for planned demand
) returns the safety stock for the location product referring to the
parameters saved in the location production master data. If these parameters
require a manual entry for the safety days' supply or the safety stock, enter
a value , otherwise enter 0. |
VEC_STOCK_CONSUMPTION() |
VEC_STOCK_CONSUMPTION() is a vector function that carries out consumption using stock and demand values. Function arguments: 1: Strategy (Characteristics values: FIFO, BIFO, LIFO) 2: Time (days) for backwards consumption 3: Time (days) for forwards consumption 4: Number of decimal places for consumption 5: Initial stock on hand 6 - n+6 Vector with n storage values n+7 - 2n+6 Vector with n stock values 2n+7 - 3n+6 Vector with n period lengths (days) For example: VEC_STOCK_CONSUMPTION( 'LIFO' ; 3 ; 999 ; 0 ; 0 ; Area: Sum of receipts (1) ; sum of receipts (n) ; area: Sum of demand (1) ; sum of demand (n) ; area: Workdays (1) ; workdays (n) ) provides a vector with n values that display the result of consumption. The resulting values can be interpreted as follows: ● Negative values: The demand of the corresponding periods cannot be covered completely. The amount indicates the quantity of demand not covered. ● Positive values: In the period concerned, stock is still available after consumption. This can then be used for covering further demand. The amount indicates the stock quantity. |
VEC_TARGET_CALC() |
VEC_TARGET_CALC( 'product' ; 'location' ; 'version' ; target days' supply ; target stock level ; offset ( safety stock) ) returns the target stock level referring to the parameters saved in the location production master data. If these parameters require a manual entry for the target days' supply or the target stock level, enter a value , otherwise enter 0. This is the vector version of TARGET_CALC. The result and all key figures are areas. |
VMI_LEADTIME() |
VMI_LEADTIME( 'version' ) returns the procurement time for VMI. The system uses the information from the current selection (product and location) to find the data in the master data. |