Friday, May 23, 2025
News PouroverAI
Visit PourOver.AI
No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing
News PouroverAI
No Result
View All Result

The role of SAP Cloud SDK in SAP Cloud Application Programming Model service integration

October 29, 2023
in Cloud & Programming
Reading Time: 3 mins read
0 0
A A
0
Share on FacebookShare on Twitter



Continuing on from the previous back-to-basics episode, we now look at the role of SAP Cloud SDK and also at cds env, in the external service integration scenario we’re putting together. Join us, everyone welcome, especially beginners!

Topics:
SAP Cloud SDK, CAP, cds, JavaScript, OData, HTTP, npm, EDMX, metadata, destinations

Links:
Main Hands-on SAP Dev with qmacro playlist:
What’s Next for SAP CodeJam in 2023?
SAP Developer News February 16th 2023:

Chapters:
00:00 Welcome and introduction
08:40 Looking at where we left off last time
13:20 Starting off with cds watch, getting ‘show’ served, and ‘API_BUSINESS_PARTNER’ mocked
14:13 Understanding the nuances of –with-mocks relating to cds.requires and external service bindings
16:50 Mocking ‘API_BUSINESS_PARTNER’ in a separate process with cds mock
18:30 Starting cds watch in a second terminal and noting ‘API_BUSINESS_PARTNER’ is not mocked by that second CAP server process
20:20 Thinking about the @cds.persistence.skip and “cannot be served generically” error and why it happens
21:50 Adding a show.js file with some specific handling of READ events for the ‘Participants’ entity, which delegate those requests to a remote system
27:20 Looking at the new log message we get (‘connect to API_BUSINESS_PARTNER odata { … }’) when cds watch (re)starts
28:40 Rejoicing in a new, different error when we now make an OData request to get participants data – a missing @sap-cloud-sdk/http-client package
30:00 Understanding why the SAP Cloud SDK is needed, and what it does for CAP services
32:40 Installing the @sap-cloud-sdk/http-client package and having a look what it brings
36:10 Re-requesting the Participants entity set and seeing now a successful retrieval of data from the (still mocked, in a separate process) remote service
37:00 Staring at the request that was sent to the remote system (via bupa.run(req.query))
38:50 Adding some system query options to see them come through in a new request
39:50 Stop mocking the remote service (and getting yet another error (ECONNREFUSED) which we learn from and which tells us something)
42:10 Getting the sandbox URL from the SAP API Business Hub
42:50 Starting to look again at cds env and adding information to a new .env file, including the use of a “sandbox” profile
44:30 Using cds env get (and ls) to see the environment values for the API_BUSINESS_PARTNER requires information in general and in the sandbox-specific profile
45:50 Running cds watch –profile sandbox and understanding why API_BUSINESS_PARTNER is not mocked – in contrast to when it is mocked when we don’t use –profile sandbox
48:05 Thinking about the difference between the ‘odata’ and ‘odata-v2’ kinds, and why we get different ones in different circumstances
48:50 Requesting the Participants entity set again and seeing yet another error which we learn from – an HTTP 401 response with a message telling us an API key is missing
49:30 Adding a new entry in .env to specify the API key value
50:20 Specifying a deliberately incorrect API key value, and getting a 401 error with a message now telling us that the API key is invalid (and yes, 401 is in fact the appropriate status code here too)
51:52 Adding my API key to the .env file in ‘secret mode’ and restarting ‘cds watch –profile sandbox’, and thinking about what this collection of credentials is, effectively a destination definition
53:40 Making yet another request to the Participants entity set successfully, with data being retrieved from the remote sandbox server!
55:12 Adding DEBUG=remote to .env to enable us to see the details of the request (which is delegated to the remote system) in our local CAP server log output (after we fixed the missing newline in the file)

source

Tags: ApplicationcloudintegrationmodelProgrammingRoleSAPSDKservice
Previous Post

NYU Researchers have Created a Neural Network for Genomics that can Explain How it Reaches its Predictions

Next Post

LIVE: Market Opening – July 10, 2023 | Business News Live | Share Market | Sensex & Nifty Trading

Related Posts

Top 20 Javascript Libraries You Should Know in 2024
Cloud & Programming

Top 20 Javascript Libraries You Should Know in 2024

June 10, 2024
Simplify risk and compliance assessments with the new common control library in AWS Audit Manager
Cloud & Programming

Simplify risk and compliance assessments with the new common control library in AWS Audit Manager

June 6, 2024
Simplify Regular Expressions with RegExpBuilderJS
Cloud & Programming

Simplify Regular Expressions with RegExpBuilderJS

June 6, 2024
How to learn data visualization to accelerate your career
Cloud & Programming

How to learn data visualization to accelerate your career

June 6, 2024
BitTitan Announces Seasoned Tech Leader Aaron Wadsworth as General Manager
Cloud & Programming

BitTitan Announces Seasoned Tech Leader Aaron Wadsworth as General Manager

June 6, 2024
Copilot Studio turns to AI-powered workflows
Cloud & Programming

Copilot Studio turns to AI-powered workflows

June 6, 2024
Next Post
LIVE: Market Opening  – July 10, 2023 | Business News Live | Share Market | Sensex & Nifty Trading

LIVE: Market Opening - July 10, 2023 | Business News Live | Share Market | Sensex & Nifty Trading

XRP PRICE SURGES on News in SEC vs Ripple Lawsuit, XRP IS NOT A SECURITY, Accumulation Range Escaped

XRP PRICE SURGES on News in SEC vs Ripple Lawsuit, XRP IS NOT A SECURITY, Accumulation Range Escaped

Top 3 AI Stocks to Buy Now (ARK Invest’s Big Ideas 2023)

Top 3 AI Stocks to Buy Now (ARK Invest's Big Ideas 2023)

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Trending
  • Comments
  • Latest
Is C.AI Down? Here Is What To Do Now

Is C.AI Down? Here Is What To Do Now

January 10, 2024
23 Plagiarism Facts and Statistics to Analyze Latest Trends

23 Plagiarism Facts and Statistics to Analyze Latest Trends

June 4, 2024
Accenture creates a regulatory document authoring solution using AWS generative AI services

Accenture creates a regulatory document authoring solution using AWS generative AI services

February 6, 2024
A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

A faster, better way to prevent an AI chatbot from giving toxic responses | MIT News

April 10, 2024
Porfo: Revolutionizing the Crypto Wallet Landscape

Porfo: Revolutionizing the Crypto Wallet Landscape

October 9, 2023
Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

Part 1: ABAP RESTful Application Programming Model (RAP) – Introduction

November 20, 2023
Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

Can You Guess What Percentage Of Their Wealth The Rich Keep In Cash?

June 10, 2024
AI Compared: Which Assistant Is the Best?

AI Compared: Which Assistant Is the Best?

June 10, 2024
How insurance companies can use synthetic data to fight bias

How insurance companies can use synthetic data to fight bias

June 10, 2024
5 SLA metrics you should be monitoring

5 SLA metrics you should be monitoring

June 10, 2024
From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

From Low-Level to High-Level Tasks: Scaling Fine-Tuning with the ANDROIDCONTROL Dataset

June 10, 2024
UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

UGRO Capital: Targeting to hit milestone of Rs 20,000 cr loan book in 8-10 quarters: Shachindra Nath

June 10, 2024
Facebook Twitter LinkedIn Pinterest RSS
News PouroverAI

The latest news and updates about the AI Technology and Latest Tech Updates around the world... PouroverAI keeps you in the loop.

CATEGORIES

  • AI Technology
  • Automation
  • Blockchain
  • Business
  • Cloud & Programming
  • Data Science & ML
  • Digital Marketing
  • Front-Tech
  • Uncategorized

SITEMAP

  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us

Copyright © 2023 PouroverAI News.
PouroverAI News

No Result
View All Result
  • Home
  • AI Tech
  • Business
  • Blockchain
  • Data Science & ML
  • Cloud & Programming
  • Automation
  • Front-Tech
  • Marketing

Copyright © 2023 PouroverAI News.
PouroverAI News

Welcome Back!

Login to your account below

Forgotten Password? Sign Up

Create New Account!

Fill the forms bellow to register

All fields are required. Log In

Retrieve your password

Please enter your username or email address to reset your password.

Log In