Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Problem importing a purchasing receipt/invoice document with eConnect stored procedures

Posted on by 215

I'm trying to import a receipt/invoice using taPopRcptHdrInsert, taPopRcptLineInsert and taPopRcptMultiBin.

I can get the header in with out a problem, but when I try to insert a line I get error 8053: Input variable contains a duplicate document (POPRCTNM). This seems totally odd since the POPRCTNM needs to tie between the header and the detail.

My stored procedure is a bit more involved, but passing the variables straight in like this produces the same error result:

DECLARE @HdrErr int

DECLARE @HdrErrString varchar(255)

EXECUTE [taPopRcptHdrInsert]

@I_vPOPRCTNM = 'RCT113005' --@NextReceiptNumber

,@I_vPOPTYPE = 3 --INVOICE/RECEIPT

,@I_vVNDDOCNM = 'IV1234' --@Invoice_Num

,@I_vreceiptdate = '2011-12-14' --@receiptdate

,@I_vACTLSHIP = '2011-12-14' --@receiptdate

,@I_vBACHNUMB = 'TEST' --@Invoice_Num

,@I_vVENDORID = 'E9000' --@Vendor_ID

,@I_vTRDISAMT=0 --Trade discount amount;not supposed to be needed but got error without

,@I_vAUTOCOST=0

,@O_iErrorState=@HdrErr output

,@oErrString=@HdrErrString output select @HdrErr, @HdrErrString

/** The header is created without a problem. **/

 

DECLARE @LineErr int

DECLARE @LineErrString varchar(255)

EXECUTE [taPopRcptLineInsert]

@I_vPOPTYPE = 3

,@I_vPOPRCTNM = 'RCT113005' --@NextReceiptNumber

,@I_vPONUMBER = 'PO111511' --@PO_Num

,@I_vITEMNMBR = 'NSD104U' --@Part_Num

,@I_vVENDORID = 'E9000' --@Vendor_ID

,@I_vRCPTLNNM = 32768 --@Line_Num

,@I_vVNDITNUM = 'ITEM_A' --@Vendor_Part_Num

,@I_vUNITCOST = 10.5 --@Unit_Cost

,@I_vEXTDCOST = 105 --@Ext_Cost

,@I_vBOLPRONUMBER = '-CLHU4553480' --@Container_Num

,@I_vQTYSHPPD = 10 --@Part_Qty

,@I_vQTYINVCD = 10 --@Part_Qty

,@I_vAUTOCOST = 0

,@I_vLOCNCODE = 'MAIN' --@InTransit_Site

,@I_vreceiptdate = '2011-12-14' --@receiptdate

,@I_vAutoAssignBin = 0

,@O_iErrorState = @LineErr OUTPUT

,@oErrString = @LineErrString OUTPUT

select @lineerr

//* This gives the 8053 error. **/

 

Can I upgrade eConnect to SP4 if GP is SP3 (Didn't know if the numbers match or it was a coincidence)? When I had a try at the import fail, it left a record in the table econnectouttemp, which I cleared out; is there anything else in Transaction Requester that could be holding this up?

*This post is locked for comments

  • Dave Dusek Profile Picture
    Dave Dusek on at
    Re: Problem importing a purchasing receipt/invoice document with eConnect stored procedures

    You have to import the lines first, then the header.  If you import the header first, you will get the duplicate error because it's checking if the document number exists in the header.  Switch your order around and you'll be fine.  

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans