这是我第一次使用PHP来调用SAP函数。遇到了这个问题,直到有经验的人帮助了我,我才明白。
<?php
// saprfc-class-library
require_once("saprfc.php");
// Create saprfc-instance
$sap = new saprfc(array(
"logindata"=>array(
"ASHOST"=>"" // application server
,"SYSNR"=>"" // system number
,"CLIENT"=>"" // client
,"USER"=>"" // user
,"PASSWD"=>"" // password
)
,"show_errors"=>false // let class printout errors
,"debug"=>true)) ; // detailed debugging information
// Call-Function
$result=$sap->callFunction("ZBAPI",
array( array("IMPORT","FROM_","100"),
array("EXPORT","RETURN",""),
array("TABLE","Namesdata",array())
));
if ($sap->getStatus() == SAPRFC_OK) {
// Yes, print out the Userlist
?><table>
<?php
//$sap->printStatus();
foreach ($result["Namesdata"] as $orders) {
echo "<tr><td>", $orders["name"],"</td><td>",$orders["form"],"</td> <td>",$orders["Names"],"</td></tr>";
}
?></table><?php
} else {
$sap->printStatus();
}
$sap->logoff();
?> 这个代码是这样的错误
::callFunction(‘ZBAPI’)
无法设置导入参数=FROM_。(它存在吗?)
但是我注释导入参数意味着它从皂甙中获取数据,这段代码有什么问题。
发布于 2015-08-21 06:04:09
导入这样的值--数组(“导入”、“名称”、“数组”(“字段名”=>“1000”))
https://stackoverflow.com/questions/31585060
复制相似问题