我正在尝试按照https://blogs.sap.com/2017/09/15/step-11-with-sap-s4hana-cloud-sdk-virtual-data-model-for-bapi/调用 BAPI通过本地 S/4 Hana 系统上的 OData。
我已经成功调用了通过/IWFND/MAINT_SERVICE
.
但是,当尝试执行示例调用时
final ErpConfigContext erpConfigContext = ...
return new DefaultFinancialTransactionService().getList().execute(erpConfigContext).getListOfSelectedTransactions();
我越来越:
17:34:20.998 [http-nio-8080-exec-4] ERROR
Query execution failed with status code 404. Response body: <html><head><meta http-equiv="content-type" content="text/html; charset=windows-1252"><title>Service cannot be reached</title>...
...
at com.sap.cloud.sdk.s4hana.connectivity.ErpEndpoint.handleHttpError(ErpEndpoint.java:600)
at com.sap.cloud.sdk.s4hana.connectivity.ErpEndpoint.handleHttpStatus(ErpEndpoint.java:560)
at com.sap.cloud.sdk.s4hana.connectivity.ErpEndpoint.sendPayload(ErpEndpoint.java:925)
at com.sap.cloud.sdk.s4hana.connectivity.ErpEndpoint.executeQuery(ErpEndpoint.java:372)
at com.sap.cloud.sdk.s4hana.connectivity.ErpEndpoint.executeQuery(ErpEndpoint.java:253)
at com.sap.cloud.sdk.s4hana.connectivity.rfc.SoapRemoteFunctionQueryExecutor.execute(SoapRemoteFunctionQueryExecutor.java:121)
at com.sap.cloud.sdk.s4hana.connectivity.rfc.SoapRemoteFunctionQueryExecutor.execute(SoapRemoteFunctionQueryExecutor.java:30)
at com.sap.cloud.sdk.s4hana.connectivity.rfc.BapiQuery.execute(BapiQuery.java:91)
at com.sap.cloud.sdk.s4hana.datamodel.bapi.functions.DefaultFinancialTransactionGetListFunction.execute(DefaultFinancialTransactionGetListFunction.java:469)
基本上是说找不到服务。我必须启用特定服务才能调用该服务吗?我实际上想使用其他 BAPI,所以理想情况下我想启用一个服务,让我可以访问多个 RFC。注意我没有使用云连接器。我正在尝试直接连接到 ERP 端点。