【发布时间】:2017-03-02 14:55:53
【问题描述】:
以下是我的代码: 我能够连接到 SAP 系统,当我尝试从表中读取数据时,我遇到了异常。请任何人都可以帮助我解决这个问题。 错误消息:{success:false, msg: 'Exception raise: TABLE_NOT_AVAILABLE'}
$fce = saprfc_function_discover($rfc, "SAPMOdule");
if (! $fce ){
echo "{success: false, msg: 'Discovering interface of function module failed'}";
exit;
}
saprfc_table_init ($fce,"TableName");
saprfc_import ($fce,"Column1",'0602');
saprfc_import ($fce,"Column2",'ZA00');
set_time_limit ( 0 );
$rfc_rc = saprfc_call_and_receive ($fce);
if ($rfc_rc != SAPRFC_OK){
if ($rfc_rc == SAPRFC_EXCEPTION ){
ExitRFC($rfc, $fce, "false", "Exception raised: " . saprfc_exception($fce));
}else{
ExitRFC($rfc, $fce, "false", "Call error: " . saprfc_error($fce));
}
exit;
}
【问题讨论】: