Skip to Content
author's profile photo Former Member
Former Member

Automatic creation next Serial Number in Customer Equipment Card

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 07:09 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2008 at 01:34 PM

    Hi Tim,

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

    Julius

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.