cancel
Showing results for 
Search instead for 
Did you mean: 

Business Partner Code

Former Member
0 Kudos

Hi

  I want to check during Add or Update of Business Partner if user has selected group "Customer" B.P Code first character should be "C" . If user has selected group "Vendor" B.P Code first character should be "V" , if user has selected group "Leads" B.P Code first character should be "L" . How it can be done using Stored Procedure Notification.

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi sunny,

Goto

Administration --> System Initialization --> Document Numbering

then you have the following window

press ctrl+double click on business partner vendor/customer.

Here right click on first row select add row then define your series.

if you want 'V'  is your vendor starting letter then put 'v' at prefix.


0 Kudos

Hi, I have an issue only with Leads. All other BP codes work fine, but Leads won't give me the next one available and I have added one with L0001 already.

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi Sunny Brar,

Try this:

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

BEGIN

declare @t char(1)

set @t=(Select p.CardType from OCRD p

     where p.cardcode=@list_of_cols_val_tab_del)

if @list_of_cols_val_tab_del !=

(Select case @t

When 'S' then 'V'

When 'C' then 'C'

When 'L' then 'L' end

+isnull(substring(str(100000+max(right(p.CardCode,5))+1,6),2,5),

        '00001')

From OCRD p

Where p.CardCode like '%[0-9][0-9][0-9][0-9][0-9]'

  and p.CardType=@t

  and p.cardcode!=@list_of_cols_val_tab_del)

Select @error =1,

@error_message = 'Partner code invalid !'

END

Hope helpful.

Thanks & Regards,

Nagarajan

Former Member
0 Kudos

Sunny,

The numbering of documents for Customer and Supplier does not meet your need?

Administration --> System Initialization --> Document Numbering

Regards,

Marcelo Silva Santos