cancel
Showing results for 
Search instead for 
Did you mean: 

saprfc_call_and_receive , Call error : status : EXCEPTION SYSTEM_FAILURE

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you Anton.

But indeed I'd prefer an answer that help me to call rfc, I have specifics constraints.

Anybody else ?

Former Member
0 Kudos

hello, good afternoon, I wanted to ask you if you manage to solve the problem, I have thesame problem and I have not found the solution, I see that this post is quite old, but Iwould like to know what you did to solve the problem, thanks

Former Member
0 Kudos

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