简体   繁体   English

无法通过Cloud SDK连接到S / 4 Hana

[英]Failure connecting to S/4 Hana via Cloud SDK

I'm following the OData tutorial at https://blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/comment-page-1/ and I'm getting an error when I try to retrieve business partners using DefaultBusinessPartnerService . 我正在通过以下网址访问OData教程: https: //blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/comment-page- 1 /并且当我尝试使用DefaultBusinessPartnerService检索业务伙伴时遇到错误。

The relevant piece of code is: 相关的代码段是:

        DefaultBusinessPartnerService businessPartnerService = new DefaultBusinessPartnerService();
        System.err.println("criated default business partner");

        List<BusinessPartner> partners = businessPartnerService
                .getAllBusinessPartner()
                .select(BusinessPartner.BUSINESS_PARTNER,
                        BusinessPartner.LAST_NAME,
                        BusinessPartner.FIRST_NAME)
                //.filter(BusinessPartner.BUSINESS_PARTNER_CATEGORY.eq(CATEGORY_VENDOR))
                .orderBy(BusinessPartner.LAST_NAME, Order.ASC)
                .execute(new ErpEndpoint(new ErpConfigContext()));

        response.setContentType("application/json");
        response.getWriter().write(new Gson().toJson(partners));

My ErpQueryEndpoint configuration is as follows: 我的ErpQueryEndpoint配置如下:

#Mon May 14 15:27:09 BRT 2018
URL=https\://host\:port
Name=ErpQueryEndpoint
TrustAll=TRUE
Type=HTTP
Password=Password
Authentication=BasicAuthentication
User=Username

Where host , port , Username and Password have been replaced by the correct values. 其中hostportUsernamePassword已替换为正确的值。

When I query http://localhost:8080/s4integration-application/businesspartners I get the following error: 当我查询http://localhost:8080/s4integration-application/businesspartners ,出现以下错误:

The endpoint responded with HTTP error code 403.
No service found for namespace , name API_BUSINESS_PARTNER, version 0001
Full error message: 
{
  "error": {
    "code": "/IWFND/MED/170",
    "message": {
      "lang": "en",
      "value": "No service found for namespace , name API_BUSINESS_PARTNER, version 0001"
    },
    "innererror": {
      "application": {
        "component_id": "",
        "service_namespace": "/SAP/",
        "service_id": "API_BUSINESS_PARTNER",
        "service_version": "0001"
      },
      "transactionid": "C83CB3D2A1420000E005AF97B0836AD5",
      "timestamp": "20180514182746.3576100",
      "Error_Resolution": {
        "SAP_Transaction": "Run transaction /IWFND/ERROR_LOG on SAP Gateway hub system (System Alias ) and search for entries with the timestamp above for more details",
        "SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
      },
      "errordetails": []
    }
  }
}

It seems that the endpoint is not configured on the SAP system (it's an S/4 Hana system). 似乎端点未在SAP系统上配置(这是S / 4 Hana系统)。 I'm not sure if I have to add something else to the URL besides the host and port or if there is some other configuration that has to be done on the SAP system. 我不确定是否必须在主机和端口之外向URL添加其他内容,或者是否必须在SAP系统上进行其他配置。

可以从以下位置找到从SAP S / 4HANA后端激活OData API的说明:help.sap.com/viewer/cdc25c83b63e482586b31b8acd49cf2f/1610%20003 / ...只需忽略Fiori应用程序的概念即可。

暂无
暂无

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

相关问题 Maven构建失败与com.sap.cloud.s4hana.plugins相关联:s4sdk-maven-plugin - Maven Build Failure releated to com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin 无法使用Cloud SDK在S / 4Hana上通过OData查询BAPI - Can't query BAPI via OData on S/4Hana using Cloud SDK SAP S / 4HANA Cloud SDK请求语言 - SAP S/4HANA Cloud SDK Request language 如何通过S / 4HANA SDK发送功能导入请求? - How to send Function Import request via S/4HANA SDK? 尝试使用S / 4HANA Cloud SDK从S / 4HANA Cloud创建包含数据源的自定义OData v2服务 - Trying to create custom OData v2 service with data source from S/4HANA Cloud using S/4HANA Cloud SDK 适用于Javascript和目标服务的S / 4HANA Cloud SDK - S/4HANA Cloud SDK for Javascript and destination service S / 4HANA Cloud SDK:com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces不存在 - S/4HANA Cloud SDK :com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces does not exist 使用S / 4HANA Cloud SDK管道时,如何跳过功能分支构建的生产部署阶段? - How to skip Production Deployment stage for feature branch build when using S/4HANA Cloud SDK Pipeline? 无法访问com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces中的私有类 - Unable to access private classes in com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces 无法在具有 oAuth2SAMLBearerAssertion 身份验证的云代工厂环境中使用 S4Hana SDK 执行 odata 调用 - Unable to execute odata calls using S4Hana SDK in cloud foundry environment with oAuth2SAMLBearerAssertion authentication
相关标签
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM