REST API in SAP - Create POST Method with JSON Payload [english]

Поділитися
Вставка
  • Опубліковано 2 бер 2024
  • In this video, I will show you how to redefine the POST method in a REST API in SAP and use it to consume a JSON payload. Then we convert this JSON back into an ABAP structure and use this data to write an entry in a database table. We will test the whole thing with Postman.
    I extend a video of mine which I link here: 🎬
    • Create REST API in SAP...
    The content of this video is the extension of the redefined method if_rest_resource~post.
    #sap #abap #rest #api #post #method
    ▬▬ 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...

КОМЕНТАРІ • 8

  • @SereneSkyCinema
    @SereneSkyCinema 4 місяці тому +1

    Great tutorial! 🙌👏 Loved how clear and concise your instructions were. This really helped me understand the process better. Keep up the good work! 🌟💯

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

      Thanks! 😀I appreciate it and thank you for watching and commenting! 🤗

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

    Hi many thanks for the video.
    I Have a question: I have to create many actions like create sales order, create invoices ... I guess I will use the method post.
    But here, how I difference between methods. Can I create different method POST in same class or I have to create a other class.

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

      You are welcome! You can create different services and for every service you can create your own handler class and your post method. Have you watched my first video which I have linked at the beginning at this video? 🤗

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

      @@CustAndCode
      Think a lot for your message.
      I have another question: how can I generate swagger for my api rest?
      If I have 2 post (one for create order and one for create invoices) I should have 2 swagger or just one regroupe all endpoint(methods used)?

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

      Unfortunately I don't know that. 🙄

  • @victormartinez-departament7059
    @victormartinez-departament7059 Місяць тому

    how get the token , without do request get to get 1 record?

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

      Set a Header field:
      name = 'X-CSRF-Token'
      value = 'Fetch'
      🤗