Replacing SCV stored procedures/functions in SCV view definitions

SCV contains a number of utility stored procedures/functions (SZ_F_xxx). These utility functions are used in the standard SCV views, for example, to concatenate string values, format date values or to split concatenated string values back to components. One of these functions is the SZ_F_CONCATn function, which allows users to concatenate minimum two and maximum six string values using a separator in between. In a few SCV views, this concatenation function is nested, one concatenation function calling another, to concatenate more than six string values.

This nested usage of the SZ_F_CONCATn functions in SCV views is however causing a runtime error with a specific Microsoft SQL Server version: Microsoft SQL Server 2019 (RTM-CU12) (KB5004524) - 15.0.4153.1 (X64). Although it is possible to execute the view query with nested function calls, the same query when used in a view gives runtime error.

The solution is to replace SCV stored procedures/functions in the SCV view definitions with standard SQL functions.

These M3 views are updated to replace the nested SZ_F_CONCATn functions:

  • ST_V_M3_CAL_PLANNING
  • ST_V_M3_CURRENCY_RATE
  • ST_V_M3_DATASET_SALES
  • ST_V_M3_INVENTORY_AGING
  • ST_V_M3_INVENTORY_EXPIRY
  • ST_V_M3_INVENTORY_SHIPMENT (not used in any Staging -> Inbox transfers)
  • ST_V_M3_ITEM_WAREHOUSE_SOURCING
  • ST_V_M3_PURCHASE_OPEN_TRX
  • ST_V_M3_PURCHASE_PLND_TRX
  • ST_V_M3_ROUTING_INPUT_ITEM
  • ST_V_M3_ROUTING_OP (not used in any Staging -> Inbox transfers)
  • ST_V_M3_ROUTING_OP_ALT
  • ST_V_M3_ROUTING_OUTPUT_ENDP
  • ST_V_M3_ROUTING_OUTPUT_MTRL
  • ST_V_M3_ROUTING_RESOURCE_ALT
  • ST_V_M3_SALES_OPEN_TRX
  • ST_V_M3_TRANSFER_OPEN_TRX
Note: The related content is available after loading the M3 template (base for M3.zip) for this release. You are not required a new role or privilege access to use this feature.