From an architecture point of view, one of the current best practice approaches for connecting an SAP to a non-SAP system is called a Services Oriented Architecture. Although SOA can be defined through a number of different technical implementations, at a high level SOA means exposing reusable services through a generic middleware layer. This middleware can be written in any language that is compatible with your application subsystems.
Of course, my background is Java integration for SAP so I would recommend looking at SAP's Java connector, JCo. JCo allows you to tap into any exposed RFC/BAPI interface available within SAP. The major caveat when exposing SAP tables this way is to do so through a published and supported SAP interface. If you attempt direct table updates against a standard SAP table you are almost guaranteed failure. JCo is available through SAP service marketplace as a free download, and sites like SearchSAP.com have a number of helpful articles to get you going.
Dig Deeper on SAP Java and J2EE
Related Q&A from Austin Sincock
How to provide an SAP R/3 4.5B application server with a Web service interface Continue Reading
A reader wants to know how to consume a Web service from an SAP 4.6c R/3 application server. Continue Reading
Are you a Java/J2EE developer interested in SAP? This expert tip lists the most relevant SAP modules and technologies for you. Continue Reading