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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Apply payable credit document programmatically

(0) ShareShare
ReportReport
Posted on by 4,130

Hi,

I'm trying to create payable credit document using eConnect which is fine but I need also to apply these document against exiting voucher programmatically. it seems eConnect does not cover that procedure.

What would be the most efficient/easiest way to handle this?

Appreciated.

 

*This post is locked for comments

I have the same question (1)
  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    Hello Alaa,

    If the eConnect procedure(s) to create the payable credit document isn't doing exactly what you're needing to be done, such as apply the document against exiting vouchers, one option you have is to use the 'post' eConnect procedure to add that processing into, because with each eConnect procedure, there is a 'pre' and a 'post' procedure that runs with it and these two procedures are not encrypted, meaning you can modify them as see fit.

    We frequently see users modifying these procedures in order to get eConnect to do exactly what they need done, when faced with a limitation of the eConnect procedure itself.

    Thanks,

  • Alaa Ramadan Profile Picture
    4,130 on at

    Thanks Derek but eConnect does not include a method for apply payable transaction. it DOES for RM but not for PM unless I'm missing anything!

    Thanks

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    You're correct. I thought you had already found a eConnect procedure that did what you wanted, just not completely which is why I mentioned the Pre and Post procedures.

    Looking at my GP environment (GP 2018 R2 in this case), for PM eConnect procedures, I see the following (removing the Pre and Post procedures) :

    taPMDistribution

    taPMDistributionBuild

    taPMDistributionCreate

    taPMDistributionInsert

    taPMManualCheck

    taPMSchedPmnts

    taPMTransactionInsert

    taPMTransactionTaxInsert

    As for creating payables credit documents, I don't see anything for eConnect mentioning that, the only reference to 'credit' anything in eConnect procedures is to create credit cards, nothing under PM.

  • Alaa Ramadan Profile Picture
    4,130 on at

    I do not have issue with creating credit memo. eConnect has taPMTransactionInsert which allow to create all type of PM transactions including Invoice, Return, Credit Memo.

    What I was looking for is a way to programmatically apply newly created pm credit memo against posted pm invoice. eConnect does not has such thing. so I will have to populate some tables through the code, in particular PM10200 and PM20100. its tedious job but I'm almost done anyway and it seem to be working fine.

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    Sounds like you have a handle on what you need to do then...…

    I was just going to say that there is a taPMTransactionInsertPost procedure that runs after the taPMTransactionInsert procedure, that you could use to put the code to 'apply newly created PM credit memo against the posted pm invoice' into, if you're not doing so already, that would run together and do the complete process that you're looking to have done.

    Thanks for all the information.

  • Custom Profile Picture
    20 on at

    Hi,\

    I don't see any taPMTransactionInsertPost  in eConnect, could you please guide how to access that?

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    It should be in the GP company databases. You can verify with this script against those databases:

    select * from sysobjects where name = 'taPMTransactionINsertPost'

    If you don't have them, you can use the Database Maintenance Utility to re-create stored procedures, which will include eConnect procedures.

    Thanks

  • Custom Profile Picture
    20 on at

    Hi,

    Would it be possible if you could share your scripts please?

    I am creating PMManualCheckType, but I need to apply those payments against the invoice and eConnect doesn't have any method to call.

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    Most of the eConnect stored procedures are encrypted, so the only way to really get them re-created is via the Database Maintenance Utility I mentioned.

    If you just need the taPMTransactionInsertPost here:

    /*Begin_taPMTransactionInsertPost*/

    if exists (select * from dbo.sysobjects where id = Object_id('dbo.taPMTransactionInsertPost') and type = 'P')

    begin

    drop proc dbo.taPMTransactionInsertPost

    end

    go

    create procedure dbo.taPMTransactionInsertPost

    @I_vBACHNUMB char(15),        

    @I_vVCHNUMWK char(17),          

    @I_vVENDORID char(15),          

    @I_vDOCNUMBR char(20),          

    @I_vDOCTYPE  smallint,          

    @I_vDOCAMNT  numeric(19,5),    

    @I_vDOCDATE  datetime,  

    @I_vPSTGDATE datetime,        

    @I_vVADCDTRO char(15),  

    @I_vVADDCDPR char(15),        

    @I_vPYMTRMID char(20),    

    @I_vTAXSCHID char(15),        

    @I_vDUEDATE  datetime,        

    @I_vDSCDLRAM numeric(19,5),  

    @I_vDISCDATE datetime,        

    @I_vPRCHAMNT numeric(19,5),    

    @I_vCHRGAMNT numeric(19,5),    

    @I_vCASHAMNT numeric(19,5),    

    @I_vCAMCBKID char(15),        

    @I_vCDOCNMBR char(20),        

    @I_vCAMTDATE datetime,        

    @I_vCAMPMTNM char(20),        

    @I_vCHEKAMNT numeric(19,5),    

    @I_vCHAMCBID char(15),        

    @I_vCHEKDATE datetime,        

    @I_vCAMPYNBR char(20),        

    @I_vCRCRDAMT numeric(19,5),    

    @I_vCCAMPYNM char(20),        

    @I_vCHEKNMBR char(20),        

    @I_vCARDNAME char(15),        

    @I_vCCRCTNUM char(20),      

    @I_vCRCARDDT datetime,        

    @I_vCHEKBKID char(15),        

    @I_vTRXDSCRN char(30),        

    @I_vTRDISAMT numeric(19,5),    

    @I_vTAXAMNT numeric(19,5),    

    @I_vFRTAMNT numeric(19,5),    

    @I_vTEN99AMNT numeric(19,5),  

    @I_vMSCCHAMT numeric(19,5),    

    @I_vPORDNMBR char(20),        

    @I_vSHIPMTHD char(15),        

    @I_vDISAMTAV numeric(19,5),    

    @I_vDISTKNAM numeric(19,5),    

    @I_vAPDSTKAM numeric(19,5),    

    @I_vMDFUSRID char(15),        

    @I_vPOSTEDDT datetime,        

    @I_vPTDUSRID char(15),        

    @I_vPCHSCHID char(15),        

    @I_vFRTSCHID char(15),        

    @I_vMSCSCHID char(15),        

    @I_vPRCTDISC numeric(19,2),

    @I_vTax_Date datetime,    

    @I_vCURNCYID char(15),  

    @I_vXCHGRATE numeric(19,7),

    @I_vRATETPID char(15),  

    @I_vEXPNDATE datetime,  

    @I_vEXCHDATE datetime,  

    @I_vEXGTBDSC char(30),  

    @I_vEXTBLSRC char(50),  

    @I_vRATEEXPR smallint,  

    @I_vDYSTINCR smallint,  

    @I_vRATEVARC numeric(19,7),

    @I_vTRXDTDEF smallint,  

    @I_vRTCLCMTD smallint,  

    @I_vPRVDSLMT smallint,  

    @I_vDATELMTS smallint,  

    @I_vTIME1 datetime,  

    @I_vBatchCHEKBKID char(15),

    @I_vCREATEDIST smallint,

    @I_vRequesterTrx smallint,

    @I_vUSRDEFND1 char(50),  

    @I_vUSRDEFND2 char(50),  

    @I_vUSRDEFND3 char(50),  

    @I_vUSRDEFND4 varchar(8000),

    @I_vUSRDEFND5 varchar(8000),

    @O_iErrorState int output,

    @oErrString varchar(255) output

    as

    set nocount on

    select @O_iErrorState = 0

    return (@O_iErrorState)

    go

    grant execute on dbo.taPMTransactionInsertPost to DYNGRP

    go

    /*End_taPMTransactionInsertPost*/

  • Alaa Ramadan Profile Picture
    4,130 on at

    Adel,

    eConnect does not have a method to apply payable document. this will require extensive skills and work to do directly from SQL.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Dan Liebl Profile Picture

Dan Liebl 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans