SAPRFC 调用函数
SAPRFC callFunction
我是 SAP 新手 - PHP 编程,我使用 SAPRFC 调用我的 SAP FM。
我以前用过saprfc_import
- saprfc_table_init
- saprfc_table_read
函数,但是因为我的工作,我需要传递很多导入参数值,因为如果我使用这个,我需要打开 - 关闭 SAP 连接,我的网页变得很慢。
最近我读到有关 SAPRFC class 的文章,它有 callFunction
函数,它使用数组作为导入参数,我认为它可以帮助我,但是当我调试我的 SAPRFC class 时,我的导入参数总是空的,否则会出现这样的错误:
Import-Parameter : 'parameter-name' could not be set. (Does it exist?)
我用这种方式调用我的函数
$arrayParam = array_push(["param_name"=>"param_value"]);
$result = $sap->callFunction("FM_NAME",
array(
array("IMPORT","param_name",$arrayParam),
array("EXPORT","output_column",array())
)
);
我这样称呼对不对?
通过google搜索了一段时间后,
我找到了解决问题的方法 here
saprfc class 在 github 上比在 saprfc 官方上更完美,因为它已经修改了,现在我可以将二维数组作为 table 传递给我的参数
我是 SAP 新手 - PHP 编程,我使用 SAPRFC 调用我的 SAP FM。
我以前用过saprfc_import
- saprfc_table_init
- saprfc_table_read
函数,但是因为我的工作,我需要传递很多导入参数值,因为如果我使用这个,我需要打开 - 关闭 SAP 连接,我的网页变得很慢。
最近我读到有关 SAPRFC class 的文章,它有 callFunction
函数,它使用数组作为导入参数,我认为它可以帮助我,但是当我调试我的 SAPRFC class 时,我的导入参数总是空的,否则会出现这样的错误:
Import-Parameter : 'parameter-name' could not be set. (Does it exist?)
我用这种方式调用我的函数
$arrayParam = array_push(["param_name"=>"param_value"]);
$result = $sap->callFunction("FM_NAME",
array(
array("IMPORT","param_name",$arrayParam),
array("EXPORT","output_column",array())
)
);
我这样称呼对不对?
通过google搜索了一段时间后, 我找到了解决问题的方法 here saprfc class 在 github 上比在 saprfc 官方上更完美,因为它已经修改了,现在我可以将二维数组作为 table 传递给我的参数