Simon
4Penny.net
Points: 7583

4/20/2018 1:20:15 PM

taRMApply Wrapper

* This article, and all our great eConnect documentation, Is available on the eConnect menu

It seems that every day I get a call to do something new. 

Today's newness is this: The client is in the habit of writing returns that have the same document number as the corresponding invoice. In practice, most invoices have a small return. 

These are all sitting in the RM Open table, unapplied. Lots of them. 

Task: Create a stored procedure that will search the RM20101 (RM Open) table and return all matching unapplied credits and invoices, and then automatically apply them. 

Care to comment on my approach? Can you improve the code?

The working stored procedure is below, fully commented. 

4Penny.net
Version: Unknown or N/A
Section: SQL Scripts
Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3