Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
mathewzdavis
Active Participant
  1. Goto tcode SE24 and create a new class and a provide an  interface IF_HTTP_EXTENSION.
  2. Copy and paste the following code in the method IF_HTTP_EXTENSION~HANDLE_REQUEST (without error handling).

data lv_url type string value 'http://timesofindia.indiatimes.com/rssfeeds/-2128936835.cms'.
data lo_http type ref to if_http_client.
    call method cl_http_client=>create_by_url
      exporting
        url                = lv_url
      importing
        client             = lo_http
      exceptions
        argument_not_found = 1
        plugin_not_active  = 2
        internal_error     = 3
        others             = 4.
    if sy-subrc = 0.
      call method lo_http->send
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          http_invalid_timeout       = 4
          others                     = 5.
      if sy-subrc <> 0.
* Implement suitable error handling here
      endif.
      call method lo_http->receive
        exceptions
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          others                     = 4.
      if sy-subrc = 0.
* set response status
        server->response->set_status(
        code = 200
        reason = 'OK').
* set content type
        server->response->set_content_type(
        content_type = 'application/xml; charset=utf-8').
* set response data
        server->response->set_data(
        lo_http->response->get_data( ) ).
      endif.
    endif.

   3. Change the url if you have any other.

   4. Check and activate the class.

   5. Goto tcode SICF, create a node for eg. news.

  6. Open the node and give the class in the handler tab.

    7. Activate the node.

    8. Check the URL in the browser http://:<host>:<port>/news.

   9. Goto Fiori admin and select catalog /UI2/SAPNewsTile

  10. Provide the URL in the tile.

  11. Create a group and assign this app .

  12. Now run the Fiori Launchpad.

For more fiori related topics visit http://sap.mathewsdavis.com

9 Comments
Labels in this area