Skip to Content
author's profile photo Former Member
Former Member

SP in Incoming Payment

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 21, 2008 at 03:18 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.