Informatics Forum

SAP – PHP Connection

Posted on: January 5, 2008

We know SAP, the great enterprise resource planning in the world. But very expensive budget to create and implement this software. But based on real case in some company, we have limitation in SAP, such as :

  1. SAP always charge based on user name license, whereas we know employee of company always grow and increase.
  2. If SAP implement in company that have some branches, it can be spent more budget. Because communication cost must be spent every month.
  3. Develop new business and new reports and others.

So we can analyst about cost :

  1. user license, we can reduce in this case, user license only for key processing but entry data or reporting we can user the simple application. Approximately we can reduce between 50 – 60%.
  2. Cost of communications data transfer, we must subscribe private connection (VSAT/Frame Relay/MPLS) and spent budget to create connection to communicate between head office and branch. We can user GRPS or internet monthly.
  3. Consultant service is very expensive to develop new business process/reporting, We must analyst about current and future business process, so we can plan how many spent time and cost to develop it, and if we need from outsourcing, we can analyst about our requirement.
  4. SAP complete package not always suitable with our requirement, We must understand about some feature and package, so we can choose the correct features.

Actually SAP have provided some component and library to create connection to other programming. Such as SAP dot NET (SAP NET Connector) , SAP and Java (SAP Java Connector).

But currently, Eduard Koucky created SAP Remote Function Call (SAPRFC) to call SAP function from PHP command.This library have been published in, you can develop SAP tools using PHP.

Installationon Windows :

– PHP running well on Apache or IIS.

– Install SAP GUI / SAP Client software (SAP GUI 6.20)
– Download API & class from . Extract with new directory saprfc, example : http://localhost/saprfc.

– Take file php_saprfc.dll as modul extension ( C:\\php\ext ) and add on php.ini (extension=php_saprfc.dll).

– Copy file librfc32.dll from CD installer SAP GUI to system C:\\Windows\system32.

– Restart Web Server and cek your phpinfo.

Installation on Linux

– Install Apache and PHP

– Install php_devel

– Install GNU Tools (autoconf, automake, flex, libtool, gcc, m4, make)

– Install compat-libgcc , compat-libstdc++……

– We need SAPSDK taken from CD SAP on directory Linux/Unix and found file RFC.SAR dan SAPCAR. SAPCAR is decompress file from RFC.SAR. To extract please type ./SAPCAR -xvf RFC.CAR.

– Take extract result to directory /usr/sap/rfcsdk or other alternatif on /usr/local/rfcsdk or /opt/rfcsdk based on your want to.

– Download saprfc-..tar.gz, and extract it

$ gunzip -c saprfc-$VERSION$.tar.gz | tax xf –
$ cd saprfc-$VERSION$
$ phpize
$ ./configure
$ make
$ make install

– Restart Apache and check phpinfo



1 Response to "SAP – PHP Connection"

wow, thanks anyway for the information. I really need to know it ‘how to connect SAP and PHP’.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 136,829 hits



visitor stats
January 2008
« Dec   Feb »
%d bloggers like this: