cancel
Showing results for 
Search instead for 
Did you mean: 

Help for newbie

Former Member
0 Kudos

Hi, my company has been using both PHP and SAP for a few years. I have some PHP experience and experience with MM. I did do some basic ABAP... We are very interested in interfacing SAP and PHP. I am not very familiar with the RFC function in SAP. My question... how do I know if I already have the SAPRFC SDK 6.20 or.. if I don't where do I get it? I have been searching the SAP marketplace, but its information overload!!

Would appreciate any advice, thanks

Accepted Solutions (1)

Accepted Solutions (1)

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Natalie,

The following is the homepage of SAPRFC on sourceforge (http://saprfc.sourceforge.net/).

In the requirements section it points you in the direction of the part of service marketplace where you can find the SDK:

you can find it on http://service.sap.com/swdc under Patches for SAP WEB AS - SAP WEB AS 6.20 - SAP RFC SDK

Here are some more detailed directions:

From the link:

http://service.sap.com/swdc

In the tree on the left select the node

SAP Software Distribution Center->Download->Support Packages and Patches->Entry by application group

From the result list select Netweaver.

Now select SAP NetWeaver components ( < SAP NW 04 )

Now select SAP WEB AS

Now select SAP WEB AS 6.20

You will see the SAP RFC SDK in the result list.

Regards

John

Former Member
0 Kudos

whew....

I would never have found it!!

Thank you, will let you know if I can get it to work... still getting used to the whole BASIS thing...

Former Member
0 Kudos

Check out this thread as well for some great examples:

You can even set a watch on it and be informed of updates.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi John, can you tell us if during your test yesterday if there were contents as ours? ....

[root /root]# cd /usr/sap/rfcsdk/

[root rfcsdk]# ls -l

total 16

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 bin

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 include

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 lib

drwxr-xr-x 2 admin sysdev 4096 May 31 09:55 text

[root rfcsdk]# ls -l *

bin:

total 81804

-rwxr-xr-x 1 admin sysdev 8329193 Mar 18 23:33 genh

-rwxr-xr-x 1 admin sysdev 8337339 Mar 18 23:33 rfcexec

-rwxr-xr-x 1 admin sysdev 25 Mar 18 23:33 rfcexec.sec

-rwxr-xr-x 1 admin sysdev 8337893 Mar 18 23:33 rfcnpass

-rwxr-xr-x 1 admin sysdev 8336596 Mar 18 23:33 rfcping

-rwxr-xr-x 1 admin sysdev 73082 Mar 18 23:50 rfcthclium

-rwxr-xr-x 1 admin sysdev 40659 Mar 18 23:50 rfcthsrvum

-rwxr-xr-x 1 admin sysdev 8332511 Mar 18 23:33 sapinfo

-rwxr-xr-x 1 admin sysdev 27343 Mar 18 23:50 sapinfoum

-rwxr-xr-x 1 admin sysdev 8348791 Mar 18 23:33 srfcserv

-rwxr-xr-x 1 admin sysdev 8425207 Mar 18 23:33 srfctest

-rwxr-xr-x 1 admin sysdev 8335271 Mar 18 23:33 startrfc

-rwxr-xr-x 1 admin sysdev 8340907 Mar 18 23:33 trfcserv

-rwxr-xr-x 1 admin sysdev 8348193 Mar 18 23:33 trfctest

include:

total 552

-rwxr-xr-x 1 admin sysdev 9719 Mar 18 23:33 rfcsi.h

-rwxr-xr-x 1 admin sysdev 17564 Mar 18 23:33 sapitab.h

-rwxr-xr-x 1 admin sysdev 288937 Mar 18 23:33 saprfc.h

-rwxr-xr-x 1 admin sysdev 161130 Mar 18 23:33 sapuc.h

-rwxr-xr-x 1 admin sysdev 11698 Mar 18 23:33 sapucx.h

-rwxr-xr-x 1 admin sysdev 12743 Mar 18 23:33 srfcserv.h

-rwxr-xr-x 1 admin sysdev 18979 Mar 18 23:33 srfctest.h

-rwxr-xr-x 1 admin sysdev 8214 Mar 18 23:33 trfcserv.h

-rwxr-xr-x 1 admin sysdev 7963 Mar 18 23:33 trfctest.h

lib:

total 28160

-rwxr-xr-x 1 admin sysdev 8350208 Mar 22 16:05 libicudt20l.so

-rwxr-xr-x 1 admin sysdev 1098973 Mar 22 16:05 libicui18n.so.20

-rwxr-xr-x 1 admin sysdev 537344 Mar 22 16:05 libicuuc.so.20

-rwxr-xr-x 1 admin sysdev 9426832 Mar 22 15:54 librfcu.a

-rwxr-xr-x 1 admin sysdev 9013718 Mar 22 16:05 librfcum.so

-rwxr-xr-x 1 admin sysdev 90540 Mar 22 15:54 libsapu16.so

-rwxr-xr-x 1 admin sysdev 90640 Mar 22 16:05 libsapu16_mt.so

-rwxr-xr-x 1 admin sysdev 143016 Mar 22 16:05 libsapucum.so

text:

total 836

-rwxr-xr-x 1 admin sysdev 17465 Mar 18 23:33 readme.rfc

-rwxr-xr-x 1 admin sysdev 20169 Mar 18 23:33 rfcapi.txt

-rwxr-xr-x 1 admin sysdev 10446 Mar 18 23:50 rfcapiu.htm

-rwxr-xr-x 1 admin sysdev 48164 Mar 18 23:33 rfcexec.c

-rwxr-xr-x 1 admin sysdev 31873 Mar 18 23:33 rfcping.c

-rwxr-xr-x 1 admin sysdev 105673 Mar 18 23:50 rfcthcli.c

-rwxr-xr-x 1 admin sysdev 65475 Mar 18 23:50 rfcthsrv.c

-rwxr-xr-x 1 admin sysdev 19009 Mar 18 23:33 sapinfo.c

-rwxr-xr-x 1 admin sysdev 20469 Mar 18 23:33 saprfc.ini

-rwxr-xr-x 1 admin sysdev 29457 Mar 18 23:50 sapu16doc.htm

-rwxr-xr-x 1 admin sysdev 94524 Mar 18 23:50 sapucdoc.htm

-rwxr-xr-x 1 admin sysdev 55570 Mar 18 23:33 srfcserv.c

-rwxr-xr-x 1 admin sysdev 184095 Mar 18 23:33 srfctest.c

-rwxr-xr-x 1 admin sysdev 22007 Mar 18 23:33 startrfc.c

-rwxr-xr-x 1 admin sysdev 41891 Mar 18 23:33 trfcserv.c

-rwxr-xr-x 1 admin sysdev 43392 Mar 18 23:33 trfctest.c

The other suggestions haven't worked. If this was so easy for you, I must have some wrong files.

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

It looks like you have the unicode version of rfcsdk installed.

I would suggest that you get the non unicode version from service.sap.com and install that one.

In my /usr/sap/rfcsdk/lib directory I have librfc.a and librfccm.so. These are the two library files. When you get the error it is because the loader is looking for librfc.a. In your install you have librfcu.a which I assume is the unicode version.

When you download the rfcsdk you have the following 2 options for 6.20 WAS:

SAP RFC SDK 6.20

SAP RFC SDK 6.20 UNICODE

Make sure you get the first one.

Regards

John

Former Member
0 Kudos

Hello John,

I tried several ways of helping it to see the /usr/sap/rfcsdk files but the compile fails with the same error. Incidentaly, I didn't find -L as being an option for make.

Pity that this isn't working out for us. But let me know if you have any other detailed instructions.

thanks

RAJAB

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

A couple of things to check:

Make sure that the library exists and is readable by the user making the build under /usr/sap/rfcsdk/lib.

You can always try :

./configure --with-saprfc=/usr/sap/rfcsdk

Did you recreate the ./configure file with buildconf?

Former Member
0 Kudos

Hi John,

Roger on that.

I've tried the =/usr/sap/rfcsdk

And the buildconf reports no errors.

Maybe I have the wrong rfcsdk??

It looks like so:

[root /root]# cd /usr/sap/rfcsdk/

[root rfcsdk]# ls -l

total 16

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 bin

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 include

drwxr-xr-x 2 admin sysdev 4096 May 31 09:56 lib

drwxr-xr-x 2 admin sysdev 4096 May 31 09:55 text

[root rfcsdk]# ls -l *

bin:

total 81804

-rwxr-xr-x 1 admin sysdev 8329193 Mar 18 23:33 genh

-rwxr-xr-x 1 admin sysdev 8337339 Mar 18 23:33 rfcexec

-rwxr-xr-x 1 admin sysdev 25 Mar 18 23:33 rfcexec.sec

-rwxr-xr-x 1 admin sysdev 8337893 Mar 18 23:33 rfcnpass

-rwxr-xr-x 1 admin sysdev 8336596 Mar 18 23:33 rfcping

-rwxr-xr-x 1 admin sysdev 73082 Mar 18 23:50 rfcthclium

-rwxr-xr-x 1 admin sysdev 40659 Mar 18 23:50 rfcthsrvum

-rwxr-xr-x 1 admin sysdev 8332511 Mar 18 23:33 sapinfo

-rwxr-xr-x 1 admin sysdev 27343 Mar 18 23:50 sapinfoum

-rwxr-xr-x 1 admin sysdev 8348791 Mar 18 23:33 srfcserv

-rwxr-xr-x 1 admin sysdev 8425207 Mar 18 23:33 srfctest

-rwxr-xr-x 1 admin sysdev 8335271 Mar 18 23:33 startrfc

-rwxr-xr-x 1 admin sysdev 8340907 Mar 18 23:33 trfcserv

-rwxr-xr-x 1 admin sysdev 8348193 Mar 18 23:33 trfctest

include:

total 552

-rwxr-xr-x 1 admin sysdev 9719 Mar 18 23:33 rfcsi.h

-rwxr-xr-x 1 admin sysdev 17564 Mar 18 23:33 sapitab.h

-rwxr-xr-x 1 admin sysdev 288937 Mar 18 23:33 saprfc.h

-rwxr-xr-x 1 admin sysdev 161130 Mar 18 23:33 sapuc.h

-rwxr-xr-x 1 admin sysdev 11698 Mar 18 23:33 sapucx.h

-rwxr-xr-x 1 admin sysdev 12743 Mar 18 23:33 srfcserv.h

-rwxr-xr-x 1 admin sysdev 18979 Mar 18 23:33 srfctest.h

-rwxr-xr-x 1 admin sysdev 8214 Mar 18 23:33 trfcserv.h

-rwxr-xr-x 1 admin sysdev 7963 Mar 18 23:33 trfctest.h

lib:

total 28160

-rwxr-xr-x 1 admin sysdev 8350208 Mar 22 16:05 libicudt20l.so

-rwxr-xr-x 1 admin sysdev 1098973 Mar 22 16:05 libicui18n.so.20

-rwxr-xr-x 1 admin sysdev 537344 Mar 22 16:05 libicuuc.so.20

-rwxr-xr-x 1 admin sysdev 9426832 Mar 22 15:54 librfcu.a

-rwxr-xr-x 1 admin sysdev 9013718 Mar 22 16:05 librfcum.so

-rwxr-xr-x 1 admin sysdev 90540 Mar 22 15:54 libsapu16.so

-rwxr-xr-x 1 admin sysdev 90640 Mar 22 16:05 libsapu16_mt.so

-rwxr-xr-x 1 admin sysdev 143016 Mar 22 16:05 libsapucum.so

text:

total 836

-rwxr-xr-x 1 admin sysdev 17465 Mar 18 23:33 readme.rfc

-rwxr-xr-x 1 admin sysdev 20169 Mar 18 23:33 rfcapi.txt

-rwxr-xr-x 1 admin sysdev 10446 Mar 18 23:50 rfcapiu.htm

-rwxr-xr-x 1 admin sysdev 48164 Mar 18 23:33 rfcexec.c

-rwxr-xr-x 1 admin sysdev 31873 Mar 18 23:33 rfcping.c

-rwxr-xr-x 1 admin sysdev 105673 Mar 18 23:50 rfcthcli.c

-rwxr-xr-x 1 admin sysdev 65475 Mar 18 23:50 rfcthsrv.c

-rwxr-xr-x 1 admin sysdev 19009 Mar 18 23:33 sapinfo.c

-rwxr-xr-x 1 admin sysdev 20469 Mar 18 23:33 saprfc.ini

-rwxr-xr-x 1 admin sysdev 29457 Mar 18 23:50 sapu16doc.htm

-rwxr-xr-x 1 admin sysdev 94524 Mar 18 23:50 sapucdoc.htm

-rwxr-xr-x 1 admin sysdev 55570 Mar 18 23:33 srfcserv.c

-rwxr-xr-x 1 admin sysdev 184095 Mar 18 23:33 srfctest.c

-rwxr-xr-x 1 admin sysdev 22007 Mar 18 23:33 startrfc.c

-rwxr-xr-x 1 admin sysdev 41891 Mar 18 23:33 trfcserv.c

-rwxr-xr-x 1 admin sysdev 43392 Mar 18 23:33 trfctest.c

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

Did you install the unicode version? My library file is called librfc.a, yours appears to be librfcu.a .

Try the non unicode version of SAPRFC.

Former Member
0 Kudos

sorry John, just saw your reply. Thought my first message got lost. Thanks for your observation. WIll try that now!

Former Member
0 Kudos

Thanks John I'm going to give this a try shortly.

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

I just successfully ran the build using a similar setup to you. I have SUSE Linux 9.1. I installed php 4.3.10 in a user directory. I then installed saprfc 1.3.3 in the <phpsrc>/ext directory as saprfc.

I installed the SDK in /usr/sap/rfcsdk. This directory has the subdirectory lib containing the rfc library.

I then ran:

rm ./configure

./buildconf --force

./configure --with-saprfc

make

I did not have to do anything special to pick up the rfc library.

Regards

JohnA

Former Member
0 Kudos

We are now encountering some installation problems.

We are on a RedHat Linux platform with apache 2. The other ingredients are

- rfcsdk 620 non unicode extracted to /usr/sap/rfcsdk

- saprfc 4.3.3

- php 4.3.10 with saprfc in php_4.3.10/ext/saprfc

In trying method 1 (buildconf --force and ./configure, make, make install) it is failing with:

[root php-4.3.10]# rm ./configure

[root php-4.3.10]# ./buildconf --force

Forcing buildconf

using default Zend directory

rebuilding configure

rebuilding main/php_config.h.in

[root php-4.3.10]# ./configure --with-saprfc (for simplicity)

<deleted - no errors>

[root php-4.3.10]# make

<deleted - error....>

functions.lo -lrfc -lresolv -lm -ldl -lnsl -o sapi/cgi/php

/usr/bin/ld: cannot find -lrfc

collect2: ld returned 1 exit status

make: *** [sapi/cgi/php] Error 1

[root php-4.3.10]

Can anybody hint what I am doing wrong?

Is it correct that the 40 meg rfc file downloaded from sap should be just extracted to /usr/sap/rfcsdk?

I have also tried the ./configure/make/make install of saprfc and it fails with along the procedure with:

checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes

checking for BSD-compatible nm... (cached) /usr/bin/nm -B

checking whether ln -s works... (cached) yes

./ltconfig: ./ltconfig: No such file or directory

configure: error: libtool configure failed

Thanks for any input.

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

The error you are seeing:

/usr/bin/ld: cannot find -lrfc

collect2: ld returned 1 exit status

is indicative of the rfc library not being in the search path for the build script. It may well be that the library is in /usr/sap/rfcsdk.

I have not personally tried to run these build scripts, but it may be that you also need to pass an argument (possibly with -L) to augment the library search path. Alternatively it may be possible for you to add the path to the environment variable LD_LIBRARY_PATH.

I will try to get hold of the files and build it myself, that way I can provide a more detailed answer.

Regards

John