cancel
Showing results for 
Search instead for 
Did you mean: 

SP in Incoming Payment

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member583013
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

former_member583013
Active Contributor
0 Kudos

Great. If it works then you should mark the thread answered.

Suda

Answers (0)