SAP: ABAP, Calling the External API, 2 Ways to Deserialize JSON

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 26

  • @orfiliamoreira2453
    @orfiliamoreira2453 4 года назад +1

    Thanks so much. Your tutorial really helped me. I was trying to consume a WebService from another system and you saved my life.

  • @jayprakashtiwari1433
    @jayprakashtiwari1433 Год назад

    Great detailed video 👍 Can you please help with prerequisites required to implement this ?

    • @nobodyshero7206
      @nobodyshero7206  Год назад

      As a prerequisite, you have to find the another API, because the API used in this video (api.sap.com/api/translation_api/resource) seems to be not available now.
      As another prerequisite about /ui2/cl_data_access, it might be necessary to apply SAP Note 2526405, and your system must have SAP_UI release over 751, as noted in the description of this video.

  • @pthimios777
    @pthimios777 3 года назад +1

    Great tutorial!!!! Many thanks!!!

  • @sardorbekabdupattaev4338
    @sardorbekabdupattaev4338 3 года назад

    Thank you bro, it really was helpful!

  • @narendrad6444
    @narendrad6444 4 года назад

    Hi when I am working with this type of object my response data is zipped string.please tell me how to unzip it .

    • @nobodyshero7206
      @nobodyshero7206  4 года назад +1

      I've never tried to deserialize zipped data, so I don't know how to do it, and I don't know whether it is possible to deserialize zipped data. It would be necessary to unzip before handing over to the class /ui2/cl_json.
      Regarding zip/unzip functions of ABAP, the following site might help you.
      blogs.sap.com/2016/02/19/unzip-read-files-with-abap-class-clabapzip/

  • @manjulam3696
    @manjulam3696 3 года назад

    Need your input, I need to call one Post API where I need to pass Body : {"localeName": "en_US"}. Can you please help me with ABAP code or which method need to be used for this.

    • @nobodyshero7206
      @nobodyshero7206  3 года назад

      The program shown in this video is also sending the post request like ruclips.net/video/RkSx_UHuRow/видео.html
      Check the source code in this video or you can find the source code in the github mentioned in the description of this video.

  • @alanindomenico439
    @alanindomenico439 4 года назад

    hello , thanks for the example , is a way to use this to extract data from an api and put into a internal table

    • @nobodyshero7206
      @nobodyshero7206  4 года назад

      Hello.
      I am importing the data from API into the ABAP internal table in this video. Could you please check the video from 7:21?
      There, I am importing the API data into the internal table named "ls_translated_data" (it should had been named "lt~" though).
      You can also check the contents of that internal table in this video. (from 16:00). I am saying that it is the structure in this video, but it is the internal table. Please also check it.
      Can it be the answer for your question?

    • @alanindomenico439
      @alanindomenico439 4 года назад

      @@nobodyshero7206 Sorry , but the page to get the key not exits anynmore

    • @nobodyshero7206
      @nobodyshero7206  4 года назад

      What do you mean by "Page"? Sorry, but I don't really understand your mention "page to get the key".
      If you are not content with the way to import the API to the internal table I've answered in the previous message, I'm afraid I cannot help you.

  • @vrhere6902
    @vrhere6902 4 года назад

    Its very nice document, But I am getting communication error "lo_rest_client->if_rest_resource~post( lo_request ).

    • @nobodyshero7206
      @nobodyshero7206  4 года назад

      I think it would be the matter of connection setting/environment of your system.
      I recommend you to check the setting of proxy in SICF, and the connectivity of internet from your system by the program SAPHTML_DEMO1.
      For those aims, please refer to ruclips.net/video/aZuAR71UxQw/видео.html from 9 minutes 20 seconds.
      That video also has the chapter and the relevant chapter (found in the description of that video) is
      - How to check Proxy setting in the transaction SICF
      - The usage of program SAPHTML_DEMO1 to check internet connection

  • @rurinurulhuda3145
    @rurinurulhuda3145 3 года назад

    THANK YOU

  • @zipovimg
    @zipovimg 3 года назад

    Hi,
    I was looking in our environment and he have the /IWCOR/SREST instead the SREST package. everything should be the same, right?
    Thanks,

    • @nobodyshero7206
      @nobodyshero7206  3 года назад +1

      I think so, but I cannot guarantee anything about it. Regarding this topic there is the note (KBA) launchpad.support.sap.com/#/notes/2628631.
      You'd better contact SAP for more assurance.

    • @zipovimg
      @zipovimg 3 года назад

      @@nobodyshero7206 finally I could get this task done. Your video was really helpful. With our scenario I had to look for similar classes from your example.
      This is a great video.
      Thanks,

  • @ParvezKhan-dl1tb
    @ParvezKhan-dl1tb 3 года назад

    Great