Show TOC Start of Content Area

Procedure documentation Defining Business Objects Operations  Locate the document in its SAP Library structure

Use

You use the CRUD (Create, Read, Update, and Delete) and query operations to set queries on the attributes of the business objects. The CRUD methods cannot be modified. You can define query methods according to the data you want to query.

Prerequisites

You have created the application carpool and the following business objects:

·        Employee

·        Travel

·        TravelLocation

Procedure

 

       1.      Go to the Operations tab page of the business object Employee.

       2.      From the Existing Operations view, choose Add…

The New Operation wizard appears.

This graphic is explained in the accompanying text

       3.      Configure the following operations parameters:

                            a.      In the Operation name field, enter findByLastName.

                            b.      In the Description field, enter Find by last name.

                            c.      From the attributes list, select lastName.

                            d.      Choose Finish.

The operation appears in the Existing Operations list.

This graphic is explained in the accompanying text

       4.      Repeat steps 2-4 to create query methods for the business objects listed in the tables below.

Business Object

Method Name

Description

Parameters Used

TravelLocation

findbyID

Find by id

id

Travel

findByStartDateStartLocationAndTargetLocation

Find by start date, start and target locations ids

startDate, startLocation id, targetLocation id

       5.      On the Permissions tab page, for the Travel business object you have created, make sure that the Permissions checks enabled and Permissions on instance level  indicators are deselected.

       6.      Save your application.

Result

You have created query operations for your business objects.

Step 4:

Generating Code and Building Services

End of Content Area