简体   繁体   English

使用sap_rfc在sap中搜索

[英]search in sap using sap_rfc

I am using http://saprfc.sourceforge.net/ to connect to SAP and get results. 我正在使用http://saprfc.sourceforge.net/连接到SAP并获取结果。

$fce = saprfc_function_discover($rfc,"ZBAPI_CUSTOMER");
$customerSAP="0000000000539";
$customerSAP=substr($customerSAP,-10);
$IMPORTT = array ("ZCUSTOMER" => $customerSAP );
saprfc_import ($fce,"CUSTOMERNO",$customerSAP);
saprfc_table_init ($fce,"ZBAPICUSTOMER");
saprfc_exception()
$rfc_rc = saprfc_call_and_receive ($fce);
saprfc_function_debug_info($fce);
saprfc_function_free($fce);
saprfc_close($rfc); 

This searches for only one customer. 这仅搜索一个客户。

Is there a way to make a search for a couple of customers using only http://saprfc.sourceforge.net/ and without creating a new connection? 有没有一种方法可以仅使用http://saprfc.sourceforge.net/来搜索几个客户,而无需创建新连接?

This is not a question of the library you use to make the call, but rather of the function module you call. 这不是您用来进行调用的库的问题,而是您调用的功能模块的问题。 From the name ZBAPI_CUSTOMER I can see that it's a custom module, and that is about it. 从名称ZBAPI_CUSTOMER我可以看到它是一个自定义模块,仅此而已。 What it can do - that is, whether it can retrieve multiple customers - cannot be deduced from this. 不能从中推断出它可以做什么,即它是否可以检索多个客户。 Contact your SAP department, they will most certainly be able to tell you more about this. 请与您的SAP部门联系,他们一定会告诉您更多有关此的信息。

The logic of the BAPI may not support providing more than one customer record as an input. BAPI的逻辑可能不支持提供多个客户记录作为输入。 It looks like this custom BAPI may require a structure of data for the read action. 似乎此自定义BAPI可能需要读取操作的数据结构。 If however the input type is a table then you could provide more than one record in the call. 但是,如果输入类型是表,则可以在调用中提供多个记录。 You would need to understand what the characterictics are of this custom BAPI the Z prefix indicates it is custom. 您需要了解Z前缀表明它是自定义的此自定义BAPI的特征。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM