cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Configuration

Former Member
0 Kudos

Hello everybody,

I've installed on my PC the SAPRFC DLL, and it works fine. On the same PC I have the 7.2 SAP gui, and the link works.

Even if the configuration is ok, the PHP script gives me the error:

Sistema : Windows

PHP : 5.2.6

Errore:

Errors found during saprfc calls:

RFC Error Info :

Key     : RFC_IO5

Status  : RFC DRV=??? ???

Message :

>>> RfcOpenEx ...

Got following connect_param string:

   ASHOST=192.168.0.61 SYSNR=00 SYSID=ECD USER=develop PASSWD=******* CLIENT=210 LANG=IT POLL_SIZE=5 GWHOST=192.168.0.61 GWSERV=sapgw00

<<< RfcOpenEx failed

  Internal: IO HANDLE=6 DRV=??? LINE=1068 CODE=5


Thanks to all.


Bye.


Rita

Accepted Solutions (1)

Accepted Solutions (1)

Sriram2009
Active Contributor
0 Kudos

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi, I've configured the php script in this way:

<html>

<body>

<h1>SAPRFC-Class: Get List of Users in SAP-System</h1>

<?

    // Example for using the saprfc-class-library for accessing sap-functions via rfc

    // provided by lars laegner, btexx business technologies, august 2001

    //  !!!! PLEASE CHANGE THE LOGINDATA TO YOUR SAP-SYSTEM !!!!

    // $Id: example_userlist.php,v 1.2 2001/08/16 15:54:35 llaegner Exp $

    // saprfc-class-library

require_once("saprfc.php");

    // Create saprfc-instance

    $sap = new saprfc(array(

"logindata"=>array(

"ASHOST"=>"192.168.0.61" // application server

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

,"CLIENT"=>"210" // client

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

,"PASSWD"=>"(password)" // password

)

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

,"debug"=>true)) ; // detailed debugging information

    // Call-Function

$result=$sap->callFunction("SO_USER_LIST_READ",

array( array("IMPORT","USER_GENERIC_NAME","*"),

array("TABLE","USER_DISPLAY_TAB",array())

));

    // Call successfull?

    if ($sap->getStatus() == SAPRFC_OK) {

// Yes, print out the Userlist

?><table>

<tr><td>SAP-Name</td><td>User-Nummer</td></tr><?

        foreach ($result["USER_DISPLAY_TAB"] as $user) {

echo "<tr><td>", $user["SAPNAM"],"</td><td>",$user["USRNO"],"</td></tr>";

}

        ?></table><?

    } else {

// No, print long Version of last Error

$sap->printStatus();

// or print your own error-message with the strings received from

// $sap->getStatusText() or $sap->getStatusTextLong()

    }

    // Logoff/Close saprfc-connection LL/2001-08

    $sap->logoff();

?>

</body>

</html>

But I received the error:

Errors found during saprfc-Calls:


saprfc::login()

Open RFC connection with saprfc_open() failed with error:

RFC Error Info :

Key : RFC_IO5

Status : RFC DRV=??? ???

Message :

>>> RfcOpenEx ...

Got following connect_param string:

   ASHOST=192.168.0.61 SYSNR=00 CLIENT=210 USER=develop PASSWD=*******

<<< RfcOpenEx failed

Internal: IO HANDLE=2 DRV=??? LINE=1068 CODE=5

Where am I wrong?

Can you help me? I'm new in this scenario....