Adding Sample Data

Objective

After completing this lesson, you will be able to add sample data

Add Sample Data

Business Scenario

Your company is planning to develop a set of cloud-based applications based on the SAP Cloud Application Programming Model (CAP). These applications will be deployed to SAP Business Technology Platform (BTP) as extension applications for the SAP Core Back-end Systems.

In this exercise, you will perform the following task: Add sample data to entities.

Once the structure of your application is finished, you can add sample data to the application. You can either use the visual data editor, or insert data using a CSV file.

Note

Note that some of the services that this learning journey links to can incur costs.

If you are concerned about charges, you can opt to skip the corresponding exercises.

Task 1: Add Sample Data in Different Ways

Steps

  1. Add a new data entity and create data for the entity A_BusinessPartner.

    1. In the Storyboard, select Open Editor and choose Sample Data from the drop-down menu.

      System screenshot
    2. In the Search field, enter Business

      System screenshot
    3. From the list of entities, select A_BusinessPartner.

    4. Set Mock Data to off. In the Number of rows field, enter 3. Choose Add.

    5. In row 1, add the following data:

      FieldValue
      BusinessPartner3270
      Customer202
      Supplier1018
      BusinessPartnerCategory7
      BusinessPartnerFullNameNue Tech inc

      Note

      The data is stored automatically.
    6. In row 2, add the following data:

      FieldValue
      BusinessPartner2803
      Customer245
      Supplier1403
      BusinessPartnerCategory6
      BusinessPartnerFullNameExpo Technologies Plc
    7. In row 3, add the following data:

      FieldValue
      BusinessPartner3510
      Customer1710
      Supplier374
      BusinessPartnerCategory7
      BusinessPartnerFullNameInlandskunde DE80
  2. For the entities Mitigations and Risks it is possible to import predefined sample data.

    1. Create a CSV file.

    2. Paste in the following data for Mitigations:

      Code Snippet
      123456
      ID;createdAt;createdBy;description;owner;timeline 20466921-7d57-4e76-b14c-e53fd97dcb11;2021-04-27;max.mustermann@muster.com;SLA violation: authorize account manager to offer service credits for recent delivery issues;suitable BuPa;Q4 2022 20466921-7d57-4e76-b14c-e53fd97dcb12;2021-04-27;max.mustermann@muster.com;SLA violation: review third party contractors to ease service delivery challenges;suitable BuPa;Q4 2022 20466921-7d57-4e76-b14c-e53fd97dcb13;2021-04-27;max.mustermann@muster.com;Embargo violation: investigate source of shipment request revoke authorization;SFSF Employee with link possible?;29.03.2023 20466921-7d57-4e76-b14c-e53fd97dcb14;2021-04-27;max.mustermann@muster.com;Embargo violation: review shipment proceedure and stop delivery until further notice;SFSF Employee with link possible?;01.03.2023
    3. Save the CSV file.

      The name of the CSV file must contain the name of the project you created in the exercise Create a New Project , and the name of the entity you created for mitigations in the exercise Create and Configure a Data Model. (If you use the naming proposed in this learning journey, you have to rename the CSV file to RiskManagement-Mitigations.csv.

    4. Go back to the Storyboard tab of the application.

    5. Find the Data Models tile.

    6. Select the entry Mitigations. Choose Add Sample Data.

      System screenshot
    7. Choose the Import button.

    8. Select your CSV file.

      Note

      The sample data will automatically be saved for the selected entity.

    9. Create a new CSV file.

    10. Paste the following data for Risks into the CSV file:

      Code Snippet
      12345
      ID;miti_id;title;prio;descr;impact;criticality;supplier_businesspartner 20466922-7d57-4e76-b14c-e53fd97dcb11;20466921-7d57-4e76-b14c-e53fd97dcb11;CFR non-compliance;1;Recent restructuring might violate CFR code 71;10000;2;3270 20466922-7d57-4e76-b14c-e53fd97dcb12;20466921-7d57-4e76-b14c-e53fd97dcb12;SLA violation with possible termination cause;2;Repeated SLA violation on service delivery for two successive quarters;90000;3;2803 20466922-7d57-4e76-b14c-e53fd97dcb13;20466921-7d57-4e76-b14c-e53fd97dcb13;Shipment violating export control;1;Violation of export and trade control with unauthorized downloads;200000;2;3510
    11. Save the CSV file as RiskManagement-Risks.csv.

      The name of the CSV file must contain the name of the project you created in the exercise Create a New Project , and the name of the entity you created for mitigations in the exercise Create and Configure a Data Model. (If you use the naming proposed in this learning journey, you have to rename the CSV file to RiskManagement-Risks.csv.

    12. Repeat the steps 3 to 7 (c to g) with Risks.

Log in to track your progress & complete quizzes