Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

creating a credit memo with eConnect

(0) ShareShare
ReportReport
Posted on by

Hi,

I need to create a credit memo (for damaged goods) from a c# program and import it into GP using eConnect. I tried to use a code similar as the code to import a new invoice (by changing the DOCType) but it does fails saying:

Message: Error Number = 183 Stored Procedure taSopLineIvcInsert Error Description = Line quantity does not equal the return types (QUANTITY <> QTYINSVC+QTYINUSE+QTYDMGED+QTYRTRND+QTYONHND)

This is the document I'm sending

Thank,

Ignacui

<?xml version="1.0" encoding="utf-8"?>
<eConnect xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema">
<SOPTransactionType>
<eConnectProcessInfo xsi:nil="true" />
<taRequesterTrxDisabler_Items xsi:nil="true" />
<taUpdateCreateItemRcd xsi:nil="true" />
<taUpdateCreateCustomerRcd xsi:nil="true" />
<taCreateCustomerAddress_Items xsi:nil="true" />
<taSopSerial_Items xsi:nil="true" />
<taSopLotAuto_Items xsi:nil="true" />
<taSopLineIvcInsert_Items>
<taSopLineIvcInsert>
<SOPTYPE>4</SOPTYPE>
<SOPNUMBE>100193 </SOPNUMBE>
<CUSTNMBR>EC1070 </CUSTNMBR>
<DOCDATE>08/18/2015</DOCDATE>
<ITEMNMBR>032 </ITEMNMBR>
<UNITPRCE>2.2</UNITPRCE>
<XTNDPRCE>2.2</XTNDPRCE>
<QUANTITY>1</QUANTITY>
<ITEMDESC>RECONDO TOAST REGULAR</ITEMDESC>
<DOCID>RTN</DOCID>
<SLPRSNID>02 </SLPRSNID>
<ADDRESS1>1200 PALM AVENUE</ADDRESS1>
<CITY>HIALEAH</CITY>
<ACTLSHIP>08/18/2015</ACTLSHIP>
<CURNCYID>Z-US$ </CURNCYID>
</taSopLineIvcInsert>
</taSopLineIvcInsert_Items>
<taSopLineIvcInsertComponent_Items xsi:nil="true" />
<taSopTrackingNum_Items xsi:nil="true" />
<taSopCommissions_Items xsi:nil="true" />
<taSopLineIvcTaxInsert_Items xsi:nil="true" />
<taCreateSopPaymentInsertRecord_Items xsi:nil="true" />
<taSopUserDefined xsi:nil="true" />
<taSopDistribution_Items xsi:nil="true" />
<taAnalyticsDistribution_Items xsi:nil="true" />
<taSopMultiBin_Items xsi:nil="true" />
<taSopHdrIvcInsert>
<SOPTYPE>4</SOPTYPE>
<DOCID>RTN</DOCID>
<SOPNUMBE>100193 </SOPNUMBE>
<DOCDATE>08/18/2015</DOCDATE>
<CUSTNMBR>EC1070 </CUSTNMBR>
<CUSTNAME>EL CAMPO FRUTERIA</CUSTNAME>
<ADDRESS1>1200 PALM AVENUE</ADDRESS1>
<FAXNUMBR>00088210700000</FAXNUMBR>
<CITY>HIALEAH</CITY>
<STATE>FL</STATE>
<ZIPCODE>33010</ZIPCODE>
<COUNTRY>USA</COUNTRY>
<SUBTOTAL>2.2</SUBTOTAL>
<DOCAMNT>2.2</DOCAMNT>
<SLPRSNID>02 </SLPRSNID>
<BACHNUMB>Imported Batch</BACHNUMB>
<CURNCYID>Z-US$ </CURNCYID>
</taSopHdrIvcInsert>
<taSopToPopLink xsi:nil="true" />
<taSopUpdateCreateProcessHold xsi:nil="true" />
<taCreateSOPTrackingInfo xsi:nil="true" />
<taMdaUpdate_Items xsi:nil="true" />
</SOPTransactionType>
</eConnect>

*This post is locked for comments

  • Suggested answer
    David Rueter Profile Picture
    on at
    RE: creating a credit memo with eConnect

    In addition to passing in QUANTITY you must also pass the same value in QTYRTRND.

    I made this change, and it works fine for me now.  

  • David Rueter Profile Picture
    on at
    RE: creating a credit memo with eConnect

    Just a "me too" reply here:  I am having the same problem when trying to call taSopLineIvcInsert with SOPTYPE=4 and DOCID=RTN.

    I have no problems creating an order (SOPTYPE=1).

    In my case I am directly calling the eConnect stored procedure:

           EXEC @RC = TEST.dbo.taSopLineIvcInsert

            @I_vSOPTYPE = @I_vSOPTYPE,

            @I_vSOPNUMBE = @I_vSOPNUMBE,

            @I_vLNITMSEQ =  @I_vLNITMSEQ,  

            @I_vCUSTNMBR = @I_vCUSTNMBR,

            @I_vDOCDATE = @I_vDOCDATE,

            @I_vITEMNMBR = @I_vITEMNMBR,

            @I_vUNITPRCE = @I_vUNITPRCE,

            @I_vXTNDPRCE = @I_vXTNDPRCE,    

            @I_vQUANTITY = @I_vQUANTITY,    

            @I_vUpdateIfExists = @I_vUpdateIfExists,    

            @O_iErrorState = @O_iErrorState OUTPUT,

            @oErrString = @oErrString OUTPUT

    SOPTYPE = 4, and all other values seem to be correct.  (These same values work when SOPTYPE = 1.)

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans