s4sdk openSAP develop extension课程-未创建地址-模拟服务器日志中没有put操作
s4sdk openSAP develop extension Course - Address not created - no put operation in mock server log
我已经创建了模拟服务器,它显示 GET 操作选择所有合作伙伴,并将通过 ID 获取合作伙伴。
如果我单击“添加地址”按钮,则日志文件中没有 put 或 post 操作。
模拟服务器日志:
Request: GET
/sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='1003764')?$select=BusinessPartner,CreationDate,FirstName,IsFemale,IsMale,LastName,to_BusinessPartnerAddress/AddressID,to_BusinessPartnerAddress/BusinessPartner,to_BusinessPartnerAddress/CityName,to_BusinessPartnerAddress/Country,to_BusinessPartnerAddress/HouseNumber,to_BusinessPartnerAddress/PostalCode,to_BusinessPartnerAddress/StreetName&$expand=to_BusinessPartnerAddress&$format=json
Reading business partner 1003764
从应用程序登录
12:51:35.357 [http-bio-8080-exec-10] ERROR
com.sap.cloud.sdk.odatav2.connectivity.ODataQuery - Successfully
connected to destination service.
我是否缺少设置?
您可以通过以下方式实现业务合作伙伴地址的添加功能:
BusinessPartnerAddress addressToCreate = BusinessPartnerAddress.builder()
.businessPartner(businessPartnerId)
.streetName("someStreet")
.build();
new DefaultBusinessPartnerService()
.createBusinessPartnerAddress(addressToCreate)
.execute();
我已经创建了模拟服务器,它显示 GET 操作选择所有合作伙伴,并将通过 ID 获取合作伙伴。 如果我单击“添加地址”按钮,则日志文件中没有 put 或 post 操作。 模拟服务器日志:
Request: GET /sap/opu/odata/sap/API_BUSINESS_PARTNER/A_BusinessPartner(BusinessPartner='1003764')?$select=BusinessPartner,CreationDate,FirstName,IsFemale,IsMale,LastName,to_BusinessPartnerAddress/AddressID,to_BusinessPartnerAddress/BusinessPartner,to_BusinessPartnerAddress/CityName,to_BusinessPartnerAddress/Country,to_BusinessPartnerAddress/HouseNumber,to_BusinessPartnerAddress/PostalCode,to_BusinessPartnerAddress/StreetName&$expand=to_BusinessPartnerAddress&$format=json Reading business partner 1003764
从应用程序登录
12:51:35.357 [http-bio-8080-exec-10] ERROR com.sap.cloud.sdk.odatav2.connectivity.ODataQuery - Successfully connected to destination service.
我是否缺少设置?
您可以通过以下方式实现业务合作伙伴地址的添加功能:
BusinessPartnerAddress addressToCreate = BusinessPartnerAddress.builder()
.businessPartner(businessPartnerId)
.streetName("someStreet")
.build();
new DefaultBusinessPartnerService()
.createBusinessPartnerAddress(addressToCreate)
.execute();