s4sdk

VDM works for one Odata service, doesn't work for another

耗尽温柔 提交于 2021-01-29 06:50:37
问题 I tried to use S4 SDK to connect to S/4 HANA Odata service. S/4 team gave us two services. With same destination, similar code, integration with one service works, with another doesn't. Best regards Ying code used is final List<User> userList = new DefaultS4cUserMetadataService() .getAllUser() .select( User.USER, User.BUSINESS_UNIT, User.COMPANY, User.COST_CENTER) .filter( User.TIME_STAMP.ge(LocalDateTime.of(1970, Month.JANUARY, 1, 0, 0, 0))) .orderBy(User.USER, Order.ASC) .execute

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

Uploading custom jar to cx-server nexus

不打扰是莪最后的温柔 提交于 2020-02-03 10:07:53
问题 So, I am trying to set up a CI/CD pipeline with the s4sdk. I successfully completed all the steps descriped in this blog. Everything seems to be running smoothly, however my build is failing with the following error message: The following artifacts could not be resolved: com.sap.xs2.security:security-commons:jar:0.28.6, com.sap.xs2.security:java-container-security:jar:0.28.6, com.sap.xs2.security:java-container-security-api:jar:0.28.6, com.sap.security.nw.sso.linuxx86_64.opt:sapjwt.linuxx86

Uploading custom jar to cx-server nexus

倖福魔咒の 提交于 2020-02-03 10:07:03
问题 So, I am trying to set up a CI/CD pipeline with the s4sdk. I successfully completed all the steps descriped in this blog. Everything seems to be running smoothly, however my build is failing with the following error message: The following artifacts could not be resolved: com.sap.xs2.security:security-commons:jar:0.28.6, com.sap.xs2.security:java-container-security:jar:0.28.6, com.sap.xs2.security:java-container-security-api:jar:0.28.6, com.sap.security.nw.sso.linuxx86_64.opt:sapjwt.linuxx86

Uploading custom jar to cx-server nexus

心不动则不痛 提交于 2020-02-03 10:06:47
问题 So, I am trying to set up a CI/CD pipeline with the s4sdk. I successfully completed all the steps descriped in this blog. Everything seems to be running smoothly, however my build is failing with the following error message: The following artifacts could not be resolved: com.sap.xs2.security:security-commons:jar:0.28.6, com.sap.xs2.security:java-container-security:jar:0.28.6, com.sap.xs2.security:java-container-security-api:jar:0.28.6, com.sap.security.nw.sso.linuxx86_64.opt:sapjwt.linuxx86

RFC Destination does not exist

醉酒当歌 提交于 2020-01-25 08:28:38
问题 I'm trying to configure an application running in Tomcat 8.5 with Neo Cloud SDK 3.54.23 to connect to an RFC destination and run the following code: String destinationName = "RFCQueryEndpoint"; ErpConfigContext erpConfigContext = new ErpConfigContext(destinationName); ErpEndpoint endpoint = new ErpEndpoint(erpConfigContext); response.getWriter().write(new Gson().toJson(new DefaultFinancialTransactionService().getList() .execute(endpoint).getListOfSelectedTransactions())); I have tried

How to add multiple destinations for a java application in cloud foundry?

删除回忆录丶 提交于 2020-01-06 04:36:33
问题 I developed a Java application using S4Hana SDK. After deploying the application to SAP Cloud platform, I set the destinations as an environment variable with below command. cf set-env firstapp destinations '[{name: "ErpQueryEndpoint", url: "https://URL", username: "USER", password: "PASSWORD"}]' Now, I would like to add a second destination for the same application. Can someone please help me? Thanks, Sankeerth 回答1: You can define multiple destinations in the environment variable. It is a

What can we do for the error “No error field found in JSON” (VDM:401)?

随声附和 提交于 2020-01-04 07:51:04
问题 We try to call the API API_BUSINESS_PARTNER via our Java application. The Java implementation communicates with a SAPUI5 - Front End application, so that the data can be displayed via an app. Through our On - Premise System it works without any problems and we also get back data. But via the application we get the error "No error field found in JSON" and the SCP - Log for ODataConnectivityUtil shows us that the respective user is not authorized. Accordingly we tried to call an older one MMIM

Accessing user attributes using UserAccessor

本小妞迷上赌 提交于 2019-12-25 03:19:09
问题 The class com.sap.cloud.sdk.cloudplatform.security.user.UserAccessor allows to me to retrieve the current user and it's attributes. For example: Optional<UserAttribute> optionalfirstName = user.getAttribute("firstname"); UserAttribute ua = optionalfirstName.get(); Once I have retrieved the UserAttribute, it has two properites "Name" and "Value". However there is no method available to get the Value. How can I access the value? 回答1: Depending on the SAP CP environment you are using, the

Remote Debugging in SAP Cloud Foundry

陌路散爱 提交于 2019-12-24 17:53:22
问题 I am wondering how to remote debug a S4SDK/Spring 2.0.6 Java Application deployed in SAP Cloud Foundry. I am using Eclipse (Spring Tool Suite) and started the app in Debug Mode. The application will be restarted with the following environment variable: -Dspring.devtools.remote.secret=secret -Xdebug -Xrunjdwp:server=y,transport=dt_socket,suspend=n,address=47822 The console output shows, that after startup an SSH tunnel has automatically been created successfully (as a prerequisite I have