Skip to Content

IOT FREE STYLE APPLICATION

Dear helpers, I wanted to ask i'm facing a problem when trying to build iot freestyle application when going to the data source part i hope anyone can help me with this part

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Posted on May 07, 2019 at 10:21 AM

    Hello Ahmad,

    Could you be more specific with the issue you are facing?

    Are you getting error in the Web IDE console after launching the build?

    Federico

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 13, 2019 at 07:51 AM

    Hello,

    I think that I am getting stuck at the same point as you. Then instead of ceating a new topic I will try to give more details about my problem, hopefully it will help you also.
    When creating a project it is asking to link a "Data Source" (a service)

    As indicated in many source, we have to go to the "Cockpit" -> "Connectivity" -> "Destinations"

    If I have understood, it is creating a service that we will be able to use for the app.

    My cockpit looks this way

    But I am not figuring out which url I have to input to the iot service.

    My problem:

    The iot service is an API. So it is already a service that I can consume via Ajax or whatever in my Fiori front-end.

    Do I have to link a service and how?

    Thank you for your attention.


    desktop-iot.png (97.3 kB)
    desktop-iot.png (49.0 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 15, 2019 at 08:40 AM

    Hello Lionel,

    If you need to develop a Freestyle IoT Applications and need to have destinations configured for it, you can do it directly from Web IDE by selecting Tools -> Update IoT Destinations

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2019 at 02:11 PM

    At the end, I have created a SAPUI5 application, I have declare my destination for the iot service as above. When I test the connection it return 302. Which is not a problem.

    After in the Sap Web IDE I add a few line related to the destination in the "neo-app.json"

    {
            "path": "/myPath", 
    	"target": {
    		"type": "destination",
    		"name": " **Name of the destination** ",
    		"entryPath" : "/"
    	},
    	"description": ""
    },
    

    Then in your controller

    var url = "/myPath/the-complete-path-for-your-request";
    var oModel = new sap.ui.model.json.JSONModel()
    oModel.loadData(url, null, false, "GET", true, false, null);
    

    There are different type of model. Read the doc and pick the one you need

    LoadData() Documentation

    Now eveything work. Following this model I was able to declare other destination and using it.
    Hopefully it will help someone.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.