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

Handle Error Archive in an MDK App

Create an MDK app to display errors occurred while uploading local changes and implement some logic on how to handle such errors and then let users to fix it from the app by providing correct values.

Overview

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

You will learn

  • How to access Error Archive entity set to display local upload failure
  • How to handle a logic failure errors
  • How to fix these errors
Jitendra Kansal J Jitendra Kansal June 14, 2026
Created by February 13, 2024
Contributors

Prerequisites

Prerequisites

Play Store QR Code
Android
App Store QR Code
iOS

(If you are connecting to AliCloud accounts, you will need to brand your custom MDK client by allowing custom domains.)

Steps

Intro

You may clone an existing metadata project from the MDK Tutorial GitHub repository and start directly with step 6 in this tutorial.


You have built an MDK app with offline functionality. In offline store, you make a change to a local record and upload this change (from request queue) to backend but backend prevents this change to accept due to some business logic failure. This error is recorded in an Offline OData specific entity set named as ErrorArchive. This entity set has detailed information about the errors. It’s now up to developers how they handle such errors and then let users to fix it from the app by providing the correct values. ErrorArchive is exposed to the application as an OData entity set and is accessible through the OData API in the same way that the application accesses any other entity sets from the offline store. You can find more details about the ErrorArchive Entity Properties in this documentation.

MDK
MDK

In this tutorial, you need to carry out the following tasks in order to understand how to display and handle such errors:

  • Create a new project in SAP Business Application Studio using MDK CRUD Project template
  • Access Error pages displaying records rejected by backend
  • Create a business logic to find the affected entity
  • Navigate to the affected record to handle the error

For this tutorial, you will use Mobile Services sample backend destination. You will modify a SalesOrderHeaders record by changing CurrencyCode field. Offline store saves this record in request queue database and when you sync it with backend, backend prevents updating this record due to business logic failure. This failure record will be listed in Error list page, from here, you can navigate to details page for more information. You will implement a logic to navigate from details page to the affected record.

Step 1 Create a New Project Using SAP Build

This step includes creating a mobile project in SAP Build Lobby.

  1. In the SAP Build Lobby, click Create > Create to start the creation process.

    MDK
    MDK

  2. Click the Application tile and choose Next.

    MDK
    MDK

  3. Select the Mobile category and choose Next.

    MDK
    MDK

  4. Select the Mobile Application to develop your mobile project in SAP Business Application Studio and choose Next.

    MDK
    MDK

  5. Enter the project name mdk_errorarchive (used for this tutorial) , add a description (optional), and click Review.

    MDK
    MDK

    SAP Build recommends the dev space it deems most suitable, and it will automatically create a new one for you if you don’t already have one. If you have other dev spaces of the Mobile Application type, you can select between them. If you want to create a different dev space, go to the Dev Space Manager. See Working in the Dev Space Manager.

  6. Review the inputs under the Summary tab. If everything looks correct, click Create to proceed with creating your project.

    MDK
    MDK

  7. Your project is being created in the Project table of the lobby. The creation of the project may take a few moments. After the project has been created successfully, click the project to open it.

    MDK
    MDK

  8. The project opens in SAP Business Application Studio.

    MDK
    MDK

    When you open the SAP Business Application Studio for the first time, a consent window may appear asking for permission to track your usage. Please review and provide your consent accordingly before proceeding.

    MDK
    MDK

Step 2 Configure the Project Using Storyboard
+
Step 3 Run the Project
+
Step 4 Handle the Affected Records And Modify with Correct Data
+
Step 5 Redeploy the Project
+
Step 6 Update the app
+

Resources

Discussion

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

Submit detailed feedback Discuss in Community
Steps
Step 1 of 6
1. Create a New Project Using SAP Build 2. Configure the Project Using Storyboard 3. Run the Project 4. Handle the Affected Records And Modify with Correct Data 5. Redeploy the Project 6. Update the app

Learn more →