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 manipulate instances 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.

       3.      The New Operation wizard appears.

This graphic is explained in the accompanying text

       4.      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

       5.      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

 

      The ids of the following parameters:

¡        startLocation

¡        targetLocation

       6.      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 disabled. This makes testing easier - you do not have to give permissions for the business object nodes services. Business object nodes services with disabled permissions checks are not recommended for real applications.

       7.      Save your application.

Result

You have created query operations for your business objects.

Step 4:

Creating an Application Service

End of Content Area