2

We're an SME with SAP implemented. We're trying to use the transactional data in SAP to build another system in PHP for our trucking division for graphical reports, etc. This is because we don't have in-house expertise ABAP development and any SAP modifications are expensive.

Presently, I've managed to achieve our objectives with read-only access to our Quality DB2 server and any writes go to another DB2 server. We've found the CPU usage on the SELECT statements to be acceptable and the user is granted access only to specific tables/views.

SAP's Quality DB2 -> PHP -> Different DB2 client

Would like your opinion on whether it is safe to read from production the same way? Implementing all of this again via the RFC connector seems very painful. Master-Slave config is an option for us but again will involve external consultancy.

EDIT

Forgot to mention that our SAP guys don't want to build even reports for another 6-months - they want to leave the system intact. Which is why we're building this in PHP on the top.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
kouton
  • 1,941
  • 2
  • 19
  • 34

1 Answers1

3

If you don't have ABAP expertise, get it - it's not that hard, and you'll get a lot of stuff "for granted" (as in "provided by the platform") that you'll have to implement manually otherwise - like user authentication and authority management and software logistics (moving stuff from the development to the production repository). See these articles for a short (although biased) introduction. If you still need an external PHP application, fine - but you really should give ABAP a try first. For web applications, you might want to look into Web Dynpro ABAP. Using the IGS built'in chart engine with the BusinessGraphics element, you'll get a ton of the most custom chart types for free. You can also integrate PDF forms created with Adobe Livecycle Designer.

Second, while "any SAP modifications are expensive" might be a good approach, what you're suggesting isn't a modification. That's add-on development, and it's neither expensive nor more complex than any other programming language and/or environment out there. If you can't or don't want to implement your own application entirely using the existing infrastructure, at least use a decent interface - web services, RFC, whatever. From an ABAP point of view, RFC is always the easiest option, but you can use SOAP or REST as well, although you'll have to implement the latter manually. It's not that hard either.

NEVER EVER access the SAP database directly. Just don't. You'll have to implement all the constraints like client dependency or checks for validity dates and cancellation flags for yourself - that's hardly less complex than writing a decent interface, and it's prone to break every time the structure is changed. And if at some point you need to read some of the more complex contents like long texts, you're screwed - period. Not to mention that most internal or external auditors (if that happens to be an issue with your company and/or legal requirements) don't like direct database access to a system as critical as this one, which again can cause lots of trouble from people you really don't want to mess with. It's just not worth it.

Community
  • 1
  • 1
vwegert
  • 18,371
  • 3
  • 37
  • 55
  • Thanks for that. Will see if we can get RFC. Given that we have GPS devices giving data into MySQL and Smartcards in our trucking division also throwing data into MySQL, we wanted an integrated Dashboard of sorts that pulled everything together and made sense of the data (email alerts, some logic, etc). For this, we got Read-only access user on "Views" not "Tables", and that to specific tables to the Quality database.. [Here](http://sapinsider.wispubs.com/Article/Accessing-SAP-Tables/3916) is where we decided to do a direct-Db acces, albeit with precautions. – kouton Jun 21 '12 at 07:34
  • For the sake of integration, how about a Master -> Slave replication/sync and we read only from Master? Assuming security's not an issue and we aren't ever going to deal with long texts? Forgot to mention that our SAP guys don't want to build even reports for another 6-months - they want to leave the system intact. Which is why we're building this in PHP on the top. – kouton Jun 21 '12 at 07:38
  • Gopi, this sounds like a rather critical application - you're sure you don't need a full-fledged application server with redundancy, failover support and whatnot for this? Sadly, I've seen "someones SAP guys" blocking integration attempts lots of times, so I understand the problem. What kind of data (which tables) do you need? – vwegert Jun 21 '12 at 07:54
  • vwegert, for the size of our trucking division (<30 emp), and given that this is on a integration-for-demo development, it isn't all that critical. We take data from VBKD, VBAP, COAS (view) and a couple of Z tables. Mostly about a list of trucks we own, the current order against them and whether they have been marked as complete or not. We use this as our base to co-relate the GPS and Smart-card data in PHP/MySQL. Given that the actual logic of the new app is outside SAP with the above from SAP, and that the db user is granted only read-access to them, would direct access still be unviable? – kouton Jun 21 '12 at 08:08
  • Ah, got an ABAP guy to work out periodic dumps of the tables to a local file. Didn't really need a live system for our app. So this works..Thanks! – kouton Jun 23 '12 at 11:14