Show TOC

Modeling Business Object OperationsLocate this document in the navigation structure

Use

When you create business objects, you can modify their operations.

The operations createMultiple, updateMultiple, and deleteMultiple are called multiple (bulk) operations. They perform the same function as their single counterparts (create, update, delete) but on a collection of instances of the business object node. We recommend that you use these operations whenever you need to create, update, or delete more than one instance at a time because of their improved performance (as compared to calling the single operations many times).

Note that there is no readMultiple operation. You have to use query operations for that purpose.

If your business object does not have multiple operations, that means it has been created with an old version of SAP NetWeaver. You may add the multiple operations by using the context menu Add multiple operations on the business object node in the Project Explorer view.

Procedure
  1. In the Composite Application Explorer, use the secondary mouse button to choose the service to which you want to add an operation, and from the context menu choose Edit.
  2. To see a list of the existing operations, open the Operations tab page.
    Note

    For new business objects, the operation list contains the default CRUD operations. You cannot modify the default operations.

  3. To add a new operation:
    Note

    You can create only query operations. Query operations return a collection of instances of the business object based on some query filters over the attribute values of the business object structure.

    1. Choose Add.
    2. Define query filters for the operation:
      Field or Property Description

      Name

      Name of the operation

      Description

      Description of the operation

      Parameters

      Navigate to and select the attributes for the input parameters of the operation. You can enable the following checkboxes:

      • Select to include the attribute in the query filters of the operation
      • Multiple to allow multiple filter values of the attribute
        • To edit your operation properties, change the relevant values on the Properties tab page.

          You can also edit some of the properties using the list of existing operations.

        • To map a non-implemented operation to an external one, use the Datasource tab page.
        • To write a custom implementation code, use the Implementation tab page. If you rename the application service or the business object node, upon generation the name in the custom code generated in the implementation bean will be changed as well and the custom code will be preserved.
        • To remove an operation, select it and choose Delete.

To modify the business objects operation, you can change the Select and Multiple checkboxes in the operation input described in the previous step.

Result

You can do the following with the service operations you have modeled: