cancel
Showing results for 
Search instead for 
Did you mean: 

Generate BP Code

Former Member
0 Kudos

Hi all!

I have created a formatted search which generates the business code automatically. Essentially it works with following query:

SELECT MAX(T0. CardCode)+1 FROM OCRD T0 WHERE T0.CARDTYPE= $[OCRD.CARDTYPE] FOR BROWSE

I want that the BP code only increases when I add a new data record. But currently the BP code also increases when Iu2019m just viewing the data record.

Regards,

Thilo Spiertz

Accepted Solutions (1)

Accepted Solutions (1)

K_Pauquet
Advisor
Advisor
0 Kudos

Hi Thilo,

please see SAP note Note [1058266|https://service.sap.com/sap/support/notes/1058266] - Automatic creation of consecutive alphanumeric BP codes.

You can always modify the query to suit your needs.

All the best,

kerstin

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you all!

Former Member
0 Kudos

You can check this thread to see if it applies to you:

Thanks,

Gordon

Former Member
0 Kudos

Hello,

how can I make the following query to work with a nummeric bp code?

select max(cardtype)                                       
+ cast(substring( max(cardcode), 2, len(max(cardcode)))    
+ 1 as nvarchar(10)) from ocrd                             
where cardtype = $[OCRD.CARDTYPE]

former_member186095
Active Contributor
0 Kudos

Hi Thilo,

There have been some answered and closed threads refer to your issue. You could use SAP B1 search function to find them

Rgds,