1

VDM を使用して、S/4HANA クラウド (パブリック クラウド) からビジネス パートナー データを取得しようとしています。

        final List<BusinessPartner> businessPartners =
                new DefaultBusinessPartnerService()
                        .getAllBusinessPartner()
                        .select(BusinessPartner.BUSINESS_PARTNER,
                                BusinessPartner.BUSINESS_PARTNER_NAME)
                        .filter(BusinessPartner.BUSINESS_PARTNER_CATEGORY.eq("2"))
                        .orderBy(BusinessPartner.BUSINESS_PARTNER, Order.ASC)
                        .execute();

英語の取引先名が正しく表示されます。しかし、日本の取引先名は?????と表示されます。

{"BusinessPartner":"80000001","BusinessPartnerName":"Domestic US Customer 1"},
{"BusinessPartner":"80000002","BusinessPartnerName":"?????????????"},
{"BusinessPartner":"90000001","BusinessPartnerName":"Domestic US Supplier 1"},
{"BusinessPartner":"90000002","BusinessPartnerName":"????????"}

ローカライズされたフィールドのテキストを取得する方法を教えてください。

ありがとう。

(その他の注意事項)

Postman で OData を手動で実行しました。この場合、ローカライズされたフィールドは日本語で表示されました。

https://myXXXXXX.s4hana.ondemand.com/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner?$select=BusinessPartner,BusinessPartnerName&$orderby=BusinessPartner&$filter=BusinessPartnerCategory%20eq%20'2'&$format=json&saml2=disabled

出力

{
    "d": {
        "results": [
            {
                "__metadata": {
                    "id": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('80000001')",
                    "uri": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('80000001')",
                    "type": "API_BUSINESS_PARTNER.A_BusinessPartnerType"
                },
                "BusinessPartner": "80000001",
                "BusinessPartnerName": "Domestic US Customer 1"
            },
            {
                "__metadata": {
                    "id": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('80000002')",
                    "uri": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('80000002')",
                    "type": "API_BUSINESS_PARTNER.A_BusinessPartnerType"
                },
                "BusinessPartner": "80000002",
                "BusinessPartnerName": "東京得意先株式会社"
            },
            {
                "__metadata": {
                    "id": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('90000001')",
                    "uri": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('90000001')",
                    "type": "API_BUSINESS_PARTNER.A_BusinessPartnerType"
                },
                "BusinessPartner": "90000001",
                "BusinessPartnerName": "Domestic US Supplier 1"
            },
            {
                "__metadata": {
                    "id": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('90000002')",
                    "uri": "https://myXXXXXX.s4hana.ondemand.com:443/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner('90000002')",
                    "type": "API_BUSINESS_PARTNER.A_BusinessPartnerType"
                },
                "BusinessPartner": "90000002",
                "BusinessPartnerName": "東京仕入先株式会社"
            }
        ]
    }
}
4

1 に答える 1