EDI: Electronic Document Interchange for Microsoft Great Plains ? Overview for Software Developer/Pr

Microsoft Great Plains - Microsoft Business Solutions accounting and ERP system, originally targeted to mid-size - now, with advancements and increasing reliability of its database - Microsoft SQL Server, Great Plains is attractive solution for large corporation. Big companies usually have purchasing and order processing automation via so-called Electronic Document Interchange or EDI. EDI was introduced long time ago for UNIX systems and in most of the cases appears in the form of Header, Lines and Trailer of predefined fixed position fields.

We would like to give you - programmer, software developer, database administrator the primary clues on producing EDI formatted text from Microsoft Great Plains database. Please, note however that Great Plains here is taken as the example, similar approach will work for other SQL based systems: Navision (SQL Database or C/SIDE database), Microsoft RMS, Solomon as well as Oracle and other non-Microsoft products. In the case of non-SQL system, such as old Great Plains Dynamics, ACCPAC on Pervasive SQL - IDE interface will involve ADO/ODBC or Microsoft Access programming.

1. Sample Query ? The query below uses CAST construction to make the result fixed length and meet the positioning. Plus the unionizing allows to produce Header and Detail in one select statement. Here we are dealing with work Sales Documents

select

case

when b.LNITMSEQ=c.LNITMSEQ+1 and b.CMPNTSEQ=c.CMPNTSEQ+1 then CAST('Header' as char(10))

else CAST('Detail' as char(10))

end

as FIELD0,

case

when b.LNITMSEQ=c.LNITMSEQ+1 and b.CMPNTSEQ=c.CMPNTSEQ+1 then cast(a.CUSTNAME as char(65))

else cast(cast(b.QTYDMGED as decimal(19,5)) as char(65))

end

as FIELD01,

case

when b.LNITMSEQ=c.LNITMSEQ+1 and b.CMPNTSEQ=c.CMPNTSEQ+1 then CONVERT(char(51), a.DOCDATE, 101)

else cast(b.ITEMDESC as char(51))

end

as FIELD03

--Additional fields go here

from SOP10100 a join SOP10200 b on a.SOPTYPE=b.SOPTYPE and a.SOPNUMBE=b.SOPNUMBE join

RM00101 d on a.CUSTNMBR=d.CUSTNMBR

join

(select SOPTYPE as SOPTYPE, SOPNUMBE as SOPNUMBE,

LNITMSEQ

as LNITMSEQ,

CMPNTSEQ

as CMPNTSEQ from SOP10200

union

select SOPTYPE as SOPTYPE, SOPNUMBE as SOPNUMBE, MIN(LNITMSEQ)-1 as LNITMSEQ, MIN(CMPNTSEQ)-1 as CMPNTSEQ from SOP10200

group by SOPTYPE, SOPNUMBE

) c on a.SOPTYPE=c.SOPTYPE and a.SOPNUMBE=c.SOPNUMBE

and ((b.LNITMSEQ=c.LNITMSEQ and b.CMPNTSEQ=c.CMPNTSEQ) or (b.LNITMSEQ=c.LNITMSEQ+1 and b.CMPNTSEQ=c.CMPNTSEQ+1))

left join SOP10106 udf on a.SOPTYPE=udf.SOPTYPE and a.SOPNUMBE=udf.SOPNUMBE

where a.ADDRESS3'Exported' and

a.SOPTYPE=3 and upper(d.USERDEF2)='YES'

order by a.SOPTYPE, a.SOPNUMBE, b.LNITMSEQ asc

2. Mark processed documents - for this reason we use SOP10100.ADDRESS3 field - which was not used in Great Plains Dynamics/eEnterprise version 6.0:

update SOP10100 set ADDRESS3='Exported' where SOPTYPE=3

3. Communication with UNIX EDI Client or Server ? each case requires individual approach. You may have to assign the file directory, exposed to the UNIX system or use old DOS command to move the file, or you can have automatic email. Good idea is to write communication application in your favorite programming language

4. Scheduled DTS Package - you should probably create DTS package to do all the steps: call SQL Query and save it as a file, then call DOS command or simple EXE application - which does communicate with UNIX

Happy programming! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies ? USA nationwide Great Plains, Microsoft CRM customization company, based in Chicago, California, Colorado, Arizona, New York, Texas, Florida, Georgia and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, Transact SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer; akarasev@albaspectrum.com

In The News:

