on 07-21-2016 7:37 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.