Call External API in SAP ABAP - API Key - REST API [english]

Поділитися
Вставка
  • Опубліковано 5 жов 2024

КОМЕНТАРІ • 73

  • @FrancescoCorasaniti
    @FrancescoCorasaniti Рік тому

    Thanks for the detailed informations shared. Very clear! I've only struggled a bit with the certificate but after some attempts I've successfully called the API!

    • @CustAndCode
      @CustAndCode  Рік тому

      You are very welcome, and thank you for watching and commenting! Glad that it worked with the certificate! 🤗😀

  • @sankeshankar
    @sankeshankar Рік тому

    Very easy to undersand explaination !! Thank you !

    • @CustAndCode
      @CustAndCode  Рік тому

      Thank you for your kind feedback! 🤗😃

  • @CustAndCode
    @CustAndCode  2 роки тому +2

    With pleasure! 😀 RAP and Cloud? maybe at a later time. Currently I try to make short videos that involve a specific task or problem. I am also just BEFORE a S4/HANA conversion 🤔🙄😄

  • @Tutorials4Work
    @Tutorials4Work 2 роки тому +3

    Great Explaination - Thanks for this Tutorial!
    Will you also start making SAP Videos for RAP and Cloud-Ready based programming?

  • @ayhobbyist
    @ayhobbyist 3 місяці тому

    this is clear and clean coding 🤩

    • @CustAndCode
      @CustAndCode  3 місяці тому

      I'm glad you liked it. And thank you for watching! 🤗

    • @ayhobbyist
      @ayhobbyist 3 місяці тому

      @@CustAndCode
      how would you configure SM59 in that case ?

  • @tjk9830
    @tjk9830 2 роки тому +1

    Many thanks, very nice. It is concise and to the point.

    • @CustAndCode
      @CustAndCode  2 роки тому +1

      Thank you! Great to hear that! 😃🤗

  • @amitkshukla6084
    @amitkshukla6084 Рік тому

    Thanks for the clean and minimalistic guide.

    • @CustAndCode
      @CustAndCode  Рік тому

      Thank you for your kind feedback! 😀

  • @jorgeayala8268
    @jorgeayala8268 2 роки тому +4

    Hi, excelent explaination, i'm trying to do the same example in my SAP, I copied exctly as you did. When I ran the Report I get an error "HTTP_COMMUNICATION_FAILURE", do you have any idea, I would really appreciate it if you can help me. Thank you in advance.

    • @CustAndCode
      @CustAndCode  2 роки тому +3

      Sounds like a certificate error.
      Have a look at this video: ua-cam.com/video/SXFXWKlIpdE/v-deo.html

    • @jorgeayala8268
      @jorgeayala8268 2 роки тому

      @@CustAndCode Thank you very much

    • @jorgeayala8268
      @jorgeayala8268 2 роки тому +1

      Thank you. You were right, was the certificate. I put the certificate in SAP (Strust) and the report ran perfectly

    • @CustAndCode
      @CustAndCode  2 роки тому

      @@jorgeayala8268 congrats! 🤗

    • @devinchen3030
      @devinchen3030 2 роки тому

      I had the same error, did you solve the issue?

  • @latinbishop1722
    @latinbishop1722 Місяць тому

    Thanks

    • @CustAndCode
      @CustAndCode  Місяць тому

      You are very welcome! 🤗😃

  • @SatidSeenun
    @SatidSeenun Рік тому

    thank you very much

    • @CustAndCode
      @CustAndCode  Рік тому +1

      You are welcome 🤗 thank you for your feedback! 😀

  • @mariavirginialeon4887
    @mariavirginialeon4887 Рік тому

    Very Good . Thank you!

    • @CustAndCode
      @CustAndCode  Рік тому

      Thanks for your kind feedback! 😃🤗

  • @manu7623
    @manu7623 Рік тому

    Hi, thx for the great video! Do you maybe also know where i can find an example with a POST request with (with body)?

    • @CustAndCode
      @CustAndCode  Рік тому +1

      Sure 🤗
      On Codeline 31 set the method to post like:
      o_client->request->set_method( if_http_request=>co_request_method_post ).
      Set the data (json?) in a string variable like lv_data.
      Then call the "set_form_field" Method like:
      o_client->request->set_form_field( name = 'data' value = lv_data ).
      If you need more form fields set them with the method above. 🤗
      If I have time I make a video about that. 😀

  • @laxer94
    @laxer94 Рік тому

    Hello. Could you please share how to get the response headers? Thank!

    • @CustAndCode
      @CustAndCode  Рік тому +1

      Hi,
      DATA(lv_result1) = o_client->response->get_header_field( name = 'content-type' ).
      🤗

    • @laxer94
      @laxer94 Рік тому

      @@CustAndCode Thank you! :)

  • @pawanrai7142
    @pawanrai7142 5 місяців тому

    Any Idea about Microsoft SharePoint API , Need an Integration of DMS in SAP and Microsoft SharePoint

    • @CustAndCode
      @CustAndCode  4 місяці тому

      Sorry I have no experience with SharePoint the API. But your task sounds challenging. 🤔

    • @pawanrai7142
      @pawanrai7142 4 місяці тому

      Yes , it is very challenging, jst thought if u can guide me. I have the online SharePoint URL , I have passed it as u have done, but the confusion is how do I call the folder and sub folder created inside the URL library? Any idea would help

    • @CustAndCode
      @CustAndCode  4 місяці тому

      I am not sure if sharepoint provide here APIs to do that. 🤔

  • @awesomeshree
    @awesomeshree Рік тому

    Brilliant video ..Thanks a lot

    • @CustAndCode
      @CustAndCode  Рік тому

      Thank you very much for your feedback! 🤗😀

  • @maxxcurrey7547
    @maxxcurrey7547 2 роки тому

    Nice job!

  • @ParvezKhan-dl1tb
    @ParvezKhan-dl1tb Рік тому

    Pls provide some solution for developer ease in POST scenario where request payload is complex deep structures

    • @CustAndCode
      @CustAndCode  Рік тому

      Did you mean how to send send a complex JSON Payload to a API or how to receive a complex JSON from a API? 🤔

    • @ParvezKhan-dl1tb
      @ParvezKhan-dl1tb Рік тому

      @@CustAndCode yes its hectic to create TYPES for request payload based complex structure

    • @CustAndCode
      @CustAndCode  Рік тому

      @@ParvezKhan-dl1tb In one of my former videos I showed how to create a type to consume a JSON from an API. Is that what you were looking for? 🤗
      ua-cam.com/video/Ej-M5yLbzZs/v-deo.html

  • @BharathiR-z2k
    @BharathiR-z2k Рік тому

    pls tell me how to find x-rapid in postman apllication, we are getting short dump like | Exception condition "HTTP_COMMUNICATION_FAILURE" triggered |, please resolve this

    • @CustAndCode
      @CustAndCode  Рік тому

      Postman is just another client. Be sure that post man can reach the endpoint of your service. Could be a certificate problem? 🤔

  • @manasvicollections642
    @manasvicollections642 Рік тому

    I have a requirement:
    Whenever OBD is getting PGI ed then one output type will trigger which is of transmission medium 8- special function then my report should call in which I need to consume external API and send status of PGI via API
    How can I code here??

    • @CustAndCode
      @CustAndCode  Рік тому

      Unfortunately, I do not fully understand the problem. But I also think that I can not help here. 🤔

    • @manasvicollections642
      @manasvicollections642 Рік тому

      @@CustAndCode ok… can you show me one example of consuming api with PUT operation

    • @CustAndCode
      @CustAndCode  Рік тому

      @@manasvicollections642 I have never used a PUT call. I have always gotten along with GET and POST. 🤗

  • @doan_luc207
    @doan_luc207 10 місяців тому

    Do you know how to send data out of the SAP system using REST API(SICF)?

    • @CustAndCode
      @CustAndCode  10 місяців тому +1

      You mean to create an API in SAP and call it from outside to receive data from SAP? 🤔

    • @doan_luc207
      @doan_luc207 10 місяців тому

      @@CustAndCode yes, I've only just received data, I want to learn more about sending data.

    • @CustAndCode
      @CustAndCode  10 місяців тому

      @@doan_luc207 Ahhh ok that is a good topic! I will have a look about this. 🤗

    • @doan_luc207
      @doan_luc207 9 місяців тому

      I hope you will soon release a video on this topic so I can learn@@CustAndCode

    • @CustAndCode
      @CustAndCode  7 місяців тому

      I have release a video now and I will extended the video with more features in the future 🤗

  • @houdaaggoun3795
    @houdaaggoun3795 10 місяців тому

    What about url without key ?

    • @CustAndCode
      @CustAndCode  10 місяців тому

      The key ist just an API key. If you don't have or need one you dont't have to pass one. Just call the API URL with your parameters. 🤗

  • @AjaypalSingh-oc7os
    @AjaypalSingh-oc7os Рік тому

    why am i getting syntax error with same code??

    • @CustAndCode
      @CustAndCode  Рік тому

      I suspect that you are not using the exact same syntax... Maybe there is a Typo in your Code. What is the error message? 🤗

  • @davutkesmuk1093
    @davutkesmuk1093 Рік тому

    Hello, when I try the example found here, I get an SSL certificate error. how can i fix this error

    • @CustAndCode
      @CustAndCode  Рік тому

      Have a look at this video: ua-cam.com/video/SXFXWKlIpdE/v-deo.html
      🤗

    • @davutkesmuk1093
      @davutkesmuk1093 Рік тому

      @@CustAndCode thank you😊

  • @mmb1821
    @mmb1821 Рік тому

    Hallo,
    Kannst du vielleicht posten, wie ein Post Request an einer REST API mit einer CSV-Datei geht.
    Vielen Dank.

    • @CustAndCode
      @CustAndCode  Рік тому

      Diese Anforderung hatte ich selbst noch nie, wäre eine gute Idee für ein Video 😉 Vielleicht hilft dir in der Zwischenzeit dieser Post hier weiter:
      answers.sap.com/questions/7174658/abap-send-file-with-http-post-multipartform-data.html
      🤗

    • @mmb1821
      @mmb1821 Рік тому

      Vielen Dank, ich wäre sehr dankbar, wenn du mich informierst, sobald es verfügbar ist.

    • @mmb1821
      @mmb1821 Рік тому

      @@CustAndCode vielen Dank.
      Ich bin seit einer Woche am Rumwühlen im Netz, bis jetzt keine Gebrauchbare Hilfe gefunden.
      Auf diesen Link war ich schon, aber ist keine richtige Hilfe.
      Deine Videos sind sehr gut und sehr strukturiert. Danke

    • @CustAndCode
      @CustAndCode  Рік тому

      @@mmb1821 vielen Dank für das positive Feedback! 😀🤗. Deine Anforderung ist auch sehr speziell. Ich verwende meist JSON als Payload. Eine Datei ist doch etwas ungewöhnlich. 🤔

    • @CustAndCode
      @CustAndCode  Рік тому

      @@mmb1821 Besser wäre es natürlich du abonnierst meinen Kanal und aktivierst die Benahcrichtigung 😜

  • @vipinnagpal
    @vipinnagpal Рік тому

    pls share code

    • @CustAndCode
      @CustAndCode  Рік тому +1

      I already do! But I do not run a website because I unfortunately do not have the necessary time. The self-writing also helps in understanding the logic and the code. 🤗