web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Dynamics GP Invoice Line numbers

(0) ShareShare
ReportReport
Posted on by

Why are some invoice line numbers in multiple of 16384?  What is the logic behind this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    L Vail Profile Picture
    65,271 on at

    Hi CRC,

    They did that so that you'd have plenty of room to insert additional rows.  There's no magic to the 16384, they really could have used anything.

    Kind regards,

    Leslie

  • Suggested answer
    Community Member Profile Picture
    on at

    How about this:

    SNO Line No Binary

    1 16384 100000000000000

    2 32768 1000000000000000

    3 49152 1100000000000000

    4 65536 10000000000000000

    5 81920 10100000000000000

    Cheers!

    Sanjay

  • L Vail Profile Picture
    65,271 on at

    Sanjay,

    I don't get it. I recognize the significance of 16384, but why the binary equivalent? Isn't it true that my data would be just as valid if I decided to number the lines 100, 200, 300, etc.? In fact, you could just number them 1,2,3,etc so long as you don't expect to insert rows. Yes?

    Leslie

  • Community Member Profile Picture
    on at

    Agree with you  - it can be any thing -  what ever number you want.  The question really was why the default is 16384 ?  I have always wondered why - and in one of my lean day analysis  when I learned that processors read numbers left to right,  decided to convert the number from decimal to binary - the pattern provides some explanation - it might be the bits are filled at fixed length field and what we see as decimal actually would be a start for a binary pattern.   --  It would be interesting if David Musgrave gives the story behind it.

    One more point, there are caveats for  it can be any thing... but ....

    dynamicsgpblogster.blogspot.com/.../scrolling-windows-and-line-sequence.html

    Cheers!

    Sanjay

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,151 Most Valuable Professional on at

    Hi

    The 16384 sequence number increment is used so that lines can be inserted multiple times. It is used as it is a power of 2 which means it can be divided by 2 multiple times and remain a whole number. ie. no fractions. 16884, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1.

    Each time you insert a line in a transaction, the new line number is the mid point between the line before (or 0 is this is the first line) and the line after.

    More recently on GL transactions the increment was changed to 500. This was purely because on a very large journal will many, many lines incrementing by 16384 could exceed the maximum value for the sequence number and generate errors. To avoid this issue, the increment was changed to 500. This can only be divided  a few times before getting a fraction 500, 250, 125, 62.5. But most people don't insert lines on GL transactions much anyway.

    I hope this explains the reasoning behind using 16384.

    Thanks

    David

  • Community Member Profile Picture
    on at

    This does not make sense to me.  Why not use 1, 2, 3, 4,...n.  Send your invoice to an EDI Trading Partner which matches the PO line numbers to your Invoice line numbers.  They reject your EDI invoice!  That's what happened to us!  So we have to use the formula LineNumber = LNITMSEQ/16384.  

  • David Musgrave MVP GPUG All Star Legend Moderator Profile Picture
    14,151 Most Valuable Professional on at

    If you have consecutive numbers, there are no "gaps" to be able to insert lines.

    Please note that using LineNumber = LNITMSEQ/16384 will fail if a line has been inserted or deleted.

    For example:

    8192  = 0.5 line inserted

    16384 = 1

    32768 = 2

    line deleted

    65536 = 4

    Depending on how you are generating you EDI invoice, there are ways to get consecutive integer line numbers.

    David

  • Victoria Yudin Profile Picture
    22,769 on at

    You could use the following code to 'translate' the LNITMSEQ to sequential numbers:

    select SOPNUMBE, SOPTYPE,

    row_number() over (partition by SOPNUMBE, SOPTYPE

        order by LNITMSEQ) LineNumber,

    LNITMSEQ, ITEMNMBR

    from SOP10200

    (from the GP Reports Viewer newsletter archive: archive.constantcontact.com/.../1113227358859.html)

  • Community Member Profile Picture
    on at

    Thank you David ,Leslie, Victoria -

    Cheers!

    Sanjay

  • Community Member Profile Picture
    on at

    This still makes no sense!  Why use a formula?  Why not let the system serialize line numbers with natural flow of decimal numbers from 1 through n?  Why not open up the entry screen to include line numbers so we can control line numbering to match EDI PO's line numbering???

    What big company inserts 16383 lines in between??

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Dan Liebl Profile Picture

Dan Liebl 2

#2
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans