on 2022 Feb 07 5:05 AM
Hi Experts,
I wanted to create a customer who is also our vendor ,but when I am trying to add the customer it says duplicate bp name,this is beacuase of the query in sql,but If i dissable this query we will be able to create duplicated vendors or customers ,how to change this and make the bp into both customer and vendor but not to have 2 same name in vendor/customer.
-If 1 < (SELECT count(T1.CardName) FROM OCRD T1
--where T1.CardName in (SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode=@list_of_cols_val_tab_del))
--Begin
--SET @error = 1
--SET @error_message = N'Business Partner Name cannot be duplicated.'
--End.
SAP b1
Hi Prakash,
You cannot add records to the Business Partner Master Data with identical BP Code value as this will violate the primary key CardCode on the OCRD table.
To achieve the desired effect you can use the Connected Vendor/Customer functionality as follows:
1. Create two records in Business Partner Master data for Customer and Vendor.
2. On the Accounting tab of the created Customer, in the Connected Vendor field, choose the CardCode of the created Vendor (or vice versa):
Having accomplished this, you can apply the connection in Dunning Wizard and Internal Reconciliation among others, as well as in Ageing Report:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
as wojciech.wozniak said, you should also check based on CardType.
Before your code for comparison, define type as nvarchar(1) and do a SELECT "CardType" INTO type. Then you can concat CardName and Type to do the comparison and allow / deny creation of partner.
BR,
Matija
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.