Skip to Content

In the last post I’ve shown you how you can create a new Fiori Starter Application based on the Sales Order Tracking service provided by the SAP Gateway system. And how you can enhance the detail view by using the Layout Editor.

In this part I will show you how you can run the app with mock data and how you can deploy the application to SAP HANA Cloud.

Run the application with mock data

You may close open tabs and select in the webapp folder the file test.html of the application and click Run.

03.PNG

At the Testing Overview Page choose the second URL test/testFLPService.html

26.PNG

Check that data has been generated (sometimes it needs a little bit time!)

13.PNG

To have more meaningful data we can create a JSON file with predefined data. Go back to your project view and expand the folder model.

/wp-content/uploads/2015/02/41_649636.png

Select the file metadata.xml the was generated while defining the OData Service connection previously. Righ-click the file and select Edit Mock Data

/wp-content/uploads/2015/02/42_649637.png

The popup window Edit Mock Data is displayed. Select the entity set SalesOrders as this is the data we are displaying in our app.

/wp-content/uploads/2015/02/43_649638.png

You could enter your data row by row. To simplify this task we will let SAP Web IDE generate random data for us. Click on Generate Random Data

/wp-content/uploads/2015/02/44_649639.png

You can overwrite some data fields. Just click in the text field and write your data. In our example, we have replaced the SALESORDERNUMBER in the first two by 12345 and 56789 respectively.

/wp-content/uploads/2015/02/45_649640.png

When you are finished replacing the data, press OK.

/wp-content/uploads/2015/02/46_649641.png

Check that the file SalesOrder.json has been generated in the model folder and check the file content.

/wp-content/uploads/2015/02/47_649653.png

Now we need to tell the system that it should use the JSON file when running the app with mock data. The configuration is done in the project settings.
Right-click the project main folder and select Project Settings

/wp-content/uploads/2015/02/20_674443.png

Select Mock Data. In the Mock Data Source section select JSON files. Then click Save

/wp-content/uploads/2015/02/21_674459.png

Acknowledge the information that the project settings have been saved by pressing OK

/wp-content/uploads/2015/02/50_649663.png

You may close the project settings pane by pressing Close. You may also close the SalesOrder.json file

/wp-content/uploads/2015/02/22_674460.png

Select the index.html file and run the application again (Run > Run with Mock Data)

/wp-content/uploads/2015/02/52_649666.png

Check that the data from the json file is displayed

/wp-content/uploads/2015/02/53_649691.png

Deploy the application to the cloud

Right-click your main project name and select Deploy and then Deploy to SAP HANA Cloud

/wp-content/uploads/2015/02/54_649692.png

Provide your password (that is your SCN password) and click on Login.

(If you don’t know your SCN password, here you can reset it.)

/wp-content/uploads/2015/02/23_674461.png

Look if the Version field has an value and the Activate is checked. Then press Deploy.

11.PNG

Upon success, press Close

12.PNG

Logon to your SAP HANA Cloud Platform Cockpit account and select the content HTML5 Applications.
Check that your new application is listed. Click on your application name.

13.PNG

Notice that your application is deployed AND activated/started.

Click on the Application URL to run the Application at the browser.

14.PNG

Provide your credentials of the OData Service.

67.PNG

You should see your app running. DONE!

68.PNG

More Web IDE stuff published by Technology RIG 🙂

See you

Claudi

To report this post you need to login first.

1 Comment

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

  1. Daniel Gongora

    Hi,

    I’m trying to check my app deployed but I’m getting the error HTTP Status 404.

    It’s kinda weird because I didn’t miss any step.

    Regards.

    Daniel Gongora.

    (0) 

Leave a Reply