sap-cloud-sdk

How to get SAP CloudSdk BatchRequest not to ignore filter parameter on Batch Query?

社会主义新天地 提交于 2021-01-28 14:24:03
问题 We are currently struggeling with Batch Query, which seems to ignore the filter expressions on S4 side caused by a wrong URL encoding. /sap/opu/odata/sap/ZP2M_A_CONTRACT_SEARCH_HDR_CDS/ZP2M_A_CONTRACT_SEARCH_HDR?$filter=PurchaseContractID eq %274600002020%27&$select=*&$format=json Executing the query using FluentHelperRead.execute(HttpClient) the returned list of entities contains the expected result with exactly one entity. Executing the query as Batch Query the following request is logged

How to get SAP CloudSdk BatchRequest not to ignore filter parameter on Batch Query?

荒凉一梦 提交于 2021-01-28 14:14:29
问题 We are currently struggeling with Batch Query, which seems to ignore the filter expressions on S4 side caused by a wrong URL encoding. /sap/opu/odata/sap/ZP2M_A_CONTRACT_SEARCH_HDR_CDS/ZP2M_A_CONTRACT_SEARCH_HDR?$filter=PurchaseContractID eq %274600002020%27&$select=*&$format=json Executing the query using FluentHelperRead.execute(HttpClient) the returned list of entities contains the expected result with exactly one entity. Executing the query as Batch Query the following request is logged

Perform filter on expanded entity with SAP Cloud SDK

柔情痞子 提交于 2021-01-28 12:19:00
问题 So this might be an easy one, but I somehow can't wrap my head around it. I am trying to find a business partner by its e-mail address using the SAP Cloud SDK. This is what I have so far: final List<BusinessPartner> businessPartners = new DefaultBusinessPartnerService() .getAllBusinessPartner() .select(BusinessPartner.BUSINESS_PARTNER, BusinessPartner.TO_BUSINESS_PARTNER_ADDRESS .select(BusinessPartnerAddress.TO_EMAIL_ADDRESS .select(AddressEmailAddress.SEARCH_EMAIL_ADDRESS))) .filter

Mock a Https destination to connect to system behind OAuth2 authentication

自作多情 提交于 2021-01-28 05:50:09
问题 Use Case :: Trying to mock a destination that would help us connect to a cloud S4 system behind an IDP and requires Oauth2 authentication. I have been able to mock a local destination to connect to system behind basic authentication. We are trying to understand how to mock the additional components susch as XSUAA service that would require us to generate the token We want to use this destination to enable us to connect to remote systems locally without modifying the code developed for the

E-Tag handling for odatav2 in SAP Cloud SDK VDM

旧街凉风 提交于 2021-01-27 20:24:44
问题 Using LATEST java SAP Cloud Sdk We are trying to perform an update to OutboundDelivery in S/4 system. We are using API_OUTBOUND_DELIVERY_SRV version 2 for it. The service requires us to use etag, i.e. it requires us to provide a header - if-match with the corresponding value of the etag. We are using VDM for performing the update and are making use of com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.outbounddeliveryv2.batch.OutboundDeliveryV2ServiceBatch . Please find the code snippet used

Capture IDP User attributes in SAP cloud foundry app via SDK UserAccesor API

僤鯓⒐⒋嵵緔 提交于 2020-08-26 04:51:25
问题 I wanted to capture user attributes coming from SAP IDP(Identity & Authentication tenant service like department,salutation ,company etc ,via UserAccessor SDK api,but although those attributes are set and has value in IDP user and all the integration with IDP and sub account is in place post authentication ,user attributes object is empty ,i am only able to retrieve specific attributes like first names ,last name,email address ,user groups etc via JWT and UserAccessor api ,but no luck with

SFSF OData call: Failed to convert response into ODataFeed: An 'EdmSimpleTypeException' occurred

心已入冬 提交于 2020-03-05 06:06:33
问题 Following the problem from question: Generate VDM for SFSF using Java in SAP Cloud SDK: Generated URI is wrong I generated a Virtual Data Model from a metadata file from SFSF using the Maven plugin and SAP Cloud SDK for Java. The generator works correctly, however the URI generated is not what SFSF is expecting: Generated URI: /odata/v2/SFODataSet Expected URI: /odata/v2 or /odata/v2/JobRequisition (SFODataSet entity does not exist, and SFSF gives an error when trying to access it). Anyway, I

Generate VDM for SFSF using Java in SAP Cloud SDK: Generated URI is wrong

徘徊边缘 提交于 2020-03-03 06:58:26
问题 I'm trying to build an app that reads info from SFSF. For this, I'm using the Virtual Data model generator tool (the maven plugin) with SFSF OData metadata to be able to access the system. I'm following these steps: Get a project via archetype (with powershell): mvn archetype:generate "-DarchetypeGroupId=com.sap.cloud.sdk.archetypes" "-DarchetypeArtifactId=scp-cf-tomee" "-DarchetypeVersion=RELEASE" Add the following to the application\pom.xml In dependencies: <dependency> <groupId>org

When to use (decorate with) what and why - DefaultErpHttpDestination, DefaultHttpDestination?

喜你入骨 提交于 2020-02-21 06:29:06
问题 Using java SAP Cloud SDK I have to use com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.outbounddeliveryv2.batch.OutboundDeliveryV2ServiceBatch.execute(HttpDestinationProperties destination) to perform some updates on S/4 system. This method, execute takes an argument of type HttpDestinationProperties . Since I need a destination, I am using below code to get destination: HttpDestination destination = DestinationAccessor.getDestination("MyErpSystem").asHttp(); Since HttpDestination extends

When to use (decorate with) what and why - DefaultErpHttpDestination, DefaultHttpDestination?

江枫思渺然 提交于 2020-02-21 06:28:07
问题 Using java SAP Cloud SDK I have to use com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.outbounddeliveryv2.batch.OutboundDeliveryV2ServiceBatch.execute(HttpDestinationProperties destination) to perform some updates on S/4 system. This method, execute takes an argument of type HttpDestinationProperties . Since I need a destination, I am using below code to get destination: HttpDestination destination = DestinationAccessor.getDestination("MyErpSystem").asHttp(); Since HttpDestination extends