Hi, I have an issue with the new V70082 st proc Jiwa_Warehouse_SOH_Summary. I had a modified version previously running on V70079 but have now put those changes into the latest standard version with a schema but still have an issue : "Error : Column name or number of supplied values does not match table definition. Module : On Error"
I have just added one extra field "TotalWeight" defined as follows :
1. In the Schema -
-- define Total Weight
INSERT INTO @Schema(Name, Caption, IsVisible, DefaultWidth, IsDrillDown, DrillDownSourceIDColumnName, DrillDownClassNameColumnName, FormatString, DecimalPlacesColumnName)
SELECT 'TotalWeight', 'Total KG', 1, 6, 0, NULL, NULL, NULL, 'QuantityDecimalPlaces'
2. At the end of the Table definition -
TotalForecastWorkOrderOutputWIP DECIMAL(19,6),
TotalWeight DECIMAL(19,6)
)
3. In the Logic -
-- PM Update Total Weight
UPDATE #tmpWarehouseSOH SET TotalWeight = ISNULL((
SELECT SUM(dbo.LON_IN_SOHCustomValues.WeightLeft)
FROM dbo.IN_SOH INNER JOIN
dbo.LON_IN_SOHCustomValues ON dbo.IN_SOH.LinkID = dbo.LON_IN_SOHCustomValues.IN_SOHID
WHERE IN_SOH.InventoryID = @InventoryID AND IN_SOH.IN_LogicalID = #tmpWarehouseSOH.INLogicalID
),0) + 0.01
4. At the end in the table output -
TotalForecastWorkOrderOutputWIP,
TotalWeight,
@DecimalPlaces [QuantityDecimalPlaces]
FROM #tmpWarehouseSOH
GO
Only one field added, same code as used previously so not sure where to now? I have attached full stored proc.
Thanks for the help in advance.
Cheers