I want to do a connection with SAP-RFC using PHP. I have installed 'Wamp' server with PHP 5.2.8, Apache 2.0.54 and SAP-RFC 1.4.1. I am using old version of PHP because I could not find much of help for PHP version 7.2.
I have done the following steps:
1. Changed in parameters like Host/server IP, System number, R3 name, client, username and password.
2. Put DLL files in the extension folder and mentioned it in the PHP.ini file.
3. Added librfc32.dll file in the system32 directory.
$LOGIN = array ( // Set login data to R/3"ASHOST"=>"xx.xxx.x.xxx", // application server host name
"SYSNR"=>"00", // system number
"CLIENT"=>"130", // client"USER"=>"xxxx", // user
"PASSWD"=>"xxxx", // pasword
"CODEPAGE"=>"1404"); // codepage
$rfc = saprfc_open ($LOGIN);
if (! $rfc )
{
echo "RFC connection failed with error:".saprfc_error();
exit;
}
--------------------------------------------------------------------------------------------
include_once ("../sap.php");
$sap = new SAPConnection();
// Params: hostname sysnr $sap->ConnectToApplicationServer ("xx.xxx.x.xxx ", "00");
// Params: client username password language $sap->Open ("130", "xxxx","xxxxx","EN");
// Login credentials have been added in the code.
$sap->PrintStatus();
$sap->GetSystemInfo();
echo "<BR><PRE>"; print_r ($sap); echo ("</PRE>");
$sap->Close();
------------------------------------------------------------------------------------------------------
Output - "SAP RFC extension is not installed. Exiting...."
Your help would be highly appreciated.
Request clarification before answering.
Hi Sandeep,
I am not aware of any SAP official material. Looking in the internet I found this extension for PHP and this question. I didn't test, but it seems that it is what you are looking for.
Regards,
Cris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.