cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with PHPSOAP and SAPGUI 6.20

Former Member
0 Kudos

Hi all,

I have downloaded the latest saprfc version 1.4.5 and PHP version 5.0.5, I run it on my WinXP with IIS. First try the saprfc_test.php it was not show anything after I provide the necessary information. My SAPgui version 6.20, but when I downgraded my SAPgui to 46D, it's work. Is that mean saprfc works with SAPgui < 6.20?

I also have tried the sample code and got this error:

This is an example of getting the user list similar to the transaction SM04.

The example first get the data using SAPRFC and then using the PHP5 SOAP extension. RFC connection failed

Now use SOAP to make the call to the Web Service

Exception

SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'C:\Inetpub\wwwroot\saprfc\wsdl11.xml' in C:\Inetpub\wwwroot\saprfc\userlist.php:75 Stack trace: #0 C:\Inetpub\wwwroot\saprfc\userlist.php(75): SoapClient->__construct('wsdl11.xml', Array) #1

Request :

PHP Warning: RFC Error Info : Group : 101 Key : RFC_ERROR_PROGRAM Message : Open file 'C:\WINDOWS\sapmsg.ini' failed in C:\Inetpub\wwwroot\saprfc\userlist.php on line 23 PHP Warning: I/O warning : failed to load external entity "file:///C%3A/Inetpub/wwwroot/saprfc/wsdl11.xml" in C:\Inetpub\wwwroot\saprfc\userlist.php on line 75 PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'C:\Inetpub\wwwroot\saprfc\wsdl11.xml' in C:\Inetpub\wwwroot\saprfc\userlist.php on line 75 PHP Notice: Undefined variable: client in C:\Inetpub\wwwroot\saprfc\userlist.php on line 112 PHP Fatal error: Call to a member function __getLastRequest() on a non-object in C:\Inetpub\wwwroot\saprfc\userlist.php on line 112

Is it mean that SOAP only support for WAS, because my SAP is R/3 4.6C?

Thanks,

Yudhi

Message was edited by: Yudhi Chandra

Message was edited by: Yudhi Chandra

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Actually I think it's your PHP version I had similiar troubles with PHP 5.05 but using 4.40 seems to work OK with 6.20 and 6.40 GUI.

Former Member
0 Kudos

I have downloaded the PHP 4.4.0 and saprfc 1.4.4.4.0 also, and it still did not work.

Cheers,

Yudhi

Former Member
0 Kudos

So you have PHP 4.4.0, SAPRFC 1.4 and GUI 6.20

Your error messages states something about an error opening the sapmsg.ini file in your Windows directory is the file there?

Former Member
0 Kudos

Yes I have PHP 4.4.0, SAPRFC 1.4 and GUI 6.20.

No error messages, only a blank screen.

Cheers,

Yudhi

Former Member
0 Kudos

What is a blank screen?

Former Member
0 Kudos

Its mean I only got a screen contain "SAPRFC-Class: Get List of Users in SAP-System" and nothing else.

Cheers,

Yudhi

Former Member
0 Kudos

Have you doubled checked your connection settings? Have you run an RFC trace on your user (transaction st05)?

Former Member
0 Kudos

If I change my GUI to 46D, there is no problem.

Former Member
0 Kudos

Interesting. But at least it works! Don't forget to close this message and mark it solved.

Former Member
0 Kudos

But I want to use it with GUI 640

Former Member
0 Kudos

So when yuo install the 640 GUI and run the page again what happens?

Former Member
0 Kudos

Only a screen contains "SAPRFC-Class: Get List of Users in SAP-System"

Former Member
0 Kudos

What does "saprfc_test.php" do when you try it with the 640 GUI?

Former Member
0 Kudos

If I try "saprfc_test.php" I got a logon screen, and after I put the Application server, system number, Client, user id, password, and codepage, I got a white blank screen.

Cheers,

Yudhi

Former Member
0 Kudos

I've just tried it with 640 GUI and it worked OK, I have WinXP SP2, PHP 4.4.0 and SAPRFC 1.4

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

I just tried PHP 5.0.4 and associated SAPRFC. This is running on Apache 2.0.54.

This is working fine for me too. Have you tried any other SAPRFC implementations? You can pull some examples from the weblogs. Do you have error_reporting(E_ALL) set for PHP. If the error is PHP related this will ensure that something is displayed.

A blank screen is unhelpfull and I would expect to see at least an error message.

Cheers

JohnA

Former Member
0 Kudos

Yes My Php has set to E_ALL.

I have tried saprfc_test.php and example_userlist.php both can not work.

I just tried copy librfc32.dll from 46D and put on my c:\windows\system32, then its work, but I can not use the GUI, so I copied back my original librfc32.dll.

So whats wrong with my configuration?

Cheers,

Yudhi

Former Member
0 Kudos

Wht about the other examples in SAPRFC the simple connect examples and so forth? Do they give a blank screen as well?

Former Member
0 Kudos

I want to try the example_connect1.php, could you tell me which lines should I changed?

Cheers,

Yudhi

Former Member
0 Kudos

Just the lines regarding the login.

[code]

$sap->ConnectToApplicationServer ("garfield", "30");

// Params: client username password language

$sap->Open ("900", "rfctest","zkouska","EN");

[/code]

garfield is the the name of your system (hostname or IP address)

30 is your system number so for example with the MiniWAS 620 that would be 00

900 is then your client (e.g. MiniWAS 620 is 000)

rfctest is your user name

zkouska is your password

Former Member
0 Kudos

Ok, with the example_connect1.php I got this on my screen:

