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

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Ravi Shankar

    Hi Matthew,

    Great work, one thing if we have dispatched placed on the gateway then it is giving error “No article to display” any idea. I tried in the embedded it worked.

    (0) 
    1. Mathew Davis Post author

      Hi Ravi

      Yo have to check that, the link that you provide in the app( fiori admin) should have the same domain that of your fiori launchpad.

      Thanks

      (0) 

Leave a Reply