Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

SOP40500 table

Posted on by 725

I have a customization that I inherited that creates Sales Orders from a stored procedure.  Occasionally it fails when it tries to write the master number into the SOP40500 table.  I use the stored procedure sopGetMasterNumber to get the next master number.  I'm guessing I'm hitting a locking issue with some other process and I guess I could put some code into it to deal with that.  Do I still need to write the new master number to this table?  It's a single column with lots of records.  The customization was written probably before or for GP 9.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: SOP40500 table

    Hi,

    I created a stored proc .but my issue is at which point i have to call the stored proc.

    Can you please suggest me when and where to call the store proc to get the available master number

    Thanks.

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: SOP40500 table

    If your app is out side of GP, create small stored procedure(sp).  when your order don't get created and you get exception,  you just need to call this sp.

    In sp you need to do the following.

    First delete that master number from SOP40500.

    And then check in SOP40100, if the next master number  is greater then the master number of order which didn't get created then update next master number with that lower master number. If not greater then don't need to do anything.

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: SOP40500 table

    It reads next master number from sop40100 and insert it into sop40500, sop40500 list all the used master numbers.

  • Suggested answer
    Mahmoud Saadi Profile Picture
    Mahmoud Saadi 32,738 on at
    RE: SOP40500 table

    Dynamics Innovations; di.jo, has a customized Addin for serial number for almost all GP windows; AP, AR, POP, SOP, inventory and Bank Reconciliation.

    I have personally tested this product and find it quite reliable especially that it has a setup window which can provide more than one serial criteria per one GP Company.

  • Suggested answer
    bwholl Profile Picture
    bwholl 725 on at
    RE: SOP40500 table

    Unfortunately my application is outside of GP.  I don't have a problem getting the next master number but it's the inserting into the SOP40500 table that causes me some problems.  The code (I didn't write it, I'm just stuck trying to keep it running) is old and I was hoping I didn't need to write into the SOP40500 table.  I spend some time working on my error handling to fix the issue.  Thanks.

  • bwholl Profile Picture
    bwholl 725 on at
    RE: SOP40500 table

    I looked at the sopGetMasterNumber and it does update the SOP40100 table with an incremented NXTMSTNO.  I just did not and still don't understand the need for the SOP40500 table if you are always getting your next master number from SOP40100.

  • Almas Mahfooz Profile Picture
    Almas Mahfooz 11,003 User Group Leader on at
    RE: SOP40500 table

    Why you feel about locking issue with some other resource, it's not e-connect stored procedure.

    sopGetMasterNumber just return the next available Master Number and nothing else, if there are 100 users login to GP it works perfectly , but if some user decided to not save document (order/invoice etc) and close window and delete the selected document number then on window close and delete GP procedure free that document and master number.

    If you log GP , you can find this line.

    'Replace_Master_Number of form SOP_Entry', 1, 1, 486, table 'SOP_SETP'

    So what you need to do is to when due to any reason when your order don't get created you just need to call that in your dex code.so master number will get free for future use.

  • Suggested answer
    Ian Grieve Profile Picture
    Ian Grieve 22,782 on at
    RE: SOP40500 table

    SOP40500 is the Sales order Processing Master Number SETUP table. I would recommend to continue writing back the next number after you have used the current one. If you don't next time you get the key you will get the used one unless a document is entered in GP between your reads.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans