SAPRFC – How to Connect to SAP via WebServer using SAPRFC – SAPxPHP

SAPRFC – How to Connect to SAP via WebServer using SAPRFC – SAPxPHP

I always had an interest in making a Web Server to communicate / connect with a SAP Server, seeking at least some practical reports that could be very helpful in a Web environment.

Well, after making several researches, I have found at least two basic forms, but well spread:

  • SAPConnector and
  • SAPRFC

The first one, I did not have a chance to test it yet, but the second one I could test it, and I must say I was very impressed with the result.

SAPRFC is an open source extension module for PHP5, which it is possible to call Function Modules in SAP through PHP language.

Imagine the possibilities, they are endless. Here are some examples:

  • Your customers and suppliers data are in SAP database. Via Web application it is possible to call an RFC to provide a report of Customers or Suppliers directly in your Web Browser.
  • Check materials stock levels also can be considered a very useful task.
  • Sales Orders or Purchase Orders reports are also very good examples.

That means, with this integration you can perform several tasks using SAP RFCs and Web Server. I would say that imagination is the only limiting factor.

Below is a sample Suppliers / Vendor report extracted from SAP via RFC and Webpage, directly on a mobile phone screen (in this case a SamSung Galaxy SIII):

 Screenshot_2013-08-17-15-05-56

The only question that I was not able to research deeply, is about the possibility of using a SAP communication user (non dialogue) to make the connection between Web server and the SAP server. For example: multiple users using their workstations can access SAP through a web page, which in turn has only one SAP user. In other words, I could not say for sure if multiple connections to SAP with a single user (even in case of SAP communication user) is allowed or not by SAP.

In any case, it remains as an interesting project, because this tool can well meet  the needs of those who can not (or will not) invest in a much more “heavy” and expensive (but more complete) technology as SAP Portal .

I am not saying that SAPRFC fully replaces SAP Portal (actually there is no comparison between these two), but it can be an extremely lightweight alternative , simple and almost zero cost, because it is open source solution, that can be used in applications where a small Web interface is needed.

Anyone who wants to know more about the project can visit the following page: http://saprfc.sourceforge.net/

There you can find all the documentation and even the files needed to configure your Web Server.

Below is a video where I show how to quickly set up a Web Server including this tool, with some connection to SAP tests and a report run.

Would like to try out ?

Simply download the PHP x SAP Pack here:

Well, that’s it!

See you next time and hope you enjoy!

%d blogueiros gostam disto: