Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Suggested answer

eConnect importing payables transactions

Posted on by 75,730

When importing payables transactions using eConnect do I first import the distributions and the then the transaction? When importing the distributions do I need to supply the DSTSQNUM or will eConnect handle that? Also, if I supply the ACTNUMST value will it automatically get the ACTINDX value?

  • Suggested answer
    Isaac Olson Profile Picture
    Isaac Olson on at
    RE: eConnect importing payables transactions

    Always happy to help Richard!  :)

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: eConnect importing payables transactions

    You folks are the best. Is there any way I can drop something into your holiday stockings?

    In my case I was only inserting one side of the distribution. Once I did both the debit side and the credit side and inserted the transaction there was the batch with a new transaction. So now I have imports for SOP, POP and PM. My library keeps growing.

  • Suggested answer
    Isaac Olson Profile Picture
    Isaac Olson on at
    RE: eConnect importing payables transactions

    Hi Richard,

    If you are calling the stored procedures directly, you still need to follow the same order of the XML and the parameters still follows the same rules as the help CHM file.  

    taPMTransactionTaxInsert

    taPMDistribution

    taPMTransactionInsert

    After you run your inserts the data should be in the PM00400, PM10000, and PM10100, unless the stored procedure returned an error.  Here is an example of running it directly in SQL, you can tweak it as needed for your integration. If you need more in depth assistance on any of the fields or have further issues it may be best to address this through a support case so we can work with you directly.

    SET NOCOUNT ON

    BEGIN TRANSACTION

    DECLARE @O_iErrorState INT,

    @oErrString VARCHAR(255),

    @oRptString VARCHAR(255)

    /**taPMDistribution Debit**/

    SET @O_iErrorState=0 -- Reset Errors

    SET @oErrString=''

    EXEC taPMDistribution

    @I_vDOCTYPE='1',

    @I_vVCHRNMBR='00000000000001001',

    @I_vVENDORID='BEAUMONT0001',

    @I_vDSTSQNUM='16384',

    @I_vDISTTYPE='6',

    @I_vCRDTAMNT='0',

    @I_vDEBITAMT='500.00',

    @I_vACTNUMST='000-1100-00',--or you can use ACTINDX

    @O_iErrorState=@O_iErrorState OUT, @oErrString=@oErrString OUT

    SELECT @oRptString = 'SELECT ErrorCode, SourceProc, ErrorDesc FROM DYN18C..taErrorCode WHERE ErrorCode IN (' + REPLACE(RTRIM('0'+@oErrString),CHAR(32), ',') + ')'

    EXEC(@oRptString)

    /**/

    /**taPMDistribution Credit**/

    SET @O_iErrorState=0 -- Reset Errors

    SET @oErrString=''

    EXEC taPMDistribution

    @I_vDOCTYPE='1',

    @I_vVCHRNMBR='00000000000001001',

    @I_vVENDORID='BEAUMONT0001',

    @I_vDSTSQNUM='32768',

    @I_vDISTTYPE='2',

    @I_vCRDTAMNT='500.00',

    @I_vDEBITAMT='0.00',

    @I_vACTNUMST='000-1101-00',--or you can use ACTINDX

    @O_iErrorState=@O_iErrorState OUT, @oErrString=@oErrString OUT

    SELECT @oRptString = 'SELECT ErrorCode, SourceProc, ErrorDesc FROM DYN18C..taErrorCode WHERE ErrorCode IN (' + REPLACE(RTRIM('0'+@oErrString),CHAR(32), ',') + ')'

    EXEC(@oRptString)

    /**/

    ---- taPMTransactionInsert

    --====================================================================

    /**/

    SET @O_iErrorState=0 -- Reset Errors

    SET @oErrString=''

    EXEC taPMTransactionInsert

    @I_vBACHNUMB='BATCHID', --new or existing

    @I_vVCHNUMWK='00000000000001001',

    @I_vVENDORID='BEAUMONT0001',

    @I_vDOCNUMBR='TESTDOCNUMBER',

    @I_vDOCTYPE='1',

    @I_vDOCAMNT='500.00',

    @I_vPYMTRMID= '',

    @I_vDOCDATE='2017-02-10',

    @I_vPSTGDATE='2017-02-10',

    @I_vVADDCDPR='PRIMARY',

    @I_vDUEDATE='2017-02-20',

    @I_vPRCHAMNT='500.00',

    @I_vCHRGAMNT='500.00',

    @I_vTRXDSCRN='test',

    @I_vSHIPMTHD='MAIL',

    @I_vMDFUSRID='sa',

    @I_vPOSTEDDT='2017-02-15',

    @I_vPTDUSRID='sa',

    @I_vCREATEDIST= 0,--must be 0 if you are passing in your own distributions

    @O_iErrorState=@O_iErrorState OUT, @oErrString=@oErrString OUT

    SELECT @oRptString = 'SELECT ErrorCode, SourceProc, ErrorDesc FROM DYN18C..taErrorCode WHERE ErrorCode IN (' + REPLACE(RTRIM('0'+@oErrString),CHAR(32), ',') + ')'

    EXEC(@oRptString)

    /**/

    IF @O_iErrorState = 0

    COMMIT TRANSACTION

    ELSE

    ROLLBACK TRANSACTION -- Simplifies re-testing

    Thanks,

    Isaac Olson

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: eConnect importing payables transactions

    I am calling the stored procedure directly. I am not using the eConnect Class Library. Is it possible to do this? Do I first have to create batch, then import the distributions and finally the transaction?

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: eConnect importing payables transactions

    I tried executing the insert with a dummy transaction directly in SSMS and it does not appear in GP.

    exec [dbo].taPMTransactionInsert 'TEST','00000000000087321','3869','435451',1,384.00,'20201231',@O_iErrorState = 0,@oErrString=''

    There must be something else I need to do.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,730 on at
    RE: eConnect importing payables transactions

    Derek, I must be reading this list incorrectly. It is the same list as in the chm. It seems to be starting out with the PM transaction type XML schema and then you specify the PM transaction? I am calling the eConnect stored procedures directly from a C# program. I have confirmed using SQL profiler that when I call taPMTransactionInsert that it has the correct values for the required fields but when I run the code no transaction appears in GP. Do I need to insert the distributions first? What about the batch headers? Will eConnect create the batch header of do I need to invoke taCreateUpdateBatchHeaderRcd? Is there any sample code to which you can point me. There is nothing in the programmer's guide.

  • Suggested answer
    RE: eConnect importing payables transactions

    The CMH help file lists the order as this:

    <eConnect>

       <PMTransactionType>

           <eConnectProcessInfo />

           <taRequesterTrxDisabler_Items>

               <taRequesterTrxDisabler />

           </taRequesterTrxDisabler_Items>

           <taUpdateCreateVendorRcd />

           <taCreateVendorAddress_Items>

               <taCreateVendorAddress />

           </taCreateVendorAddress_Items>

           <taPMTransactionTaxInsert_Items>

               <taPMTransactionTaxInsert />

           </taPMTransactionTaxInsert_Items>

           <taPMDistribution_Items>

               <taPMDistribution />

           </taPMDistribution_Items>

           <taAnalyticsDistribution_Items>

               <taAnalyticsDistribution />

           </taAnalyticsDistribution_Items>

           <taPMTransactionInsert />

           <taMdaUpdate_Items>

               <taMdaUpdate />

           </taMdaUpdate_Items>

       </PMTransactionType>

    </eConnect>

    My understanding is that if you're providing more than 1 distribution line, then you should enter a DSTSQNUM value as the default is 0 if you do not.

    The parameters available are either ACTNUMST or ACTINDX.

    C:\Program Files (x86)\Microsoft Dynamics\eConnect ###\Help

    I'd refer to the Help file, as it has a chart with this information in it, and would be the documentation we would have to give.

    Thanks

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans