cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Consuming External Service Onpremise in SAP CAP

jmtrujillogalan
Participant
7,580

Hi everyone,

I was reading many threads about how consume an external service in SAP CAP. But i didn't find a solution to my specific problem.

My app is configured to consume an enternal service in Onpremise SAP server. When I use the same destination in the wizard of BAS to create a fiori app, it's work fine.

- EDMX was imported

- Destination was added to package.json

- The services connectivity, xsuaa and destination have been used

- BTP Destination was configured with Basic Auth, Proxy Onpremise

When I try to use this service with a Select, i am receiving "Error during request to remote service: Request failed with status code 401" Logon failed

Is the problem the connectivity of my app to cloud connector?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

jmtrujillogalan
Participant

Finally, I resolved my issue enabling "All logon procedures" in SICF transaction.

See note 2548392

Answers (6)

Answers (6)

Chandruu0208
Explorer
0 Likes

Hi Jose,

So, "Perform all procedures" need to be enabled and check box "Use configuration data from super node" needs to be disabled
correct?

jmtrujillogalan
Participant
0 Likes

Please, change the configuration of your Z* service. In your screen, you are changing root configuration for all services...

In your Z* /sap/opu/odata/sap/Z*

-Procedure: Standard

-Mark: "Use All Login Procedures"

-SAML Conf: Uncheck the option "Use Config from Super..."

Regards

Chandruu0208
Explorer
0 Likes

Hi Jose,
Thank you for your response.

Yes "All logon procedures" in SICF transaction is enabled.

But still i get the same error.

Also, I am not sure if this is relevant but when i try to access the same odata via destination from UI5 application there is a pop up that appears which asks to enter the gateway credentials.

Regards,
Chandra

jmtrujillogalan
Participant
0 Likes

You must uncheck this option, because your node is taking configuration for parent and it hasn't "all procedures" option

Regards

Chandruu0208
Explorer
0 Likes

HI José Miguel Trujillo Galán
I am facing a similar issue when trying to connect to an OData via destination from a CAP service.
I am getting 401
the same destination when called via UI5 app works fine. the issue is only when we make a call from CAP service.

The credentials are working fine from GUI as well.

"'<html><head><title>Logon Error Message</title><META http-equiv="Content-Type" content="text/html;charset=UTF-8"><style type="text/css">body { font-family:tahoma,helvetica,sans-serif;color:#333333;background-color:#FFFFFF; }td { font-family:tahoma,helvetica,sans-serif;font-size:70%;color:#333333; }h1 { font-family:tahoma,helvetica,sans-serif;font-size:160%;font-weight:bold;margin-top:15px;margin-bottom:3px;color:#003366; }h2 { font-family:verdana,helvetica,sans-serif;font-size:120%;font-style:italic;font-weight:bold;margin-top:6px;margin-bottom:6px;color:#999900; }p { font-family:tahoma,helvetica,sans-serif;color:#333333;margin-top:4px;margin-bottom:4px; }ul { font-family:tahoma,helvetica,sans-serif;color:#333333;list-style-type:square;margin-top:8px;margin-bottom:8px; }li { font-family:tahoma,helvetica,sans-serif;color:#33333;margin-top:4px; }.emphasize { color:#333333;background-color:#C8E3FF;padding:5px;}.note { color:#CC6600; }a { font-family:tahoma,helvetica,sans-serif;text-decoration:underline;color:#336699; }a:visited { color:#001166; }a:hover { text-decoration:none; }</style></head><body><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><h1>Logon failed</h1><br><h2>What has happened?</h2><p>Call of URL https://dev.kaust.edu.sa:8006/sap/opu/odata/sap/ZHRTRS0001TSR_GASC/UserDetail(KaustID='100381',UserId='') terminated due to error in logon data.</p></td></tr><tr><td> </td></tr><tr><td class="emphasize"><strong>Note</strong><br><ul><li> Logon performed in system GWD. </li><li> Logon performed for client 260 and language EN. </li></ul></td></tr><tr><td> </td></tr><tr><td><p> </p><h2>What can I do?</h2><ul><li> Check the validity of your certificate for this system. </li> <li> If you do not yet have a user ID, contact your system administrator. </li></ul></br><p class="note">Error Code: ICF-LE-https-c:260-l:E-T:51-C:2-U:5-P:5-L:5-X:005056A83E3C1EEDA9C3B4732C49DE6A_005056A83E3C1EEDA9C3B47325FC3E69_1-x:63E004EC84EFA333E10000000AFE65F3</p></br><p> HTTP 401 - Unauthorized</br><p>Your SAP Internet Communication Framework Team</p></td></tr></table></body></html>'"


Regards,

Chandra

jmtrujillogalan
Participant
0 Likes

Hi Chandra

Did you enable "All logon procedures" in SICF transaction for your service? Also, you must check if SAML configuration get the procedure from parent node and change it.

Regards

sujitsingh5191
Explorer
0 Likes

Mark Use All Logon Procedures under logon Data in SICF transaction for that service.

arthurgeeraert71
Explorer
0 Likes

It gets the right url and odata-service but because it isn't a https it will not work

jasonmuzzy
Active Participant
0 Likes

Did you find a resolution? I'm running into the same issue and also suspect http vs https is the culprit.

arthurgeeraert71
Explorer
0 Likes

jason.muzzy3 I didn't find it yet. Still searching to resolve this problem

MariamIdman
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi arthurgeeraert,

did you manage to find a solution for this issue I'm facing same one?

Best regards,

Mariam

arthurgeeraert71
Explorer
0 Likes

I was trying to build an CAP application with an onpremise odata service but i got an ECONNRESET error and dont know how to fix it.

jmtrujillogalan
Participant

Hi Arthur

Could you provide more details about the error? Do you have a connectivity instance in your app?

Regards

arthurgeeraert71
Explorer
0 Likes

I am working with a destination and in my code I am using this connection.

The problem I think I am facing is not that I am calling my destination wrong but in the cloud connector I am using a https url but when I am trying to use it as a destination it changes to an http.

Boopalan
Explorer
0 Likes
Hi @Arthutgeeraert. Did you find any solution to resolve this ? can you please share here if any ?