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

Approval Procedure

Hi Experts,

I need query for approval procedure to block sale order if a UDF field in BP master is null.

Thanks and regards,

Bharathiraja

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 21, 2015 at 01:08 AM

    Hi,

    Try this:

    SELECT distinct 'TRUE'

    FROM OCRD T0

    INNER JOIN ORDR T1 ON T0.CardCode = T1.CardCode

    WHERE T0.CardCode=$[$4.0.0] and T0.[U_UDF] is null

    Regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 20, 2015 at 02:01 PM

    TN will be better.

    IF @object_type = '17' AND @transaction_type = 'A'

    BEGIN

    IF (SELECT T1.U_TEST FROM ORDR T0 INNER JOIN OCRD T1 ON T0.CARDCODE = T1.CARDCODE AND T0.DOCENTRY = @list_of_cols_val_tab_del) IS NULL

    BEGIN

    SET @error = -5001;

    SET @error_message = N'U_TEST ON BP MUST NOT BE NULL';

    END

    END

    Frank

    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.