Business Scenario
Prerequisites
Note
Note that some of the services that this learning journey links to can incur costs.
Task 1: Check the Run and Debug Button
Steps
Check the Run and Debug button.
Select the Run and Debug button from the right top corner of the Storyboard tab. Here you find a group of buttons, including the Run and Debug button.
In the preview menu, choose the Run RiskManagement-1 choice, which was created along the project.
In this configuration, by default, all the data sources will be locally mocked with sample data.
A terminal at the bottom will appear, with a dynamic output, which indicates the task execution details.
Later on, the debug console will be focused with the progressive running status, meanwhile, a menu with several buttons including a button to stop the preview will appear in the middle of the upper part of SAP Business Application Studio.
Once the background process finishes, the console will display the target link to preview the app, as shown in the green rectangle.
By moving your mouse cursor above the link, you will see the suggestion to open the link by Ctrl + Click or Cmd + Click, depending on your operating system.
The same page will also be opened automatically, if not blocked by your browser. If the page does not open, check the pop-up blocker of your browser.
Task 2: Perform a First Preview
Steps
Check the buttons of the service entities.
In the newly opened preview page, choose the buttons of the service entities on the right side.
- For example, by choosing the syntax icon in the orange rectangle right to the risks service entity, you can preview the data for risks in the form of a raw data content.
- The result will be populated with the sample data you've created in previous exercises.
- For the A_BusinessPartner entity, it is the same.
Check the tile of Web Application.
In this preview page, choose the tile of Web Application on the left side. (As shown in orange rectangles)
The result will be populated with the sample data you created in previous exercises.
Once complete, you can stop the current round of preview, by choosing the Stop button.
Note that after choosing the Stop Preview button, it is restored into its former Preview menu button status.
Task 3: Check with the Live Data Choice
Steps
Create a Run configuration.
Use the following data:
Field | Value |
---|
Database | local |
Authentication | Dummy |
OData Data Type | Live Data |
SAPUI5 | Default |
In the menu on the left side of SAP Business Application Studio, select Run Configurations
Select the + icon in the upper right part of the Run Configurations menu to create a new configuration.
From the What would you like to run? menu, select the entry matching your project (as shown in the following screenshot).
You can modify the configuration name according to your preference. Here, we plan to conduct the live data previewing, so we can call it Run RiskManagement with Live Data.
A new screen opens where you can define the run configuration.
Add the data as described in the preceding table.
In the oData section, Live Data should be selected as the Data Type. Automatically, a new field to configure the Destination of the BusinessPartnerA2X service will be shown. Verify that its content was pre-filled with the apihub_sandbox choice and the Path for BusinessPartnerA2X service destination is s4hanacloud/sap/opu/odata/sap/API_BUSINESS_PARTNER. Leave all other configurations as default.
Now, a new configuration called Run RiskManagement with Live Data is created, and it will adopt the live data for external service "BusinessPartnerA2X" according to the configuration.
To run it, choose the green triangle right beside the name of your new configuration, which now displays in the Run Configurations menu on the left side.
In the Preview menu, choose Run RiskManagement with Live Data choice.
Check the tile of the Web Application.
Similarly to the previous preview, the procedure starts with a terminal in the bottom, then a debug console, and finally ends up with the preview page.
In this Preview page, choose the tile of the Web Application on the left side to operate in the SAP Fiori Elements App, built previously.
Choose Go to conduct filtering to show the list of items.
Now, entries of Risks will be retrieved depending on our data. Choose create to create a new entry.
A form of this entry displays. We need to enter data in the form as needed.
Choose the icon button right to the supplier_BusinessPartner field.
The live data of A_BusinessPartner will be shown. This is retrieved from the live data source behind the destination, which we have configured before this round of preview. We can select any row of entry.
The real entry from live data will be filled. Choose the Create button at the bottom.
The new entry of Risks was created.
Return to the list view. Now, we can see our newly created entry with the association to another entry from the real data source.