Skip to Content

Sp Transaction Notification

Hi Everyone,

Can anyone help me in the Sp notification where the condition is "CardName" length should not be greater than 5.

Please find the below Sp Transaction Notification.

If @object_type = '2' and @transaction_type in ( 'A')

BEGIN

If exists (Select I.CardName From OCRD I

Where I.CardFName!=@list_of_key_cols_tab_del AND LEN(I.CardName)<=5)

bEGIN

select @error =12

select @error_message = 'Business Partner Character length is more!!'

END

END

Thanks & regards

Vedanth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2016 at 07:03 AM

    Hello Vedanth,

    Please try with below query:

    If @object_type = '2' and @transaction_type in ('A')

    BEGIN

    If exists (Select I.CardName From OCRD I

    Where I.CardName!=@list_of_key_cols_tab_del AND LEN(I.CardName)<=5)

    BEGIN

    select @error =12

    select @error_message = 'Business Partner Character length is more!!'

    END

    END

    Also I would like to ask if weather you want to keep blockage for Business partner Code or Name? If you wanna keep it on Name, then above query will help out.

    Regards,

    Kuldeep

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2016 at 08:53 AM

    If @object_type = '2' and @transaction_type in ( 'A')

    BEGIN

    If exists (Select I.CardName From OCRD I

    Where I.CardCode = @list_of_cols_val_tab_del AND LEN(I.CardName)<=5)

    bEGIN

    select @error =12

    select @error_message = 'Business Partner Character length is more!!'

    END

    END

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 21, 2016 at 09:47 AM

    Hi Vedanth,

    Try below query ...

    If @object_type = '2' and @transaction_type in ( 'A')

    BEGIN

    If exists (Select T0.CardName From OCRD T0

    Where T0.CardCode = @list_of_cols_val_tab_del AND LEN(T0.CardName)<=5)

    bEGIN

    select @error =12

    select @error_message = 'Business Partner Character length is more...'

    END

    END

    Rgds,

    Kamlesh Naware

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2016 at 05:33 AM

    Hi ,

    Try this

    If @object_type in ('2','002','02') and @transaction_type in ( 'A')

    BEGIN

    If (Select Len(I.CardName) From OCRD I

    Where I.cardcode=@list_of_cols_val_tab_del ) >5

    bEGIN

    select @error =12

    select @error_message = 'Business Partner Character length is more!!'

    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.