Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Error Number = 2697 Stored Procedure= taSopHdrIvcInsert Error Description = Line items contain qauntity types that are not allowed for the Order DOCID entered

Posted on by 180

Hi All,

I'm trying to sync the order getting below error.Can any one please suggest me in this.

Error Number = 2697  Stored Procedure= taSopHdrIvcInsert  Error Description = Line items contain qauntity types that are not allowed for the Order DOCID entered

Thanks in advance,

Pavan G.

*This post is locked for comments

  • Suggested answer
    Craig Fuller Profile Picture
    Craig Fuller 409 on at
    RE: Error Number = 2697 Stored Procedure= taSopHdrIvcInsert Error Description = Line items contain qauntity types that are not allowed for the Order DOCID entered

    I ran into a virtually identical error using SmartConnect when trying to create Back Orders. The error was:

    Error Number = 2695 Stored Procedure=taSopHdrIvcInsert Error Description=Line items contain qauntity types that are not allowed for the Back Order DOCID entered

    We do not allow backorders to be transferred to Fulfillment Orders or Invoices so in Sales Document Setup for our Back Order ID the "Transfer Back Order to Fulfillment Order/Invoice" was not checked (it is checked in the attached image).

    pastedimage1568304254773v2.png

    After checking this and selecting an Invoice ID, the backorder gets created, however the quantity is applied to "Quantity to Invoice" instead of "Quantity to Order", even though the Default Quantities in setup is set to "to Order".

    Essentially, I believe taSopHdrIvcInsert is not recognizing the settings specified in the Sales Document Setup, at least when dealing with my Back Order scenario. Hopefully this will help point you to the solution and/or a workaround. In our case it was used for an initial import so once that was done I unchecked the Invoice option again.

    Please mark as answered if this answered your question.

  • Lucas Miller Profile Picture
    Lucas Miller on at
    RE: Error Number = 2697 Stored Procedure= taSopHdrIvcInsert Error Description = Line items contain qauntity types that are not allowed for the Order DOCID entered

    Hello Pavan,

    Here is the data check in taSopHdrIvcInsert that determines if Error Number 2697 should be returned:

    if (@I_vSOPTYPE = 2)

    begin

    if ((@ORDTOBAC = 0) and (exists(select 1 from SOP10200 (nolock) where QTYTBAOR > 0 and SOPTYPE =    @I_vSOPTYPE and SOPNUMBE = @I_vSOPNUMBE)))

    To find the value of @ORDTOBAC run the following (substituting your DOCID for STDORD):

    SELECT ORDTOBAC,* FROM SOP40200

    WHERE DOCID = 'STDORD'

    AND SOPTYPE = 2

    You can then run the following, entering your SOPNUMBE value for the variable:

    select * from SOP10200

    where QTYTBAOR > 0

    and SOPTYPE = 2

    and SOPNUMBE = @I_vSOPNUMBE

    Basically, your Sales Order DOCID is not setup to allow back orders, but you're back-ordering some quantity on the lines you've imported for this order.  You can look at this setting in GP by going to the Sales Order Processing Setup window, select the Sales Document Setup button, select Order, pull up your Order ID and looking at the "Transfer Order to Back Order' option.

    Lucas

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