Show TOC Start of Content Area

Procedure documentation Defining the Queries  Locate the document in its SAP Library structure

Use

You create queries in the application using the query editor of the Mobile Applications for Laptop plug-in. In the query editor, you define the input and output classes, aliases, and conditions for the query.

According to the logic of the tutorial application, the user selects a particular customer in the first view, and chooses the Show Orders push button. Then the second view that contains the service orders of the selected customer appears. For realizing this particular logic, you have to define queries.

In the application, the query parameter used for comparison is the Customer ID since this is common for both: customer details and service orders. In the application, you must define two classes: composite class and query class. The composite class obtains the value for the Customer ID. The query class compares the value of Customer ID in the two data objects (customer details and service orders), and stores the result of the comparison.

Procedure

...

       1.      In the Laptop UI explorer, expand the development component storage.

       2.      Expand ServiceModels. Click Model Classes with the secondary mouse button and choose Create Query / Composite Model Class.

       3.      Enter QueryComp as the query name, and choose Finish.

       4.      In the Properties tab, choose This graphic is explained in the accompanying text Add.

       5.      In the attributes list, select ServiceModels   CUSTOMERS_CUSTOMERHEADER  CUSTOMERID.

       6.      Choose Next and then choose Finish.

       7.      In the Laptop UI explorer, click Model Classes with the secondary mouse button and choose Create Query / Composite Model Class.

       8.      Enter ServiceQuery as the query name, and choose Finish.

       9.      Choose the Query tab, and enter the following details:

Field name

Value

Input Model Class

QueryComp

Result Model Class

SERVICEORDERS_SOHEADERS

Conditions

SERVICEORDERS_SOHEADERS.CUSTID LIKE:CUSTOMERID

   10.      Choose Save.

End of Content Area