Create REST API in SAP - without ODATA - REST Service in ABAP [english]
Вставка
- Опубліковано 21 лип 2024
- In today's video, I will show you how you can create a simple REST API in SAP. To do this, we use the transaction SE24 to create two new classes that inherit from the CL_REST_HTTP_HANDLER and CL_REST_RESOURCE classes. We redefine two methods of these newly created classes and write some code. Then we create a service via the transaction SCIF and test it with Postman.
CL_REST_HTTP_HANDLER
This is the basic handler class for ABAP REST applications, i.e. every REST application must derive its handler class from this class.
IF_REST_APPLICATION
Declares the GET_ROOT_HANDLER method, which must be implemented by every ABAP REST application.
CL_REST_RESOURCE
This class is the base class for all REST resources. The interface
IF_REST_RESOURCE defines the methods GET, POST, PUT, DELETE, HEAD and OPTIONS. In our example, we redefine the GET method here.
Each REST application resource class inherits from this class and overwrites its methods.
CL_REST_ROUTER
This class is used to resolve REST resource handler classes from the URIs (Uniform Resource Identifier) used during REST request processing.
The handler class is assigned to the URI template by calling the ATTACH method.
#sap #abap #rest #api #service
▬▬ Literature 📚 ▬▬▬▬▬▬▬▬▬▬▬▬▬
▶ ABAP: An Introduction 2020 amzn.to/45CLTqk
▶ Complete ABAP 2023 amzn.to/45D5UNM
▶ ABAP to the Future 2022 amzn.to/42cgWGs
▶ Clean ABAP 2022 amzn.to/3KAqmow
▬▬ My Hardware 💻 ▬▬▬▬▬▬▬▬▬▬▬▬▬
▶ Microphone: amzn.to/3zj2UIz
▶ Headphone: amzn.to/3GUBRFg
▬▬ My Software (free) 💾 ▬▬▬▬▬▬▬▬▬▬▬
▶ Video Recorder: bit.ly/678fgh6
▶ Video Editor: bit.ly/38Rj9lb
▶ Thumbnail: bit.ly/CustAndCodeThumbnail
▶ Gamma AI: bit.ly/3nsdvgr
▬▬ Further Links 🔗 ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
⭐Become my subscriber: bit.ly/CustAndCodeSub
🎬All videos in English: bit.ly/CustAndCodeENG
☕Buy me a Coffee 😀: bit.ly/3dih2cl
*The links are affiliate links. There are no additional costs.
📍Attribution:
UA-cam Subscribe Animations: pixabay.com/videos/search/sub...
How we convert deep table data or deep internal data from abap to json ...i have seen deep structure video what about deep internal data conversions ?
Süper video thx bro🎉🎉
Thank you for your feedback 🤗
Thanks for shareing
I'm glad you liked it. And thank you for watching! 🤗
I like your youtube But is there any abap program like using sap standard program?? Forexample , I want to create a program that uses fv50 to generate large amounts of document. Could you help me??
Unfortunately I'm not an FI expert. I know that module from the view of a programmer but not from the view of a key user. 🙄
Thanks for sharing!
Could you suggest solution in case of following error message when trying to Test the service in SICF: "Hmmm… can't reach this page server" and "IP address could not be found"?
I'm glad that you liked it. 🤗 Which SAP system do you use? is it a trial system? 🤔
It's the 'sandbox' system within our company, not a trial one.
good one. But will it be useful in any scenarios?
One of my clients use rest apis to create SAP accounts from an external identity provider. You can use it to fetch some SAP data with external programs too. 🤗
i have also used this method to a client who didn't have SAP PI/PO
Thanks for your feedback! 🤗
Is it necessary yo enter username and password.. if we dnt have production server credentials.. what should we do? Kindly suggest and make video
I am not sure If I understand the question right, but you need an authorization? 🤔
I want to ask.. lets suppose i created the same in developer server and moves the Transport request to quality server and then to production server. Do i need to pass username and password in popup to access the api...??
@@sandeep-4433 yes you can provide a username and a password on the production system as well because I think you don't have the same password on your development system and production system. But I think there is another option where you not need to pass a username and a password but I have to check this first. 🤗
Which REST implementation is recommended for enterprise scale? using OData or implementation in the video is good enough?
anyway the video is great, thanks bro
Depends on your special need. I can't judge that exactly. Maybe I should implement one service with ODATA first. 😉🤗
@@CustAndCode Thank you for your response😀
@@edonovanto 🤗🤗🤗
@@CustAndCode May i know the reason why you choose to implement service with ODATA first rather than using SICF?
@@edonovanto I meant that I want to create a video of how to use a REST Call with ODATA 🤗