on 09-07-2005 5:53 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
............
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
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
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
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.