Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

How to limit SOP batch size or break the batch into smaller batches

Posted on by 470

Is there a way to limit the number of transaction in a batch or a way to break them into smaller batches?  I have several batches which grow very large during the day.  The problem we are seeing is the batches are so large that when they post at night we encounter deadlocks and network interrupts before the batches finish posting thus hanging the posting process requiring batch recovery.  Does anyone have a script or automated process to break a batch into smaller batches to minimize the chances of encountering interrupts?

Thanks,  Dave

*This post is locked for comments

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Just to add my two cents here, I have a Visual Studio integration that imports hundreds of eExpense entries and it is set to create one batch for each 50 invoices. This elimated all batches errors that occurred with large batch postings.

  • Verified answer
    David.Ahalt Profile Picture
    David.Ahalt 470 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Thanks all appreciate the feedback.  Looks like a little stored proc is in order.

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Hi,

    I agree with the others. We've had to do this to manage the number of transactions coming in from the RMS systems. While not very elegant, we run a stored procedure before executing the post that scrolls through the batches and changes the batch ID after a set number of transactions. We first pull all of the 'postable' transactions out of the existing batches so that we have on huge batch containing everything we want to post.  Next, we traverse through that batch and change the batch ID after X number of batches.

    So far, it has been working.

    Kind regards,

    Leslie

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Hi Dave,

    It's been a minute since we've worked together.  Hope all is well in Kansas.  If you're using the web-service hit up Chad Larson on LinkedIn.  We capped SOP's at 200 per batch for a recent Xennsoft>GP integration.  He coded it and can point you in the right direction.

    Donnette

  • Frank Hamelly | MVP, MCP, CSA Profile Picture
    Frank Hamelly | MVP... 4,029 Super User 2024 Season 2 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    David, what tool is being used to integrate the orders into GP?

  • David.Ahalt Profile Picture
    David.Ahalt 470 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    These are being sent in from an online store on a continous basis as orders are submitted.  The volume of daily transactions has increased to a level much greater than projected when this was implemented a few years back.  I would normally recommend keeping batches to around 200 transactions but we are seeing much more.  I had seen a batch parsing tool/sql job a couple years back that would doing something like this but cannot find it.

  • Suggested answer
    Mahmoud Saadi Profile Picture
    Mahmoud Saadi 32,738 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Nothing more valuable to add, just to ensure what's your main target of this post. Is it to get this solved permanently so that you solve this problem once and forever, or just to handle the current huge batches in your system now.

    To handle this permanently, nothing out of the box in GP to handle this as Mr. Ian says, although simple customization either to prevent or pop up a warning message on the entry window is doable.

    In case you want to split your current batches for now, you may consider a simple macro to run through all the transaction and update the "Batch ID" field accordingly so that you could limit down the size of the batches.

    I will absolutely echo Mr. Richard suggestion in not considering a mass posting with no previous consideration as deadlock might result with undesirable results.

  • Suggested answer
    sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    David,

    Why don't you force user to use another batch after certain no of transactions. Through vba or Visual Studio Tools you can check on each batches no of transaction and force user to create new batch ID.

    Thanks

    Sandip

  • Ian Grieve Profile Picture
    Ian Grieve 22,782 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    David, there is no way to do this out of the box.

    How are your batches being created?

  • Suggested answer
    Richard Whaley Profile Picture
    Richard Whaley 25,195 on at
    RE: How to limit SOP batch size or break the batch into smaller batches

    Sorry, there is no way to limit the number of transactions in a batch.

    Are you using (or could you switch to using) Fulfillment Orders?  There is a sales multiple order to invoice transfer that allows you to select a range of orders that are fulfilled and transfer them to a new batch for posting.

    However, you mentioned nightly posting.  Do you post multiple batches at the same time?  Having more batches posting at the same time can make the deadlock problem worse.

    You may want to get a SQL expert to review the setup of your SQL.  It is possible to increase the number of threads, lengthen the time out, and several other changes that they would know best that could help.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans