Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,


      I know where the error is coming. When I tried putting alphanumeric characters on the UDF, I also encountered same as you.


      Unnikrishanan's query will be perfect for you.


      Regards,


  • 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 comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Frank,

      If i apply TN, then document will be blocked. In my case document should go for approval. So TN will not fulfill my requirement.