Skip to Content

Auto Increment Cardcode on BP in SAP Business One

Jan 28, 2017 at 07:45 PM


avatar image
Former Member

Hi everyone, I´m looking to do the auto increment on the business partners cardcode. I found some code on this thread and there´s this code that seems like what I need

If $[OCRD.CardType] in ('C' ,'L')
From OCRD T0
WHERE T0.CardCode LIKE 'C[0-9][0-9][0-9][0-9][0-9]'
else if $[OCRD.CardType] = 'S'
From OCRD T0
WHERE T0.CardCode LIKE 'V[0-9][0-9][0-9][0-9][0-9]' 

But where I´m supposed to put it? Also found this guide.

But it looks like the code only works with numeric cardcode and I have mine like 'C00001' for clients and 'P0001' for suppliers Anyone knows how can I do the auto increment? or how could I implement the code above?

Best Regards!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
DIEGO LOTHER Jan 28, 2017 at 08:38 PM

Hi Anderson,

Did you try to setup Document Numbering for Business Partner?

Go to -> Administration->System Initialization -> Document Numbering

The two first lines is related to Business partners.

Double click on the first column in first line. A new form will be opened.

Set up your Series like the second line in the screenshot. After create new series click on the button "Set as Default".

When you click on "Set as Default" button, SAP will ask you how to apply new configuration.

Do the same thing for the second line (Business Partners - Vendor).

The result:

Hope it helps.

Kind Regards,

Diego Lother

img1.png (27.7 kB)
img2.png (76.4 kB)
img3.png (28.0 kB)
img4.png (19.2 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Wow, that´s way easier! Thanks a lot Diego!