Example: Export OWL Data to Excel

Overview

In this example, you create a solution with a custom business object. You generate a screen scenario with object-based navigation and test the work center in the SAP cloud solution. After that, you create data records, which you export to Microsoft Excel.

Procedure

  1. Create a solution and generate the floorplan scenario.

    1. Log on to the studio and create a new solution.

    2. In the Solution Explorer, click the Add New Item button.

      The Add New Item dialog opens.

    3. Select Business Object, enter a name (for example, OWL_EXPORT.bo) and click Add.

      The Business Object Selection dialog opens.

    4. Enter the following code:

      • import AP.Common.GDT;
      • businessobject OWL_EXPORT {
      • [Label("Identifier")] element ID:ID;
      • [Label("Name")] element name:LANGUAGEINDEPENDENT_MEDIUM_Name;
      • [Label("Description")] element description:LANGUAGEINDEPENDENT_MEDIUM_Description;
      • [Label("Start Date")] element start_date:Date;
      • [Label("End Date")] element end_date:Date;
      • [Label("Amount")] element amount:Amount;
      • [Label("Title")] element title:AcademicTitleCode;

      }

      Save and activate the business object.

    5. Right-click your solution and select Create Screens.

      The Create Screens dialog opens.

    6. Select a screen scenario, enter a Short ID, and click OK.

      The screens are generated and the corresponding files are displayed in the Solution Explorer.

  2. Assign the work center and perform a test.

    1. Log on to the SAP cloud solution and select   Application and User Management   Business Users .

    2. Select you user and select   Edit   Access Rights .

    3. In the Work Center and View Assignment view, select the work center you have created and assign it to your user. Click Save and Close.

      This graphic is explained in the accompanying text.

      Work Center Assignment

    4. Log off from the SAP cloud solution. Log on again and navigate to the work center you have assigned to your user.

      The work center is displayed. It contains an Export button.

      This graphic is explained in the accompanying text.

      Export Button

    5. Click New.

    6. Create several instances of your business object. Complete the fields and select Save and then Close to get to the entry screen again.

      This graphic is explained in the accompanying text.

      Entry Screen

    7. On the OWL, click Go to view the data records you have created.

      This graphic is explained in the accompanying text.

      Data Records

    8. Click   Export  To Microsoft Excel .

Result

Microsoft Excel opens. The data records are displayed on a spreadsheet. You can save the data as it is or format it to suit your requirements.

This graphic is explained in the accompanying text.

Download