on 09-19-2014 7:40 AM
Dear Experts
Is there any possible to stop adding the Goods Receipt without unit price.
Hi Rathna,
Yes there is.
In the Stored Procedure, you can create a small query to avoid the user to add lines without prices.
If you need help just let me know.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure,
-- Documents without price in Goods Entry.
IF @OBJECT_TYPE = '59' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
BEGIN
IF EXISTS(
SELECT T0.Price FROM IGN1 T0
where IsNull(T0.Price, '0') = '0' and T0.DocEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @ERROR=1,@ERROR_MESSAGE='Please insert the price !'
END
end
Not tested but I think it works
Hi silva
I got the following error while execute the query in stored procedure
Msg 137, Level 15, State 2, Procedure _Tmsp_goodsreceiptwithoutprice, Line 11
Must declare the scalar variable "@OBJECT_TYPE".
Msg 137, Level 15, State 2, Procedure _Tmsp_goodsreceiptwithoutprice, Line 15
Must declare the scalar variable "@list_of_cols_val_tab_del".
Msg 137, Level 15, State 1, Procedure _Tmsp_goodsreceiptwithoutprice, Line 17
Must declare the scalar variable "@ERROR"
Hi Rathna,
Did you add the query in the [SBO_SP_TransactionNotification] ?
Normally this variables should be there.
This should be the beggining of the SP
ALTER proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20), -- SBO Object Type
@transaction_type nchar(1), -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
begin
-- Return values
declare @error int -- Result (0 for no error)
declare @error_message nvarchar (200) -- Error string to be displayed
select @error = 0
select @error_message = N'Ok'
"the query"
end
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.