on 02-04-2011 2:33 PM
Hi
I want to restrict through S.P that a particular user should not be able to create A/P Invoice directly . User must copy it from GRPO.
Thanks
Hi RS,
Try this
IF @Object_type = N'18' and @transaction_type in (N'A', N'U')
BEGIN
declare @line5 int
SELECT @line5 = (T1.LineNum + 1)
From OPCH T0 inner join PCH1 T1 on T0.DocEntry = T1.DocEntry
Where T1.DocEntry = @list_of_cols_val_tab_del
and T1.[BaseType]!= N'20' and T0.DocType = 'I' and T0.UserSign = N'2'
Order by T1.LineNum
If (not ISNULL(@line5, 0) = 0)
BEGIN
Set @error = 10
Set @error_message = N'Line ' + CONVERT(nvarchar(4), @line5) + N' is not copied from GRPO!'
END
END
Change the usersign = '2' according to your requirement.
Regards,
Bala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.