Skip to Content
0
Former Member
Jan 01, 2015 at 09:11 AM

Need help for SP

40 Views

Dear Team,

Below i mentioned my stored procedure for Block production order if there is no stock.

Actually t0.U_stockcbe is a FMS alphanumeric field contains stock in warehouse.But this sp is not working correctly.

please help

IF @transaction_type IN (N'A', N'U') AND (@Object_type = N'202')

if Exists( SELECT T0.[LineNum] FROM WOR1 T0 INNER JOIN OWOR T1 ON T0.DocEntry = T1.DocEntry

WHERE T0.[PlannedQty]>t0.U_stockcbe

and T1.DocEntry= @list_of_cols_val_tab_del )

Begin

Set @error =9

Set @error_message = 'prd Orderd Quantity is greater than Stock!! '

End

End

Regards

Sanu

Attachments

PR.png (24.8 kB)