Show TOC

Copying a Service Builder ProjectLocate this document in the navigation structure

How to copy an existing Service Builder project for a similar use case to save time and effort.

Context

To reduce development effort and save time, you can create a new Service Builder project by copying an existing project together with its data model and service implementation. Note that while you can copy the mapping information contained in a project's service implementation, you cannot copy the generated ABAP classes since these have to be generated explicitly for the project created as a copy.

It can be particularly helpful to copy a project if a project has already been created for a similar use case and you can reuse its artifacts with only minimal changes being required.

To copy an existing Service Builder project, proceed as follows:

Procedure

  1. Ensure the project you want to copy is open in the tree view. To open a project, choose Open Project and enter the project's name directly or use the input help available.
  2. In the tree view, right-click the name of the project you want to copy and choose Copy Project. Alternatively, choose Start of the navigation path Project Next navigation step Copy End of the navigation path from the Service Builder menu.
  3. In the Create Project dialog box, overwrite the name of the existing project with the name of the new project you want to create as a copy. Enter the new name in the Project field.
    • If you want to create a new version of an existing project, you can simply append a version number, for example, 0001, to the original project name. In this way, it is apparent, that the new project is based on an earlier version of the project of the same root name. In some cases, it might be helpful to have several versions of the same project indicated by a numeric counter of this kind.
  4. Overwrite the description of the existing project you want to copy with a suitable description for your new project. While it is not mandatory to enter a short description, it is helpful to do so.
  5. In the Copy from Template Project section of the dialog box, ensure the name of the project you want to copy is displayed in the Project field and verify that this is the correct project.
  6. If you want to copy the project together with its data model and service implementation, select the Data Model and/or Service Implementation checkboxes. In this context, copying the service implementation refers to the copying of the mapping information, not the actual runtime artifacts. Note that if you want to copy the service implementation, you must also copy the project's data model. However, you can copy the project's data model without having to copy the service implementation.
  7. Under Attributes, the project type (either Service with SAP Annotations or Service with Vocabulary-Based Annotations) of the project you are creating as a copy is displayed in the Project Type field. The type displayed here depends on the type of project specified when the original project was created. If the original template project was specified as type Service with SAP Annotations then the copied project will inherit this project type.
  8. Under Attributes, specify the generation strategy you want to use. The Standard generation strategy is used as default and it makes sense to use the same generation strategy that was specified for the original project.
  9. Under Object Directory Entry, enter the name of the package in which you want to create the copy of the project and choose Enter. If you do not want the copy of the project to be created in a package to be transported from one system to another in the system landscape, enter $TMP as the package name or choose the Local Object pushbutton.

Results

The Service Builder creates a new project as a copy of the template project you selected. The new (copied) proiect is displayed in the tree view on the left-hand side of the screen. The newly created projects contains the same arfiacts as the tempate project you copied. Consequently, if you selected the Data Model and Service Implementation checkboxes in the Create Project dialog box, these are included in your new project. That is, if you copied the data model from the existing project, the new project contains the same entity types, properties, navigation properties, associations, and entity sets contained in the original data model.

To save the new project in the Service Builder, chooseSave. Your project is saved and you can subsequently return to the Service Builder at any time, open this project, and continue the service development and modeling process. If you do not save your project, your data will be lost when you close the Service Builder. After you have made all the relevant changes to the new project, choose Generate to create the runtime artifacts for this new project. After the runtime artifacts have been generated, you must register the new service in the relevant system using the Service Maintenance function.