An artificial intelligence-powered home security system can fire paintballs and tear gas at trespassers. The camera identifies human faces and animals.
Technology expert Kim Komando gives her tips and tricks on enhancing your user experience a smartphone and other devices you use everyday.
A new camera called NUCA uses artificial intelligence to create deepfake photos of subjects by stripping away clothing in close to real time.
The Kimberley Kube trail-ready camper has a compact but spacious design and combines luxury, functionality and ruggedness for a weekend getaway.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Emails instructing you to reset your password for an account may be legitimate, or they may be scams. Kurt "CyberGuy" Knutsson explains.
Northrop Grumman's Manta Ray uncrewed underwater vehicle aims to revolutionize undersea missions — it glides through the ocean without human assistance.
Learn how to work Google's calendar application to streamline and organize your daily tasks from technology expert Kim Komando.
If you do not want Facebook to have automatic access to your private photos, follow our tips to protect yourself. Kurt “CyberGuy" Knutsson shows you how.
Kurt “CyberGuy" Knutsson goes into detail about Apple’s recent iOS update that allows iPhone users to instantly translate spoken language simply by using the Action Button.
Safeguarding your digital life with a reliable physical backup isn't just a precaution, it's a necessity. Kurt “CyberGuy" Knutsson provides the essential backup checklist.
Kurt “CyberGuy" Knutsson reveals how a Redditor exposed false recycling claims at their apartment, highlighting a report that only 21% of U.S. recyclables are processed.
Kurt "CyberGuy" Knutsson offers a travel toolkit featuring five technology tools to help you with booking flights and hotels for your summer vacation.
The bubble behind the clock on your iPhone can appear in different colors. Kurt "CyberGuy" Knutsson explains what each of those colors mean.
Scammers are using the power of artificial intelligence to mimic voices of people and are using the fake voices to commit crimes, like kidnappings.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Tech guru Kurt "CyberGuy" Knutsson explains the science behind the Invisibility Shield, a 6-foot shield that makes people become invisible.
The International Olympic Committee on Friday announced plans to use AI in various Olympic aspects, including athlete identification, training and judging.
Tech guru Kurt "CyberGuy" Knutsson explains an easy trick to avoid squinting while working or surfing the web by zooming in on your personal computer.
Streaming giant Roku has recently been targeted by a pair of cyberattacks, and the company confirmed over a half million Roku accounts were compromised.
The Land Aircraft Carrier combines an all-terrain, six-wheeled vehicle with a two-seat aircraft, which features electric vertical takeoff and landing.
The European Union has sent TikTok a "request for information" on the video sharing platform's newest app, TikTok Lite, under the Digital Services Act, with the aim to clean up social media.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
The FBI is warning the public about a recent phishing scam via text that claims its targets owe money in Pennsylvania for unpaid road toll charges.
Your Apple Music settings may be revealing to your contacts what you're listening to. Kurt "CyberGuy" Knutsson explains the process to change those settings.

Microsoft CRM for Corporate Business ? Working Offline

If your company has regional and worldwide operations, you might... Read More

Keeping Track

One of the things we can be as certain of... Read More

Computer Based Language Development and Spell-checking

Language development computer: Computer-based method for aiding language development seems... Read More

Microsoft CRM Customization Secrets ? Second Edition

This article is for advanced Microsoft CRM SDK C# developers.... Read More

Microsoft Great Plains: Manufacturing or Bill of Materials - Overview for IT Specialist

Microsoft Great Plains is main Microsoft Business Solutions product, targeted... Read More

Demand More From Your Lead Tracking Software

An integral part of any quality CRM system is lead... Read More

OS 101: Suggestions for Choosing an Operating System

An operating system (abbreviated OS) is essentially the path through... Read More

Best Practices In Choosing Network Monitoring Software

Blue Cross and Blue Shield of Hawaii (HMSA) found itself... Read More

Can Group Collaboration Software Meet Business Needs?

According to a survey conducted by InfoTrends/CAP Ventures entitled "Content-Centric... Read More

Groupware: What Works the Way Businesses Do?

GroupwareThe internet is full of 1.5 million to 7 million... Read More

Five Tips For A Great Software Demo

Whether you need to close a sale, gather end-user feedback,... Read More

Microsoft Great Plains in Construction & Building ? Implementation & Customization Highlights

Microsoft Great Plains could be tuned and setup to fit... Read More

Unofficial Windows 98 SE Service Pack 2.0 RC2

Microsoft has never released a service pack for Windows98 SE,... Read More

MySQL for Beginners ? How to Create a MySQL Database

Whether you are an experienced web programmer or a complete... Read More

Microsoft Business Solutions VAR/Partner Selection ? Overview for IT Director/Manager/Controller

Microsoft Great Plains and Microsoft CRM become more and more... Read More

Defining OLAP Solutions and Data Warehouse design

This tutorial covers OLAP solutions used by Data warehouses and... Read More

Microsoft CRM ? Typical Customizations

Microsoft CRM was designed to be easily customizable. Microsoft CRM... Read More

Groupware: Avoid the Ad Hoc Shuffle

GroupwareEfforts are continually made to manage the unavoidable ad hoc... Read More

The XP Firewall Isnt Enough

You might think you don't need a firewall... Read More

Device Driver Basics

Most people understand that the "hardware" part of their computer... Read More

Microsoft Great Plains Customization Tools ? Overview

Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More

Microsoft CRM Conversation Gateway: VoIP - Implementation & Customization

Microsoft CRM is winning market share step-by-step from such the... Read More

When is a Software Engineer Not a Software Engineer?

The title of "software engineer" has got to be among... Read More

Fleet Maintenance Software Reviews

Innovative Maintenance Systems (IMS) is one company that offers solutions... Read More

Microsoft RMS Customization ? PO Items Receiving in Great Plains

Microsoft Retail Management (RMS) and Microsoft Great Plains are retail... Read More