SAPConnection Class: Connection to Application Server

Notice: Use of undefined constant ASHOST - assumed 'ASHOST' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 167

Notice: Use of undefined constant SYSNR - assumed 'SYSNR' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 168

Notice: Use of undefined constant CLIENT - assumed 'CLIENT' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 185

Notice: Use of undefined constant USER - assumed 'USER' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 186

Notice: Use of undefined constant PASSWD - assumed 'PASSWD' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 187

Notice: Use of undefined constant LANG - assumed 'LANG' in c:\inetpub\wwwroot\saprfc\sapclasses\sap_connection.php on line 188

Cheers,

Yudhi

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

It looks like the error you are getting now is because you are using PHP5. An array index needs to eb "". The problem is in sap_connection.php.

You will need to go to each of the lines identified and surround the index with "".

Example:

case SAPRFC_CONN_APPSERVER :

$connect_data["ASHOST"] = $this->appServer;

$connect_data["SYSNR"] = $this->systemNumber;

break;

case SAPRFC_CONN_LOGONGROUP :

$connect_data["MSHOST"] = $this->messageServer;

$connect_data["R3NAME"] = $this->R3SystemName;

$connect_data["GROUP"] = $this->logonGroup

So with your system name and user data set correctly you should then get the connection status returned:

SAPConnection Class: Connection to Application Server

No errors detected.SAPConnection Object

(

[rfc] => Resource id #6

[connType] => 1

............

Former Member
0 Kudos

My PHP is 4.4.0, as you can see on my phpinfo here:

PHP Version 4.4.0

System Windows NT PT-8B5GEW7X1VWV 5.1 build 2600

Build Date Jul 11 2005 16:08:47

Server API CGI/FastCGI

Virtual Directory Support enabled

Configuration File (php.ini) Path C:\WINDOWS\php.ini

PHP API 20020918

PHP Extension 20020429

Zend Extension 20050606

Debug Build no

Zend Memory Manager enabled

Thread Safety enabled

Registered PHP Streams php, http, ftp, compress.zlib

This program makes use of the Zend Scripting Language Engine:

Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits

But I have followed your instruction and I only got this on my screen:

SAPConnection Class: Connection to Application Server

Cheers,

Yudhi

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

Can I just get some clarification on your system setup.

You want to use SAPGui 6.40.

Your R/3 System is 4.6D.

When you tried SOAP on the 4.6 system you had a problem with your wsdl11 file. Where/how did you get the wsdl file?

Former Member
0 Kudos

Hi,

I want to use SAPGUI 6.40, my system is 4.6D, my PHP is 4.4.0, my webserver is IIS 5.1, I have error when using the SAPRFC.

I don't thing I can try the SOAP.

Cheers,

Yudhi

Former Member
0 Kudos

Somebody help me please

gregorw
Active Contributor
0 Kudos

Hello Yudhi,

let's sort some things out:

1. For SAPRFC SAP GUI needs to be intalled because of the librfc32.dll which is used by SAPRFC to make the SAP Backend connection. As SAP told for Java Connector you should alway use the latest librfc32.dll.

2. Your SAP Backend seems to be a R/3 4.6C running on 4.6D Kernel.

3. If you want to use SOAP you had to use a intermediate Server which translates the SOAP Requests from SOAP to RFC. You can use also the WebAS ABAP Sneak Preview Version to test this. Then you have a WebAS 6.40 where you can build up your Web Services like Thomas Jung has described in: <a href="/people/thomas.jung3/blog/2005/01/05/develop-a-web-service-that-sends-an-email--in-abap">Develop a Web Service that sends an Email - in ABAP</a>. Unfortenately currently the Format of the Weblog is a little bit wierd because SDN is fixing security holes in the Weblog sytem.

Regards

Gregor

Former Member
0 Kudos

Hi Gregor,

I have installed SAPGUI 6.40 and my backend is 4.6C running on 4.6D kernel.

I just want to try the saprfc not SOAP, but I got error or nothing happens on my browser when I try open the example_userlist.php

Cheers,

Yudhi

gregorw
Active Contributor
0 Kudos

Hi Yudhi,

have you checked the logindata settings in example_userlist.php:

[code] $sap = new saprfc(array(

"logindata"=>array(

"ASHOST"=>"host.domain.net" // application server

,"SYSNR"=>"64" // system number

,"CLIENT"=>"002" // client

,"USER"=>"user" // user

,"PASSWD"=>"password" // password

)

,"show_errors"=>false // let class printout errors

,"debug"=>false)) ; // detailed debugging information[/code]

?

Regards

Gregor

Former Member
0 Kudos

Hi Gregor,

Yes the parameters are correct, because I have tried it with SAPGUI 4.6D and it was work.

Cheers,

Yudhi

Former Member
0 Kudos

Dear all,

Today I removed my IIS and installed the Apache, and the saprfc_test.php works fine and example_userlist.php also.

Thanks to all.

Cheers,

Yudhi

gregorw
Active Contributor
0 Kudos

Hi Yudhi,

"Open Source rules" :-). Now you can spread Points to everyone who answerd in this long Thread.

Regards

Gregor

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

I would be interested to find out why IIS caused the problem.

The interaction from SAPRFC is at the PHP level. This then feeds data back to IIS. Is it possible that there is an integration problem with IIS and PHP when SAPRFC is installed?

Just curious.

John

Former Member
0 Kudos

None that I have heard do you have the ability to test that setup John?

Former Member
0 Kudos

Dear all,

Maybe the problem is on my WinXP. I have tried to uninstall and reinstall the IIS, but still has that problem.

Cheers,

Yudhi