Skip to Content

Non Duplicate Vendor Ref. No. for some BP

I need to place control to allow duplicate Vendor Ref No. in Sales Order for all BPs but 1

Exception is ABC100

if @object_type='17' and @transaction_type in ('A','U')

begin

if not exists ( select numatcard from ORDR where docentry=@list_of_cols_val_tab_del and (CardCode in ('ABC100') and NumAtCard not in (select distinct NumAtCard from ordr)) or (CardCode not in ('ABC100') ) )

begin

set @error=1

set @error_message='Only Non Duplicate Customer Ref. No. for this BP'

end

end

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 27, 2019 at 01:56 PM

    Hi Krishnam Mathur,

    Slightly Changed. check this code.

    if @object_type='17' and @transaction_type in ('A','U')

    begin

    if exists ( select numatcard from ORDR where docentry=@list_of_cols_val_tab_del and (CardCode <>'ABC100') and NumAtCard in (select distinct NumAtCard from ordr))

    begin

    set @error=1

    set @error_message='Only Non Duplicate Customer Ref. No. for this BP'

    end

    end

    Regards,

    Chella

    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.