SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Extend an MDK App with Customer Orders

Display a customer order list and its details.

Overview

🎓 beginner 30 min. Mobile Development Kit ClientBeginnerIosAndroidMobileSAP Business Technology PlatformSAP Mobile ServicesSAP Build CodeSAP BuildSAP Business Application Studio

You will learn

  • โœ”How to enhance customer details with its order information
  • โœ”How to create a new page for displaying the order details
Jitendra Kansal J Jitendra Kansal July 9, 2026
Created by October 11, 2022
Contributors

Prerequisites

Steps

Intro

You may clone an existing metadata project from the MDK Tutorial GitHub repository to start with this tutorial.


To enhance your MDK app with customer order information, you need to carry out the following tasks:

  • Create a new order list page
  • Create a new order details page
  • Create a new navigation action to the new order details page
  • Write a JavaScript logic to calculate total number of orders for a customer
  • Display top 5 orders in customer details page
  • Add a header control to the orders grid of the customer detail page to display a text label
  • Add a footer control to the orders grid of customer detail page to show total order count

MDK
MDK

Step 1 Create a new order list page
โ€”

This page will display customer orders list, you will add an Object Table control that is used to display information (like Sales order ID, order creation date, gross amount and life cycle status name) about an object.

You can find more details about available controls in section page.

  1. In your MDK project, right-click the Pages | MDK: New Page | select Section | Next.

    MDK
    MDK

    You can find more details about section pages.

  2. In the Base Information step, enter the page Name Customers_Orders and click Finish to complete the page creation process.

    MDK
    MDK

  3. Once the page opens in the page editor, click on the white area to select it’s Action Bar, and set the Caption to Customer Orders.

    MDK
    MDK

  4. Next, add an Object Table control to display information like sales order ID, order creation date, gross amount and life cycle status name.

    In the Layout Editor, expand the Controls | Data Bound Container group, drag and drop the Object Table control onto the page area.

    MDK
    MDK

  5. In the Properties pane, provide the below information:

    PropertyValue
    ServiceSelect com_sap_edm_sampleservice_v4.service from the dropdown
    EntitySetSelect SalesOrderHeaders from the dropdown
    QueryOptions$filter=CustomerID eq {CustomerID}&$orderby=CreatedAt desc

    MDK
    MDK

    The query expression will filter the top five order entries for a given customer ID, returning them in descending order when sorted by the order creation date property.

    MDK
    MDK

  6. Now, start binding Object Table properties with SalesOrderHeaders entity set properties.

    In the Appearance section of the Properties pane, provide the below information:

    PropertyValue
    DescriptionRemove the default value and leave it blank
    FootnoteRemove the default value and leave it blank
    PreserveIconStackSpacingfalse
    ProgressIndicatorRemove the default value and leave it blank
    StatusText$(C,{GrossAmount},{CurrencyCode},'',{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:true})
    Subheadbind it to {CustomerID}
    SubstatusTextRemove the default value and leave it blank
    TagsClick the item0 and then click the trash icon to delete the default item
    Title$(D,{CreatedAt},'','',{format:'medium'})

    MDK
    MDK

    $(C,{GrossAmount},{CurrencyCode},'',{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:true}) is an expression of how to format currency value, end result would be like โ‚ฌ200.44. By default it will be formatted to the device’s locale setting. More details on Currency Formatter is available in documentation.

    MDK
    MDK

    $(D,{CreatedAt},'','',{format:'medium'}) is an expression of how to format a date, end result would be like June 20, 2020. By default it will be formatted to the device’s locale setting. More details on Date Formatter is available in the documentation.

    MDK
    MDK

  7. In the Search section of the Properties pane, change both the Search Enabled property and Barcode Scanner property to true.

    MDK
    MDK

  8. In the Behavior section of the Properties pane, select DisclosureIndicator to AccessoryType property.

    MDK
    MDK

  9. In the Avatar Grid section of the Properties pane, remove the default Avatar by selecting the item0 and then clicking the trash icon to delete the default item.

    MDK
    MDK

  10. In the Avatar Stack section of the Properties pane, remove the default Avatar by selecting the item0 and then clicking the trash icon to delete the default item.

    MDK
    MDK

  11. In the EmptySection of the Properties pane, provide No Orders Found for the Caption property.

    MDK
    MDK

Step 2 Create a new order details page
+
Step 3 Navigate from Customer Order Page to Order Details Page
+
Step 4 Display top 5 orders in customer detail page
+
Step 5 Add Header control to orders grid
+
Step 6 Add Footer control to show total order count
+
Step 7 Deploy the Project
+
Step 8 Run the Project
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 8
1. Create a new order list page 2. Create a new order details page 3. Navigate from Customer Order Page to Order Details Page 4. Display top 5 orders in customer detail page 5. Add Header control to orders grid 6. Add Footer control to show total order count 7. Deploy the Project 8. Run the Project

Learn more →