-
Notifications
You must be signed in to change notification settings - Fork 9
/
INSTALL
195 lines (139 loc) · 6.59 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
Installation Instructions for SAPRFC
------------------------------------
SAPRFC is an extension module for PHP. With SAPRFC is possible
call an SAP R/3 function modules from PHP scripts. On other side
you can also call a PHP functions from ABAP.
More information, API documetation, examples and newest versions
you can find on http://saprfc.sourceforge.net.
This document doesn't describe how to install PHP, please see
to the PHP documentation for it (http://www.php.net).
Please, see to PLATFORM file for supported platform, PHP, RFCSDK library
and SAP version.
Quick info:
-----------
SAPRFC is distributed under PHP license with source codes in
tarball saprfc-$VERSION$.tar.gz.
Under Linux (UNIX) platform two methods for instalation exist:
a) Rebuild PHP with saprfc extension included
b) Build saprfc extension as dynamic module without rebuilding PHP
Steps for a)
Extract source tarball to PHP source tree (under ext/ directory)
and rebuild PHP with commands
rm ./configure
./buildconf --force
./configure --with-saprfc (+ your configuration directives)
make
Note: Because librfc.a for SAP RFC SDK 6.20 is not compatible with
glibc 2.3 you must use method b) for installation saprfc
extension on glibc 2.3 based Linux distribution (RH AS 3.0, FC3...).
Steps for b)
Extract source tarball to some directory and build dynamic module
with commands
cd <saprfc dir>
phpize
./configure
make
make install
Enable saprfc extension editing your php.ini - add line:
extension=saprfc.so
For Windows platform (NT/2000/XP/2003) you can download binary package
saprfc-$VERSION$-$PHP_VERSION$.zip. In this package you find the
file php_saprfc.dll. Copy this file to your extension directory
(extension_dir = ) and enable/load saprfc extension in php.ini file
(extension=php_saprfc.dll).
Requirements:
-------------
Under UNIX:
* PHP sources (http://www.php.net/downloads.php)
* php-devel package for installation saprfc as dynamic module
* GNU tools (autoconf, automake, flex, libtool, gcc, m4, make)
* Non-Unicode SAP RFCSDK 6.20 for your platform (if you are SAP customer
you can download it from http://service.sap.com/swdc under
<Support Packages and Patches - My Company's Application Components
SAP WEB AS - SAP WEB AS 6.20 - SAP RFC SDK>)
Under Win32:
For compilation:
* PHP sources (http://www.php.net/downloads.php)
* PHP win support files (http://www.php.net/extra/win32build.zip)
* Microsoft Visual C 6.0
* Non-Unicode SAP RFCSDK 6.20 for your platform (if you are SAP customer
you can download it from http://service.sap.com/swdc under
<Support Packages and Patches - My Company's Application Components
SAP WEB AS - SAP WEB AS 6.20 - SAP RFC SDK>)
For installation (from binary package):
* PHP binaries (http://www.php.net/downloads.php)
* librfc32.dll in Windows System directory (or SAPGUI installed)
Installation steps under UNIX (with rebuilding PHP):
---------------------------------------------------
Preparation:
Install SAP RFCSDK to a /usr/sap/rfcsdk directory (or /usr/local/rfcsdk,
/opt/rfcsdk). If you use other directory, you must configure php with option
--with-saprfc=DIR instead of --with-saprfc.
Extract saprfc and php sources, for example, to your home
directory:
$ cd
$ gunzip -c php-x.y.z.tar.gz | tar xf -
$ gunzip -c saprfc-$VERSION$.tar.gz | tax xf -
Install GNU tools, if you haven't installed them.
Compilation:
$ mkdir ~/php-x.y.z/ext/saprfc
$ cp ~/saprfc-$VERSION$/* ~/php-x.y.z/ext/saprfc
$ cd ~/php-x.y.z
$ rm ./configure
$ ./buildconf
--force
$ ./configure --your_options, (see PHP install documentation, how to build PHP)
--with-saprfc
$ make
$ make install
Installation steps under UNIX (dynamic module):
-----------------------------------------------
Preparation:
Extract SAP RFCSDK to the /usr/sap/rfcsdk directory. Check if you have
php-devel package installed on your system.
Extract saprfc sources, for example, to your home
directory:
$ cd
$ gunzip -c saprfc-$VERSION$.tar.gz | tax xf -
Install GNU tools, if you haven't installed them.
Compilation:
$ cd saprfc-$VERSION$
$ phpize
$ ./configure
$ make
$ make install
Installation steps under Win32:
------------------------------
Installation:
1) Extract zip file saprfc-$VERSION$-$PHP_VERSION$.zip
2) Copy php-saprfc.dll to your extensions directory (e.g. C:\PHP\extensions)
3) Edit php.ini file (in windows system dircetory, e.g. C:\WINNT, C:\WINDOWS)
and add line: 'extension=php_saprfc.dll'
4) Copy librfc32.dll (from SAPGUI install CD) to the windows system
directory or simple install SAPGUI on your machine.
Compilation:
1) Extract php sources to C:\PHP-x.y.z
2) Extract php win support files to C:\PHP-x.y.z\win32
3) Install RFCSDK to C:\PHP-x.y.z\rfcsdk
4) Copy SAPRFC sources to C:\PHP-x.y.z\ext\saprfc
5) Copy php4ts.lib or php5ts.lib (from PHP binaries) to C:\PHP-x.y.z\win32
6) For PHP5 copy saprfc.dsp5 to saprfc.dsp
6) Open project C:\PHP-x.y.z\ext\saprfc\saprfc.dsp in Microsoft Visual C++ 6.0
7) Under Tools|Option|Directory set path for Include files and for Library files
(C:\PHP-x.y.z\win32\include; C:\PHP-x.y.z\rfcsdk\include;
C:\PHP-x.y.z\win32\lib; C:\PHP-x.y.z\rfcsdk\lib)
8) Set active configuration to "saprfc - Windows_TS" (under Build menu)
9) Build php_saprfc.dll.
10) Compiled DLL you find in C:\PHP-x.y.z\Release_TS directory
After installation:
-------------------
You can use saprfc_test.php script to test if saprfc extension is activate
and functional. Copy this script to your www directory. If you will see
login page to SAP R/3, you have extension successfully installed.
If you want to reduce a little bit the complexity of the rfc-library for
programming, you can use the saprfc class (in saprfc.php), which provides an easy to use
programming interface to most of the functionality of the saprfc-extension.
Calling functions in sap with the saprfc class is straightforward and easy,
see example in file "example_userlist.php" to retrieve the user-list of an
sap-system. If you want to easily execute programs or want to use the rfc-server
capabilities, you will have to wait for a new saprfc class version.