cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic creation next Serial Number in Customer Equipment Card

Former Member
0 Kudos

We are looking for the right query so that the Serial Number in Customer Equipment Card (OINS - InternalSN) automaticly increases by 1.

We always create our own Serial Numbers and do not use Serial Number Management. The Serial Numbers are also the unique numbers (under General Settings - Stock - Items - Unique Serial Numbers by).

We already found this query on the forum: SELECT MAX(T0.CardCode)1 FROM [dbo].[OCRD] T0 and altered this to: SELECT MAX(T0.InternalSN)1 FROM [dbo].[OINS] T0

We put the Customer Equipment Card in create (not Find). After that we put a Formatted Search in the field OINS - InternalSN with the query above, selected Auto Refresh When Field Changes, selected the field Item No. and selected Refresh Regularly.

What do we have to change to get it work.

Best Regards,

Tim

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

I would suggest you go with the default Sap businessone function .

You can increase it automatically by one

Prefix : alphabet or alphanumneric

Suffix : Number -- ascending order

Hope this helps

Bishal

Former Member
0 Kudos

Hello Bishal,

Do you mean that I have to create the Seriel Numbers with Serial Number Management?

This is not an option for us, because there about 60 items (in our case instruments) with Serial Numbers. In the Item Master Data none of these items are selected as: Serial and Batch Numbers ... Manage item by: Serial Numbers.

The registration of Serial Numbers is done manually, because we have found out that this has more advantages for our company.

So if there is another way to create the Serial Numbers as you suggested (suffix, prefix), please let me know how and where I can find this in Business One. Or please explain to me if you use Serial Number Management how to create Serial Numbers for 60 different items, if you do not have concern about the amount now and in future.

Otherwise has anyone a solution for the query.

We are on 2007A PL 39

Best Regards,

Tim

Former Member
0 Kudos

Hi

In SAP B1 ,you can manage serial number on your own .You have to define Item master data manage by serial number .

One you receive item ,it will ask you put serial number

1.Click automatic creation

2.Go to serial number and press expanded button

3. You will see form --

set up like this

String Type Operation

Apple String No operation

101 Number Increasing

so for 10 item -it will create 10 serial number automatically For example --Apple101,apple 102

Hope this helps .

Thank you

Bishal

Note : Please test scenario in test environment before you implement .

Former Member
0 Kudos

Thanks for the answer.

The solution you gave doesn't solve our situation.

In your case you are always stuck to a certain amount. So if you buy 20 pieces you only can create 20 Serial Numbers for that particular item. As we have 60 different items with Serial Numbers for each item you have to create Serial Numbers in advance.

We want to create the Serial Number at the moment we are creating a Customer Equipment Card.

So the best solution for us is that the field automaticly increases by 1 when you create a new Customer Equipment Card. In that case you are never have to border about amounts of an item or which item it is.

So if anyone can help me out with the query I would be very pleased.

-


I found the problem. The Serial Numbers in our database are not sequel. So instead of the Serial Number we are using the Customer Equipment Card ID (OINS - InsID).

So the query we are using is:

SELECT MAX(T0.InsID)+1 FROM [dbo].[OINS] T0

With a Formatted Search we have inserted this query to the field Serial Number.

This works ok!

Best regards,

Tim

Edited by: T. Verholt on Sep 23, 2008 9:50 AM

Former Member
0 Kudos

Hi Tim,

I was not able to reproduce your issue. Please check it on version 2007A PL41.

Julius

Former Member
0 Kudos

Hello Julius,

Did you try the query in 2007A PL41 and did it work in that version?

Please, give me a short notice!

Best regards,

Tim