on 03-27-2008 8:23 AM
Hello,
I have an error with saprfc and php.
Here is my code :
// Create parameter
$fe = array('PLVAR'=> "01", 'OTYPE' => "O", 'OBJID' => "50008155");
// Create saprfc-instance
$sap = new saprfc(array(
"logindata"=>array(
"ASHOST"=>"blablabla" // application server
,"SYSNR"=>"00" // system number
,"CLIENT"=>"200" // client
,"USER"=>"blabla" // user
,"PASSWD"=>"XXXX" // password
)
,"show_errors"=>false // let class printout errors
,"debug"=>false)) ; // detailed debugging information
// Call-Function
$result=$sap->callFunction("SOME_FUNCTION",
array( array("IMPORT","FORCE_ELEMENT",$fe), array("EXPORT","FORCE_ELEMENT_DETAILS"))
);
And I receive this error:
Errors found during saprfc-Calls:
saprfc::callFunction('SOME_FUNCTION')
saprfc_call_and_receive(): Call error: RFC Error Info :
Key :
Status : EXCEPTION SYSTEM_FAILURE RAISED
Message :
Internal:
If I debug the Abap function module, I can see that all is working well : the function receives a valid parameter and returns a response.
I used a sniffer to intercept tcp packet received from the server : the export parameter (response) is indeed inside !
Moreover, I've got a strange return from the function saprfc_call_and_receive(). Indeed, the return has a value of 19! Usually I guess we should expect 0 (SAPRFC_OK) or 2 (SAPRFC_EXCEPTION).
Could anyone could help me on that?
Thanks,
Mathieu
PS: It is to be noted that when I try my php code with other BAPIs such as SO_USER_LIST_READ, everything works fine.
Thank you Anton.
But indeed I'd prefer an answer that help me to call rfc, I have specifics constraints.
Anybody else ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mathieu,
this might not be what you want to hear at the moment, but my recommendation is to wrap the function modules into webservices or use the default webservice functionality of RFC enabled function modules and use the PHP webservice API. this is much more transparent and - important! - under constant maintenance. all, as long as you're on a suitable basis.
my 2 cents,
anton
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.