Configuring the Header Area of the Object Page

Objective

After completing this lesson, you will be able to add elements to the object page header, such as a title, an image, or a section

Set Up the Subobject Page Header

In this exercise, you will fill the subobject page, that you created in the previous exercise, with the data relevant to the booking. For now, only the technical ID is displayed on the page since the subobject page is not configured. You will add the following to the page:

  • Booking ID as the page title.
  • Airline logo as an image.
  • Data point sections displaying the name of the airline, departure time, departure airport, arrival time, and destination airport.

Prerequisites

You have completed the exercise Configure Navigation to the Subobject Page in the unit Getting an Overview of the Navigation Concept in SAP Fiori Elements Apps (lesson: Configuring Internal Navigation).

Watch the Simulation and Perform the Steps

This exercise contains a simulation that takes you through detailed steps. You can find all the steps after the simulation. You can follow the simulation and perform the steps using your own trial account.

Steps

  1. Open SAP Business Application Studio.

  2. Right-click on the travels project of your EXPLORER.

  3. Choose the Show Page Map option from the subsequent menu.

  4. Set the booking ID and the airline logo as the page title.

    1. Select the edit icon for the Travel_BookingObjectPage of the Page Editor.

    2. Select the Header option for the object page. The right-hand side pane opens where you can manage different settings for the header.

    3. Enter Booking as the Type Name. This is the name of the subobject page.

    4. Select the global icon from the Type Name field.

    5. Select Apply from the subsequent popup.

    6. Select the dropdown from the Title field.

    7. Choose BookingID from the list.

    8. Select the dropdown from the Image field from the right-hand side pane.

    9. Choose _Carrier/AirlinePicURL from the list.

    10. Switch to the app preview in your browser. You can see that the airline logo and the booking ID have been added to the header of the subobject page.

  5. Add data point sections displaying the name of the airline, departure time, departure airport, arrival time, and destination airport to the header.

    1. Select the add option from the Header Sections of Travel_BookingObjectPage in Page Editor.

    2. Choose Add Data Point Section from the list.

    3. Select the dropdown icon for the Value Source Property field within the Add Data Point Section dialog box.

    4. Choose the following properties from the _Connection list:

      • AirlineID_Text
      • DepartureTime
      • DepartureAirport
      • ArrivalTime
      • DestinationAirport
    5. Select Add from the Add Data Point Section dialog box. You can see that all the selected properties are listed within the Header Sections.

    6. Select AirlineID_Text from the list.

    7. Enter Airline as the label within the Label field on the right-hand pane.

    8. Select the global icon from the Label field.

    9. Select Apply from the subsequent popup.

    10. Select Departure Time from the Header Sections list.

    11. Enter Departure Time as the label within the Label field on the right-hand pane.

    12. Select the global icon from the Label field.

    13. Select Apply from the subsequent popup.

    14. Select Departure Airport from the Header Sections list.

    15. Enter Departure Airport as the label within the Label field on the right-hand pane.

    16. Select the global icon from the Label field.

    17. Select Apply from the subsequent popup.

    18. Select Arrival Time from the Header Sections list.

    19. Enter Arrival Time as the label within the Label field on the right-hand pane.

    20. Select the global icon from the Label field.

    21. Select Apply from the subsequent popup.

    22. Select Destination Airport from the Header Sections list.

    23. Enter Destination Airport as the label within the Label field on the right-hand pane.

    24. Select the global icon from the Label field.

    25. Select Apply from the subsequent popup.

    26. You have now created the header sections and have maintained their labels.

  6. Select the Edit in source code icon for the Header row of Travel_BookingObjectPage.

  7. You can see that the Page Editor has added UI.HeaderInfo annotation for the header.

  8. Select the Header Sections row from the Page Editor.

  9. Select the Edit in source code icon for the Header Sections.

  10. You can see that the Page Editor has added UI.HeaderFacets records for the five data point sections. Each of them references a corresponding UI.DataPoint annotation.

  11. Scroll down to see the corresponding UI.DataPoint annotations.

  12. Switch to the app preview in your browser. You can see that the five data point sections have been added to the subobject page header.

  13. Select the right chevron to expand the object page.

  14. Select the left chevron to expand the subobject page.

  15. Select the full screen icon from the subobject page to expand it. You have observed the responsive behavior of the subobject page. As the list report is not visible now, the title of the subobject page gets displayed.

Result

You successfully configured the subobject page header using the Page Editor. You can also configure the subobject page using the guided development guides Configure object page header and Add a header facet to an object page using data points.

Note

You can find the solution for this exercise on GitHub.

Log in to track your progress & complete quizzes