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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Unbelievable: Subtotal does not match the line item totals

(0) ShareShare
ReportReport
Posted on by 215

This the final piece of a 3-month integration project and I'm pulling my hair out.  GP is returning this subtotal error (2006  Stored Procedure taPopRcptHdrInsert) at completely random times.

I've actually seen cases where GP will reject my XML with this error... then 10 minutes later, it will go in just fine - WITH THE SAME EXACT XML!

I've read a lot on this... Don't specify the SUBTOTAL (which fails for me).  Don't specify the EXTCOST (which also fails for me).  Having seen the same failing XML actually pass sometimes makes me feel like it's something I need to change in the vendor in GP.  Any troubleshooting ideas would be much appreciated!

I suppose I should show a simple sample.  Due to the project, I'm forced to define my own distributions - here it is:

<taPopRcptLineInsert_Items>

     <taPopRcptLineInsert>

       <POPTYPE>3</POPTYPE>

       <POPRCTNM>3009PU</POPRCTNM>

       <ITEMNMBR>3636-C</ITEMNMBR>

       <ITEMDESC>36x36 Core</ITEMDESC>

       <VENDORID>DELL01</VENDORID>

       <RCPTLNNM>1</RCPTLNNM>

       <VNDITNUM>3636-C</VNDITNUM>

       <INVINDX>1</INVINDX>

       <UOFM>ea</UOFM>

       <UNITCOST>100</UNITCOST>

       <EXTDCOST>200</EXTDCOST>

       <NONINVEN>1</NONINVEN>

       <QTYSHPPD>2</QTYSHPPD>

       <QTYINVCD>2</QTYINVCD>

       <LOCNCODE>WAREHOUSE</LOCNCODE>

     </taPopRcptLineInsert>

   </taPopRcptLineInsert_Items>

   <taPopDistribution_Items>

     <taPopDistribution>

       <POPTYPE>3</POPTYPE>

       <POPRCTNM>3009PU</POPRCTNM>

       <ACTNUMST>000-4510-01</ACTNUMST>

       <DEBITAMT>200</DEBITAMT>

       <DISTTYPE>1</DISTTYPE>

       <VENDORID>DELL01</VENDORID>

     </taPopDistribution>

     <taPopDistribution>

       <POPTYPE>3</POPTYPE>

       <POPRCTNM>3009PU</POPRCTNM>

       <ACTNUMST>000-2100-00</ACTNUMST>

       <CRDTAMNT>200</CRDTAMNT>

       <DISTTYPE>7</DISTTYPE>

       <VENDORID>DELL01</VENDORID>

     </taPopDistribution>

   </taPopDistribution_Items>

   <taPopRcptHdrInsert>

     <POPRCTNM>3009</POPRCTNM>

     <POPTYPE>3</POPTYPE>

     <VNDDOCNM>3009</VNDDOCNM>

     <receiptdate>03/07/2014</receiptdate>

     <BACHNUMB>030714</BACHNUMB>

     <VENDORID>DELL01</VENDORID>

     <VENDNAME>Dell, Inc.</VENDNAME>

     <SUBTOTAL>200</SUBTOTAL>

     <PYMTRMID>(none)</PYMTRMID>

     <CREATEDIST>0</CREATEDIST>

   </taPopRcptHdrInsert>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    soma Profile Picture
    24,410 on at

    If you want to provide Unit Cost value manully, please add the parameter <AUTOCOST> 0 </AUTOCOST> and remove the  parameter <EXTDCOST>200</EXTDCOST> from the <taPopRcptLineInsert> node.

    Because GP will calculate the value for extended cost based on quantity invoiced and unit cost(qty*unit cost). <AUTOCOST> 0 </AUTOCOST> . Otherwise, pass the value <AUTOCOST> 1 </AUTOCOST> and set unit cost null with no extended cost parameter. GP will calculate unit cost and extended cost automatically.

    If you want to provide Sub Total value manually, please add the parameter <AUTOCOST> 0 </AUTOCOST> to the <taPopRcptHdrInsert> node and provide the sub total values.

    Or If you want automatic subtotal, add the parameter <AUTOCOST> 1 </AUTOCOST> to the <taPopRcptHdrInsert> node and set the value for subtotal to  <SUBTOTAL>0.00</SUBTOTAL>.

    Hope this helps!!!

  • LordSupafly Profile Picture
    215 on at

    Thank you for your suggestions.  I played with AUTOCOST and it appears that I will not be able to use it because I don't have a PO to work with.  These are receipts being directly input and all the line items have costs manually set each time.

    So I specifically set the AUTOCOST= 0, but the result is the same.  I set the subtotal = 200, 1 line item quantity = 2, unit cost = 100 (and I removed the EXTCOST = 200).  Somehow, it still says the subtotal doesn't match.

  • Verified answer
    soma Profile Picture
    24,410 on at

    If you want to provide Unit Cost value manully, add the parameter <AUTOCOST> 0 </AUTOCOST> and remove the  parameter <EXTDCOST>200</EXTDCOST> from the <taPopRcptLineInsert> node.

    And add the parameter <AUTOCOST> 1 </AUTOCOST> to the <taPopRcptHdrInsert> node and set the value for subtotal to  <SUBTOTAL>0.00</SUBTOTAL>.

    Hope this helps!!!

  • LordSupafly Profile Picture
    215 on at

    Soma, thank you for the clarification.  I didn't realize there was a difference between AUTOCOST on the header and AUTOCOST on each line item.

    Although the change you suggested didn't actually fix the problem, it was the troubleshooting step I needed to find the answer!  When I turned on autocost for the header and set the subtotal to 0, I noticed that it went through without line items.  It turns out, I was sending in the line items with a slightly different POPRCTNM than the header and the line items were NOT matching up to the purchase order.

    If you look at my sample above, you can even see the header (3009PU) and the line items (3009).  So the subtotal of the line items for 3009PU was, in fact, $0.

    The reason the same code was working sometimes is because some of my orders didn't have a suffix.  In those cases, the POPRCTNM did match.

    Anyway, thank again - your troubleshooting tip was a lifesaver!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans