on 10-21-2008 3:51 AM
Hi All,
I'd like to block the incoming payment being add by using SAP SP Notifications. Unfortunately the SP cannot block it, wolud you please help to check what's wrong with my SP. Here is my SP:
IF @transaction_type IN ('A','U') AND @object_type = '24'
BEGIN
IF EXISTS(SELECT T0.U_AcctName FROM DBO.ORCT T0
WHERE (T0.U_AcctName = '' OR T0.U_AcctName = '0') AND T0.DOCENTRY = @list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 1, @error_message = 'Account name must not be blank'
END
END
Note. U_AcctName is udf in payment header
Thanks and Regards
As what have you defined this UDF. What is the data type?
Do you have any valid values set on this feild and if so do you have a default value?
Please try the one below, as you reply my question
IF @transaction_type IN ('A','U') AND @object_type = '24'
BEGIN
IF EXISTS(SELECT T0.DocNum FROM [DBO].[ORCT] T0
WHERE (T0.U_AcctName IS NULL OR T0.U_AcctName = ' ') AND T0.DOCENTRY = @list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 1, @error_message = 'Account name must not be blank'
END
END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sudha,
Actually, previously i set this field as mandatory and set the default value as 'blank', and the datatype is 'Alphanumeric'. Now, i set it as not mandatory and move the default value. It because of that process?
btw, it works now based on updated query from you
Thanks and Regards
Edited by: Lailus Shobah on Oct 21, 2008 5:32 AM
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.