https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/topics/SAP-Cloud-SDK-qa.xml SAP Community - SAP Cloud SDK 2024-05-20T11:12:31.480039+00:00 python-feedgen SAP Cloud SDK Q&A in SAP Community https://community.sap.com/t5/technology-q-a/sap-cap-java-connection-to-onpremise-destination-service-is-throwing-error/qaq-p/13590080 SAP CAP Java connection to OnPremise destination service is throwing error 2024-02-01T01:40:55.638000+01:00 sk_ramkumar https://community.sap.com/t5/user/viewprofilepage/user-id/599747 <P>Hi Experts,</P><P>I am trying to connect On Premise ( SAGE Api system ) through my Java CAP application.</P><P>I am using DestinationAccessor to connect my destination,&nbsp; I made successful connection to destination, but I couldn't read the content from API system.&nbsp;</P><P>This is my code.</P><P>&nbsp;</P><DIV><DIV><SPAN>HttpDestination</SPAN><SPAN> destination = DestinationAccessor.getDestination(destName).asHttp();</SPAN></DIV><DIV><SPAN>HttpClient</SPAN><SPAN> client = HttpClientAccessor.getHttpClient(destConfiguration);</SPAN></DIV><DIV><SPAN>HttpGet</SPAN><SPAN> request = </SPAN><SPAN>new</SPAN><SPAN> HttpGet(absoluteURI);</SPAN></DIV><DIV><SPAN>HttpResponse</SPAN><SPAN> response = client.execute(request);</SPAN></DIV><DIV>&nbsp;</DIV><DIV>My absolute URI is&nbsp;"<A href="http://devsage:9999/portalapi/api/data/Orders" target="_blank" rel="noopener nofollow noreferrer">http://devsage:9999/portalapi/api/data/Orders</A>" , the same url is working when I tried,</DIV><DIV>"curl -v -i "dest_name.dest/portalapi/api/data/Orders" and it is giving data.</DIV><DIV>&nbsp;</DIV><DIV><SPAN>client.execute is giving below error, in my BAS,</SPAN></DIV><DIV><SPAN>I<A target="_blank">/O</A> exception (java.net.SocketException) caught when processing request to {}-&gt;<A title="Cmd + click to follow link" target="_blank">http://connectivityproxy.internal.cf.ap10.hana.ondemand.com:20003-&gt;http://devsage:9999</A>: Connection reset</SPAN></DIV><DIV>&nbsp;</DIV><DIV><SPAN>This is my destination created in BTP.</SPAN></DIV><DIV><SPAN><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-01 at 10.26.23 am.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/57806i9A2E671284CE4072/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-02-01 at 10.26.23 am.png" alt="Screenshot 2024-02-01 at 10.26.23 am.png" /></span></SPAN></DIV><DIV>&nbsp;</DIV><DIV>Thanks in advance,</DIV><DIV>Ramkumar</DIV></DIV> 2024-02-01T01:40:55.638000+01:00 https://community.sap.com/t5/technology-q-a/sap-cap-java-accessing-business-rules-destination-is-giving-bad-credentials/qaq-p/13590116 SAP CAP JAVA accessing business rules destination is giving bad credentials error 2024-02-01T03:26:30.632000+01:00 sk_ramkumar https://community.sap.com/t5/user/viewprofilepage/user-id/599747 <P>Hi Experts,</P><P>I am trying to access Business rule destination defined in BTP through DestinationAccessor but it is giving below error,</P><P><SPAN><SPAN class="">"Failed to read authentication token of destination 'BUSINESS_RULES_BPA'. The destination service responded with an error: 'Bad credentials'.</SPAN></SPAN></P><P>&nbsp;</P><P><SPAN><SPAN class="">This is my code to access the destination,</SPAN></SPAN></P><DIV><DIV><SPAN>DestinationAccessor.getDestination("BUSINESS_RULES_BPA").asHttp()</SPAN></DIV></DIV><P><SPAN><SPAN class=""><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-02-01 at 11.00.56 am.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/57834i11A6DC68C8E497B2/image-size/large?v=v2&amp;px=999" role="button" title="Screenshot 2024-02-01 at 11.00.56 am.png" alt="Screenshot 2024-02-01 at 11.00.56 am.png" /></span><BR /></SPAN></SPAN></P><P><SPAN><SPAN class="">The same client secret and password is working fine in Postman.</SPAN></SPAN></P><P><SPAN><SPAN class="">Thanks in advance.</SPAN></SPAN></P><P><SPAN><SPAN class="">Ramkumar</SPAN></SPAN></P> 2024-02-01T03:26:30.632000+01:00 https://community.sap.com/t5/technology-q-a/display-custom-message-on-sap-me-maufacturing-execution-home-screen-after/qaq-p/13594018 Display custom message on SAP ME(Maufacturing Execution) home screen after login 2024-02-05T02:49:09.272000+01:00 TejaswiniS https://community.sap.com/t5/user/viewprofilepage/user-id/1390151 <P>Hi</P><P>If there is server downtime planned then I'm storing the start and end date of downtime in custom table. After login to SAP ME(SAP Manufacturing Execution) home screen, I want to display server downtime alert message on SAP ME homescreen 24 hours prior to planned downtime. Please let me know, if it is possible to display customized messages on home screen in SAP ME?</P><P>Thanks in advance.</P><P>Tejaswini <span class="lia-unicode-emoji" title=":slightly_smiling_face:">🙂</span></P><P>#SAPME</P> 2024-02-05T02:49:09.272000+01:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/customer-expected-price-is-in-incompletion-and-allowing-other-line-item-to/qaq-p/13598743 customer expected price is in incompletion and allowing other line item to be delivered 2024-02-08T03:16:59.288000+01:00 Jai https://community.sap.com/t5/user/viewprofilepage/user-id/1393135 <P>Customer expected price is in incompletion and allowing line items to be delivered , but user doesnt want any line item to be delivered unless all line items are cleared from incompletion&nbsp;</P> 2024-02-08T03:16:59.288000+01:00 https://community.sap.com/t5/crm-and-cx-questions/how-to-publish-a-query-in-sap-cx-cloud/qaq-p/13599400 How to publish a query in SAP CX Cloud 2024-02-08T13:45:37.277000+01:00 Ayham https://community.sap.com/t5/user/viewprofilepage/user-id/1385571 <P>It just allows you to publish the standard query,</P><P>How do you publish the customized queries?</P> 2024-02-08T13:45:37.277000+01:00 https://community.sap.com/t5/technology-q-a/add-custom-action-to-customer-and-use-it-to-work-flow-rule/qaq-p/13612229 Add custom action to Customer and use it to Work flow rule 2024-02-20T13:54:25.600000+01:00 danielepiazza https://community.sap.com/t5/user/viewprofilepage/user-id/567342 <P>Dears,</P><P>My request is to trigger a custom action via Workflow rule for Account .</P><P>Due to is not possible to create an action to the BO "Customer" (Keyword 'action' is not supported in non-ESF2 business object extensions), how can I achieve it?</P><P>&nbsp;</P><P>Best regards,</P><P>Daniele</P> 2024-02-20T13:54:25.600000+01:00 https://community.sap.com/t5/technology-q-a/how-to-use-cloud-sdk-openapi-client-with-cap/qaq-p/13616513 How to use Cloud SDK OpenAPI Client with CAP? 2024-02-23T06:19:37.594000+01:00 MioYasutake https://community.sap.com/t5/user/viewprofilepage/user-id/789 <P><SPAN>Hi community,</SPAN></P><P><SPAN>I'm attempting to use the <A href="https://sap.github.io/cloud-sdk/docs/java/features/rest/generate-rest-client" target="_self" rel="nofollow noopener noreferrer">Cloud SDK's OpenAPI Client</A> in a CAP Java project, but I'm unable to access the generated API client. The structure of my project is as follows:</SPAN></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasuatke_0-1708665010936.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/69638i6336B357C597BE6A/image-size/medium?v=v2&amp;px=400" role="button" title="MioYasuatke_0-1708665010936.png" alt="MioYasuatke_0-1708665010936.png" /></span></P><P><SPAN>The OpenAPI Client has been generated with the following setting in pom.xml.</SPAN></P><pre class="lia-code-sample language-markup"><code> &lt;plugin&gt; &lt;groupId&gt;com.sap.cloud.sdk.datamodel&lt;/groupId&gt; &lt;artifactId&gt;openapi-generator-maven-plugin&lt;/artifactId&gt; &lt;version&gt;${cloud.sdk.version}&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;goals&gt; &lt;goal&gt;generate&lt;/goal&gt; &lt;/goals&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;inputSpec&gt;${project.basedir}/api-specs/AuthorizationAPI.yaml&lt;/inputSpec&gt; &lt;outputDirectory&gt;${project.basedir}/openapi&lt;/outputDirectory&gt; &lt;apiPackage&gt;customer.cap_openapi.generated.authorization.api&lt;/apiPackage&gt; &lt;modelPackage&gt;customer.cap_openapi.generated.authorization.model&lt;/modelPackage&gt; &lt;apiMaturity&gt;released&lt;/apiMaturity&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre><P><SPAN>Here's the source for the CAP event handler:</SPAN></P><pre class="lia-code-sample language-java"><code>package customer.cap_openapi.handlers; import org.springframework.stereotype.Component; import com.sap.cds.services.handler.annotations.On; import com.sap.cds.services.handler.annotations.ServiceName; import com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor; import com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination; import customer.cap_openapi.generated.authorization.api.RoleCollectionsApi; import cds.gen.authorizationservice.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Component @ServiceName(AuthorizationService_.CDS_NAME) class AuthorizationServiceHandler { Logger logger = LoggerFactory.getLogger(AuthorizationServiceHandler.class); <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/1399738">@On</a>(event = GetRoleCollectionsContext.CDS_NAME) public void getRoleCollections(GetRoleCollectionsContext context) { logger.info("getRoleCollection handler"); HttpDestination destination = DestinationAccessor.getDestination("xsuaa").asHttp(); // RoleCollectionsApi rolecollectionApi = new RoleCollectionsApi(destination); } }</code></pre><P><SPAN>I'm encountering the error "<STRONG>The import customer.cap_openapi.generated cannot be resolved</STRONG>".&nbsp;Is the srv/openapi directory the appropriate place to generate the OpenAPI Client? How can I make the Open API client accessible from the event handler source?</SPAN></P><P><SPAN>The code for the project is available in the following Git repository:&nbsp;<A href="https://github.com/miyasuta/cap-openapi/tree/generate_client" target="_self" rel="nofollow noopener noreferrer">https://github.com/miyasuta/cap-openapi/tree/generate_client</A></SPAN></P> 2024-02-23T06:19:37.594000+01:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/every-one-know-how-close-document-lines-in-blanket-agreement-with-sdk-di-in/qaq-p/13636196 every one know how close document lines in blanket Agreement with SDK DI in SAP BO 2024-03-12T21:47:08.751000+01:00 RodolfoGiron https://community.sap.com/t5/user/viewprofilepage/user-id/1411106 <P>i try close just one line in my blanket agreement, but i can not find any method or propierties in&nbsp;</P><P class="">BlanketAgreements_ItemsLine</P><P class="">can you help me?</P> 2024-03-12T21:47:08.751000+01:00 https://community.sap.com/t5/crm-and-cx-questions/filter-attachments-displayed-on-customer-bo/qaq-p/13640225 Filter Attachments displayed on Customer BO 2024-03-16T00:03:40.081000+01:00 nathalie_fouche-nawrot https://community.sap.com/t5/user/viewprofilepage/user-id/570887 <P>Hi,</P><P>I'm trying to create 3 EC to display Attachments linked to Customers (BO); these 3 EC would be filtered according to TypeCode (standard and custom ones), however, it seems it doesn't work properly.</P><P>I have followed the last part of this article "Display selected Documents in Front End" (<A href="https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/selected-document-type/ba-p/13329469" target="_blank">https://community.sap.com/t5/enterprise-resource-planning-blogs-by-members/selected-document-type/ba-p/13329469</A>), it works for a custom BO, but not for an EC of Attachments based on Customer standard BO, all attachments keep on displaying.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_3-1710543223309.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81643iA547AE359348B147/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_3-1710543223309.png" alt="nathalie_fouchenawrot_3-1710543223309.png" /></span></P><P>Here it the reuse COD_Documentlist:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_1-1710543153411.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81641i8E9BC7AE664D74B1/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_1-1710543153411.png" alt="nathalie_fouchenawrot_1-1710543153411.png" /></span></P><P>The binding is correct:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_2-1710543185603.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81642i852E09F9D757CD73/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_2-1710543185603.png" alt="nathalie_fouchenawrot_2-1710543185603.png" /></span></P><P>Worse, is the AdvancedListPane for DocumentList (Customer.Root.AttachmentFolder.DocumentList), everything is bind correctly, but somehow, CategoryType and TypeCode values just don't display in the list...</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_5-1710543487224.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81645i87DA34D07BFB0768/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_5-1710543487224.png" alt="nathalie_fouchenawrot_5-1710543487224.png" /></span></P><P>Even if the value is actually there, in the 2nd line in "Type de document" (TypeCode) column...</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_6-1710543527666.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81646iF94FD8E39EB966E0/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_6-1710543527666.png" alt="nathalie_fouchenawrot_6-1710543527666.png" /></span></P><P>The DataModel:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="nathalie_fouchenawrot_4-1710543460679.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/81644i2D4A73A9A8C27F30/image-size/medium?v=v2&amp;px=400" role="button" title="nathalie_fouchenawrot_4-1710543460679.png" alt="nathalie_fouchenawrot_4-1710543460679.png" /></span></P><P>Is the entity Attachments untouchable? What is SAP hiding??</P> 2024-03-16T00:03:40.081000+01:00 https://community.sap.com/t5/crm-and-cx-questions/how-to-add-action-in-custom-workcenter-in-sap-c4c/qaq-p/13642776 How to add action in custom workcenter in SAP C4C 2024-03-19T12:33:23.901000+01:00 madhurirawat19 https://community.sap.com/t5/user/viewprofilepage/user-id/829470 <P>Hi Team,</P><P>We have custom workcenter "Sales qualified lead" and we have field called Status in header of sales qualifies lead.&nbsp;</P><P>As it's same process to convert the lead. NOw requirement is , user want to convert the lead through "Action" button like we have in standard lead. Instead of manually change to status - "converted" .</P><P>Can you please help me to do this requirement. Please find attached screen shot of it to add "Converted" option in Action .</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="madhurirawat19_0-1710847914507.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/82982i37823835121B6D87/image-size/medium?v=v2&amp;px=400" role="button" title="madhurirawat19_0-1710847914507.png" alt="madhurirawat19_0-1710847914507.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P><P>Thanks and Regards,</P><P>MD.</P> 2024-03-19T12:33:23.901000+01:00 https://community.sap.com/t5/enterprise-resource-planning-q-a/standard-report-for-billing-item-level/qaq-p/13644248 Standard Report for Billing Item Level 2024-03-20T12:23:54.767000+01:00 kiran1985 https://community.sap.com/t5/user/viewprofilepage/user-id/887035 <P>Hello All,</P><P>Wanted to know if we have any Standard report in SAP for Billing Item Level in which we have Storage location field included ?</P><P>&nbsp;</P><P>Thanks and Regards</P><P>Kiran</P> 2024-03-20T12:23:54.767000+01:00 https://community.sap.com/t5/technology-q-a/how-to-call-api-endpoint-on-btp-nodejs-app-from-another-btp-app/qaq-p/13645839 How to call API endpoint on BTP nodejs app from another BTP app? 2024-03-21T15:46:00.486000+01:00 Qualiture https://community.sap.com/t5/user/viewprofilepage/user-id/13773 <P>Hi all,</P><P>I have a BTP NodeJS application (A) which needs to make a REST call to another BTP application (B) at a regular interval.</P><P>In the mta.yaml file for app (A) I have specified the following resource which links to the exposed service of app (B):</P><pre class="lia-code-sample language-yaml"><code> - name: app_a_using_app_b_api type: configuration parameters: provider-nid: mta provider-id: &lt;app B name&gt;:&lt;app B exposed service&gt; version: "&gt;=0.0.0" </code></pre><P>This resource has been added as a required resource for app (A) module:</P><pre class="lia-code-sample language-yaml"><code> - name: app_a_srv type: nodejs path: . requires: - name: app_a_db - name: app_a_using_app_b_api group: destinations properties: forwardAuthToken: false name: app_b_api url: ~{url} timeout: 30000</code></pre><P><BR />In app (A) package.json I then specified the destination:&nbsp;</P><pre class="lia-code-sample language-json"><code> "cds": { "requires": { "middlewares": true, "app_b_api": { "kind": "destination", "credentials": { "destination": "app_b_api" } } } }</code></pre><P>Within app (A), at a regular interval, the following function is then called:</P><pre class="lia-code-sample language-javascript"><code> async doRequestToAppB() { try { const destination = await getDestination({ destinationName: "app_b_api" }); const data = await executeHttpRequest(destination, { method: 'GET', url: "/api/ping" }); logger.info(`Request OK: ${JSON.stringify(data)}`); } catch (err) { logger.error(`Request FAILED: ${err}`); } }</code></pre><P>This request now fails with the following error in the catch-clause:</P><pre class="lia-code-sample language-bash"><code>[app_a] - Request FAILED: TypeError: Converting circular structure to JSON --&gt; starting at object with constructor 'TLSSocket' | property '_httpMessage' -&gt; object with constructor 'ClientRequest' --- property 'socket' closes the circle</code></pre><P>I have tried many ways, but somehow I don't seem to be able to have app (A) automatically do a request to app (B), failing with the above error...</P><P>I also tried to debug the executeHttpRequest function from within BAS, but that did not give me any clues either.</P><P>If anyone has any clues, ideas, directions or tips on how to solve this, that will be highly appreciated!</P><P>Thanks in advance,</P><P>Robin van het Hof</P> 2024-03-21T15:46:00.486000+01:00 https://community.sap.com/t5/technology-q-a/how-to-use-quot-redis-hyperscaler-option-quot-in-spring-boot/qaq-p/13658305 how to use "Redis, Hyperscaler Option" in spring boot 2024-04-04T08:15:39.697000+02:00 jixiangmatt1 https://community.sap.com/t5/user/viewprofilepage/user-id/160608 <P>I create a redis-cache on BTP, and i want to use the redis server in my springboot application, but i don't know how to config the redis properties, the redis-cache server's infomation json is:</P><P>{<BR />"password": "k7QMdykZgwusYqbhAKHqP9TDDKSqQ4w40AzCaHEtIEs=",<BR />"hostname": "redis-c32593a9-54bb-4a9c-a25c-74bcf84021b2.redis.cache.windows.net",<BR />"port": 6380,<BR />"uri": "rediss://:k7QMdykZgwusYqbhAKHqP9TDDKSqQ4w40AzCaHEtIEs=@redis-c32593a9-54bb-4a9c-a25c-74bcf84021b2.redis.cache.windows.net:6380",<BR />"cluster_mode": false,<BR />"tls": {<BR />"host": "redis-c32593a9-54bb-4a9c-a25c-74bcf84021b2.redis.cache.windows.net",<BR />"port": 6380,<BR />"ca": "-----BEGIN CERTIFICATE-----\nMIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBh\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\nMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAwMDBaMGExCzAJBgNVBAYTAlVT\nMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\nb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI\n2/Ou8jqJkTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx\n1x7e/dfgy5SDN67sH0NO3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQ\nq2EGnI/yuum06ZIya7XzV+hdG82MHauVBJVJ8zUtluNJbd134/tJS7SsVQepj5Wz\ntCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyMUNGPHgm+F6HmIcr9g+UQ\nvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQABo0IwQDAP\nBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV\n5uNu5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY\n1Yl9PMWLSn/pvtsrF9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4\nNeF22d+mQrvHRAiGfzZ0JFrabA0UWTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NG\nFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBHQRFXGU7Aj64GxJUTFy8bJZ91\n8rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/iyK5S9kJRaTe\npLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl\nMrY=\n-----END CERTIFICATE-----\n"<BR />}<BR />}</P><P>and please help us how to config the redis connection in my springboot application.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jixiangmatt1_0-1712211190283.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/90883i2571D020DA23C6D0/image-size/medium?v=v2&amp;px=400" role="button" title="jixiangmatt1_0-1712211190283.png" alt="jixiangmatt1_0-1712211190283.png" /></span></P><P>&nbsp;</P><P>&nbsp;</P> 2024-04-04T08:15:39.697000+02:00 https://community.sap.com/t5/technology-q-a/cap-java-destination-proxy-configuration/qaq-p/13662392 CAP Java - Destination - Proxy Configuration 2024-04-08T14:22:09.604000+02:00 Moritz__ https://community.sap.com/t5/user/viewprofilepage/user-id/1426680 <P>Hello Community,</P><P>we are developing a Java CAP application on the BTP and need to access data from an on-premise system.</P><P>The cloud connector is configured and the destination created in the cockpit.</P><P>We are able to use curl in the Business Application Studio terminal and use the destination.</P><P>We followed the documentation to access remote services in Java CAP and create a HTTP client.</P><pre class="lia-code-sample language-java"><code>import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.cloudplatform.connectivity.DestinationAccessor; import com.sap.cloud.sdk.cloudplatform.connectivity.HttpClientAccessor; import org.apache.http.client.HttpClient; Destination destination = DestinationAccessor.getDestination("toKbvStage"); HttpClient client = HttpClientAccessor.getHttpClient(destination);</code></pre><P>On the BAS we export some configuration and are then able to use the HTTP client.</P><pre class="lia-code-sample language-bash"><code>export destinations='[ { "type": "HTTP", "name": "toKbvStage", "url": "http://toKbvStage.dest", "ProxyHost": "localhost", "ProxyPort": 8887 } ]'</code></pre><P>&nbsp;In the mta.yaml we bind the destination service to our service. In the log file we receive the following error:</P><pre class="lia-code-sample language-bash"><code>Unable to create an HttpClient from the provided destination. The destination is supposed to target an on-premise system but lacks the correct proxy configuration. Please check the application logs for further details.</code></pre><P>My interpretation of the error is, that the destination is found, but something on the destination configuration is missing. Does anybody know, how to solve this? Am I missing any additional configuration?</P> 2024-04-08T14:22:09.604000+02:00 https://community.sap.com/t5/technology-q-a/build-a-link-in-c4c/qaq-p/13662974 build a link in C4C 2024-04-09T01:32:39.476000+02:00 ahmedelgammal https://community.sap.com/t5/user/viewprofilepage/user-id/870259 <P>I'm using this structure to build links and send it in mail for BYD system and it works</P><P><A href="https://my******.sapbydesign.com/sap/public/ap/ui/runtime?bo_ns=http://sap.com/xi/AP/RFQProcessing/Global&amp;bo=RequestForQuote&amp;" target="_blank" rel="noopener nofollow noreferrer">https://my******.sapbydesign.com/sap/public/ap/ui/runtime?bo_ns=http://sap.com/xi/AP/RFQProcessing/Global&amp;bo=RequestForQuote&amp;</A><BR />node=Root&amp;operation=SupplierQuoteComparison&amp;object_key=<SPAN>57F9B95C97991EDEB9BF68B8A1C8E47C</SPAN>&amp;key_type=APC_V_UUID</P><P>&nbsp;</P><P>I'm trying to do the same in C4C system, it opens the required screen but empty with no data .. any help ? note that i'm trying to do it for custom screens.</P> 2024-04-09T01:32:39.476000+02:00 https://community.sap.com/t5/technology-q-a/in-sap-c4c-while-creating-an-opportunity-in-qc-screen-popup-message/qaq-p/13678079 In SAP C4C, While creating an Opportunity in QC Screen, Popup Message 2024-04-22T13:33:57.592000+02:00 s_balu https://community.sap.com/t5/user/viewprofilepage/user-id/539535 <P>Dear All,</P><P>In SAP C4C, While creating an Opportunity in QC Screen, on click of Save button, a Popup Message should appear before save the Opportunity. After click Ok , it proceed to Save the Opportunity.</P><P>&nbsp;</P><P>Here i am unable to raise a popup message on Save button while creating a Opportunity in SAP C4C. Please any one suggest ideas.</P><P>BR</P><P>Subrahmanyam.</P> 2024-04-22T13:33:57.592000+02:00 https://community.sap.com/t5/technology-q-a/cap-odata-v2-adapter-batch-request-is-not-supported/qaq-p/13682863 CAP odata-v2-adapter: batch request is not supported? 2024-04-25T23:26:14.891000+02:00 MioYasutake https://community.sap.com/t5/user/viewprofilepage/user-id/789 <P>Hi community,</P><P>I have developed an OData service with CAP using&nbsp;<A href="https://cap.cloud.sap/docs/advanced/odata#odata-v2-proxy-node" target="_self" rel="nofollow noopener noreferrer">odata-v2-adapter</A>. When I try to execute $batch requests to the v2 endpoint, the service returns the following error:</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>{ "error": { "code": "400", "message": { "lang": "en", "value": "OData-Version '2.0' is not a supported version." }, "severity": "error", "target": "/#TRANSIENT#", "ContentID": "cov2ap_1", "innererror": { "errordetails": [ { "code": "400", "message": { "lang": "en", "value": "OData-Version '2.0' is not a supported version." }, "severity": "error", "target": "/#TRANSIENT#", "ContentID": "cov2ap_1" } ] } } }</code></pre><P>&nbsp;</P><P>In the request body, odata-version: 2.0 is specified.</P><P>request url:&nbsp;<SPAN>/odata/v2/sales/$batch</SPAN></P><P>&nbsp;</P><pre class="lia-code-sample language-yaml"><code>--batch Content-TYpe: multipart/mixed; boundary=changeset --changeset Content-Type: application/http Content-Transfer-Encoding: binary POST SalesOrders HTTP/1.1 Content-Type: application/json odata-version: 2.0 { "orderDate": "2024-04-23", "customer": "Postman", "items": [ { "product": "PC", "quantity": 1, "price": 1000 } ] } --changeset-- --batch--</code></pre><P>&nbsp;</P><P>The error is raised at the following line of code.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasutake_0-1714079695766.png" style="width: 999px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/102015i5278B034B66A5B70/image-size/large?v=v2&amp;px=999" role="button" title="MioYasutake_0-1714079695766.png" alt="MioYasutake_0-1714079695766.png" /></span></P><P>If I remove the "odata-version: 2.0" or change the version to 4.0 (inconsistent with the request url though), the request succeeds. This makes calling the v2 endpoint using <A href="https://sap.github.io/cloud-sdk/docs/java/features/odata/v2-vdm-client" target="_self" rel="nofollow noopener noreferrer">SAP Cloud SDK (Java) OData v2 client</A> difficult, as the client (seemingly) sets "odata-version: 2.0".&nbsp;</P><P>Is there any solution for this issue?</P> 2024-04-25T23:26:14.891000+02:00 https://community.sap.com/t5/technology-q-a/assistance-required-smtp-authentication-error-in-btp-cap-application/qaq-p/13686478 Assistance Required: SMTP Authentication Error in BTP CAP Application 2024-04-29T22:08:03.963000+02:00 rahuljain257 https://community.sap.com/t5/user/viewprofilepage/user-id/431 <P>Greetings,</P><P>I've encountered an SMTP authentication error while attempting to send an email through a BTP CAP Application. The error message is as follows:</P><pre class="lia-code-sample language-abap"><code>Uncaught Error: Invalid login: 535-5.7.8 Username and Password not accepted. For more information, go to 535 5.7.8 https://support.google.com/mail/?p=BadCredentials w10-20020a0cf70a000000b006a0dbe40533sm110635qvn.135 - gsmtp at SMTPConnection._formatError (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:798:19) at SMTPConnection._actionAUTHComplete (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:1577:34) at SMTPConnection.&lt;anonymous&gt; (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:554:26) at SMTPConnection._processResponse (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:982:20) at SMTPConnection._onData (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:763:14) at SMTPConnection._onSocketData (/home/user/projects/SDModule/node_modules/nodemailer/lib/smtp-connection/index.js:195:44) at TLSSocket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) { code: 'EAUTH', response: '535-5.7.8 Username and Password not accepted. For more information, go to\n' + '535 5.7.8 https://support.google.com/mail/?p=BadCredentials w10-20020a0cf70a000000b006a0dbe40533sm110635qvn.135 - gsmtp', responseCode: 535, command: 'AUTH PLAIN'</code></pre><P>I have attached the destination configuration and a snippet of the sample code from the CAP application for reference. Any insights or suggestions to resolve this issue would be greatly appreciated.</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rahuljain257_0-1714420911539.png" style="width: 655px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/103501i8F75ADB70562DA6A/image-dimensions/655x257?v=v2" width="655" height="257" role="button" title="rahuljain257_0-1714420911539.png" alt="rahuljain257_0-1714420911539.png" /></span></P><P>Sample code which I wrote to send the application -</P><pre class="lia-code-sample language-abap"><code>srv.on("getNorthwindProducts", async(req) =&gt; { try { const mailConfig = { from: 'test@gmail.com', to: 'test@gmail.com', subject: 'e-mail subject', text: 'e-mail text' }; sendMail({ destinationName: 'hotmail' }, [mailConfig]); return data; } catch(err) { console.log(err); } });</code></pre><P>Thank you in advance for your help!</P><P>Regards</P><P>Rahul Jain</P><P>&nbsp;</P><P>&nbsp;</P> 2024-04-29T22:08:03.963000+02:00 https://community.sap.com/t5/technology-q-a/adding-connectivity-destination-service-as-a-dependency-makes-the-cap/qaq-p/13688679 Adding connectivity-destination-service as a dependency makes the CAP service endpoints disappear 2024-05-01T23:40:55.051000+02:00 MioYasutake https://community.sap.com/t5/user/viewprofilepage/user-id/789 <P>Hi community,</P><P>In a CAP application developed with Java, I am trying to use SAP Cloud SDK (Java) to make batch request to a remote OData service. Local testing works fine. Now, to deploy this application to Cloud Foundry, I've added the following dependency to the srv/pom.xml, as per the <A href="https://sap.github.io/cloud-sdk/docs/java/features/connectivity/btp-destination-service#prerequisites" target="_self" rel="nofollow noopener noreferrer">document</A>. Cloud SDK version is 5.8.0.</P><pre class="lia-code-sample language-markup"><code> &lt;dependency&gt; &lt;groupId&gt;com.sap.cloud.sdk.cloudplatform&lt;/groupId&gt; &lt;artifactId&gt;connectivity-destination-service&lt;/artifactId&gt; &lt;/dependency&gt; </code></pre><P>Then, strangely, all the service endpoints are disappeared.&nbsp;</P><P>Before adding the dependency:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasutake_0-1714599473185.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/104561i7F9011D2F834E323/image-size/medium?v=v2&amp;px=400" role="button" title="MioYasutake_0-1714599473185.png" alt="MioYasutake_0-1714599473185.png" /></span></P><P>After adding the dependency:</P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MioYasutake_1-1714599493088.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/104562i82100250B503AEEA/image-size/medium?v=v2&amp;px=400" role="button" title="MioYasutake_1-1714599493088.png" alt="MioYasutake_1-1714599493088.png" /></span></P><P>Have any of you experienced such issue?&nbsp;</P><P>The code is available at:&nbsp;<A href="https://github.com/miyasuta/java-batch-root/tree/main/java-batch-v4" target="_blank" rel="nofollow noopener noreferrer">https://github.com/miyasuta/java-batch-root/tree/main/java-batch-v4</A>.</P><P>&nbsp;</P><P>&nbsp;</P> 2024-05-01T23:40:55.051000+02:00 https://community.sap.com/t5/technology-q-a/sap-cap-could-not-work-with-on-premise-remote-odata-service-via-destination/qaq-p/13698982 SAP CAP - Could not work with on-premise remote odata service via destination - 401 authentication 2024-05-13T09:13:13.054000+02:00 AnkurGokhale https://community.sap.com/t5/user/viewprofilepage/user-id/1454904 <P>Hi all,</P><P>I have a CAP framework based application which is intended to connect to a remote service via destination (on-premise odata v2 service).</P><P>The name of the destination is MyDest1.</P><P>The contents of the package.json are as below:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>"cds": { "requires": { "ZGW_MY_SRV": { "kind": "odata-v2", "model": "srv/my-service", "[sandbox]": { "credentials": { "path": "/sap/opu/odata/sap/ZGW_MY_SRV", "destination": "MyDest1" } }, "[production]": { "credentials": { "path": "/sap/opu/odata/sap/ZGW_MY_SRV", "destination": "MyDest1" } } }, "auth": "xsuaa", "destinations": true, "connectivity": true, "[production]": { "connectivity": true, "auth": "xsuaa", "destinations": true } } }</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>The mta.yaml:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-yaml"><code>_schema-version: '3.1' ID: MyCAP-nodejs version: 1.0.0 description: "MyCAP-CAPM-NodeJS" parameters: enable-parallel-deployments: true build-parameters: before-all: - builder: custom commands: - npm ci - npx cds build --production modules: - name: MyCAP-nodejs-srv type: nodejs path: gen/srv parameters: buildpack: nodejs_buildpack readiness-health-check-type: http readiness-health-check-http-endpoint: /health enable-ssh: true build-parameters: builder: npm provides: - name: srv-api # required by consumers of CAP services (e.g. approuter) properties: srv-url: ${default-url} requires: - name: MyCAPnodejs-connectivity - name: MyCAPnodejs-destination - name: MyCAPnodejs-auth - name: MyCAP-nodejs type: approuter.nodejs path: app/router parameters: enable-ssh: true keep-existing-routes: true disk-quota: 256M memory: 256M requires: - name: srv-api group: destinations properties: name: srv-api # must be used in xs-app.json as well url: ~{srv-url} forwardAuthToken: true - name: MyCAPnodejs-auth resources: - name: MyCAPnodejs-connectivity type: org.cloudfoundry.managed-service parameters: service: connectivity service-plan: lite - name: MyCAPnodejs-destination type: org.cloudfoundry.managed-service parameters: service: destination service-plan: lite - name: MyCAPnodejs-auth type: org.cloudfoundry.managed-service parameters: service: xsuaa service-plan: application path: ./xs-security.json config: xsappname: MyCAP-nodejs-${org}-${space} tenant-mode: dedicated</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>.env file contains a destinations as a variable:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code>destinations=[{ "name": "MyDest1", "url": "http://MyDest1.dest", "proxyConfiguration":{ "host": "127.0.0.1", "port": 8887, "protocol":"http" } }]</code></pre><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P>.cdsrc-private.json:</P><P>&nbsp;</P><P>&nbsp;</P><pre class="lia-code-sample language-json"><code>{ "requires": { "[hybrid]": { "auth": { "binding": { "type": "cf", "apiEndpoint": "https://api.cf.eu10.hana.ondemand.com", "org": "MyOrg-fiori", "space": "DevSpace", "instance": "MyCAPnodejs-auth", "key": "default", "resolved": false }, "kind": "xsuaa-auth", "vcap": { "name": "auth" } }, "ZGW_DevSpace_SRV": { "credentials": { "path": "/sap/opu/odata/sap/ZGW_MY_SRV", "destination": "MyDest1" } }, "destinations": { "binding": { "type": "cf", "apiEndpoint": "https://api.cf.eu10.hana.ondemand.com", "org": "MyOrg-fiori", "space": "DevSpace", "instance": "MyCAPnodejs-destination", "key": "MyCAPnodejs-destination-key", "resolved": false }, "kind": "destinations", "vcap": { "name": "destinations" } }, "custom-service:MyCAPnodejs-connectivity": { "binding": { "type": "cf", "apiEndpoint": "https://api.cf.eu10.hana.ondemand.com", "org": "MyOrg-fiori", "space": "DevSpace", "instance": "MyCAPnodejs-connectivity", "key": "default", "resolved": false }, "vcap": { "name": "custom-service:MyCAPnodejs-connectivity" } } } } }</code></pre><P>&nbsp;</P><P>my-service.js:</P><pre class="lia-code-sample language-javascript"><code>const cds = require('@sap/cds'); module.exports = cds.service.impl(async function() { const bupa = await cds.connect.to('ZGW_MY_SRV'); this.on('READ', ['EntityA', 'EntityB'], async (req) =&gt; { try { const result = await bupa.run(req.query); return result } catch(error) { console.error("Error accessing destination:", error); // throw new Error("Failed to access data from destination."); req.error(502, `Gateway error: ${error.message}`); } }); });</code></pre><P>If I run the application in Business Application Studio (BAS) using commands:</P><DIV><DIV><SPAN>cf login -a <A href="https://api.cf.eu10.hana.ondemand.com/" target="_blank" rel="noopener nofollow noreferrer">https://api.cf.eu10.hana.ondemand.com/</A> --sso and&nbsp;</SPAN><SPAN>cds watch --profile hybrid,</SPAN></DIV></DIV><DIV><DIV><SPAN><SPAN>it works as in if I click on the entity from the previewed services in the new tab, I get the data from the on premise system via destination and the same gets logged to the BAS terminal:</SPAN></SPAN></DIV></DIV><P>&nbsp;</P><pre class="lia-code-sample language-bash"><code>[2024-05-11T10:48:58.004Z] INFO (env-destination-accessor): Successfully retrieved destination 'MyDest1' from environment variable.</code></pre><P>&nbsp;</P><DIV>However once deployment to the BTP cloud foundry space, it throws an error message as 401 Unauthorized.</DIV><DIV><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnkurGokhale_0-1715584592013.png" style="width: 400px;"><img src="https://community.sap.com/t5/image/serverpage/image-id/109343i294D71828A380BD8/image-size/medium?v=v2&amp;px=400" role="button" title="AnkurGokhale_0-1715584592013.png" alt="AnkurGokhale_0-1715584592013.png" /></span><P>&nbsp;</P></DIV><DIV>&nbsp;</DIV><DIV>In the apps that I access via cf logs &lt;myapp-srv&gt; --recent, I could see the URL I am maintaining in the destination in axios error logs.</DIV><DIV>I believe the CAP library is able to get the URL but not performing the authentication based on the method, username and password provided in the destination.</DIV><DIV>&nbsp;</DIV><DIV>Need help.</DIV> 2024-05-13T09:13:13.054000+02:00