To develop a service using
SAP NetWeaver Gateway Service Builder, you first need to
create a project. The Service Builder uses projects to bundle all the artifacts you need to
develop a service in one central place and thereby helps you to organize the service
development and modeling process. You can use projects to organize the transport of objects
from one system environment to another, so that all the artifacts remain together at all
times. Choose from three project types in the Service Builder when you create a new
project:
- Choose Service with SAP Annotations if you want to annotate
your data model artifacts using standard SAP annotations. SAP annotations include
Creatable, Updatable, Label, and
UnitProperty, for example. The available attributes can
differ according to the data model artifact you want to annotate. You can also define
the facets: Nullable, Default, MaxLength, FixedLength, Precision,
Scale, for example. The ABAP type information available includes ABAP
field name and explicit ABAP type assignment.
- Choose Service with Vocabulary-Based Annotations if you want to
annotate data model artifacts using additional terms that are not part of the core
attributes and provide additional descriptive information about the artifact. In this
case, additional terms can be consolidated in a vocabulary and uploaded into the
Vocabulary Repository. The Vocabulary Repository includes a selection of vocabulary
files for ODate vocabulary-based annotations, such as
Org.OData.Atom.V1 and
Org.OData.Capabilities.V1.
- Choose Annotation Model for Referenced Service if you want to
annotate an OData Element of an existing service, without modifying the service, and
provide additional descriptive information about the artifacts. Unlike in project
type Service with Vocabulary-Based Annotations, in this
project type you can import another service as a reference in read-only mode and then
create annotations.
Procedure
To create a Service Builder project, proceed as follows:
- Click Project from the main menu, and select
Create, and then enter a name for the new project. The
project name must be unique and may not contain any spaces or special characters,
however, it may contain underscores. Input help is available so you can check which
project names are already in use. Although you cannot reuse an existing project name,
you can derive a new project name from an existing project name by adding a prefix or
suffix, for example.
- Enter a description for your new project. This is a mandatory entry and you are
unable to create a new project without defining a description. The description is
displayed in the Service Builder together with the project name. The short
description can be used to provide additional context information about the project
or service you define. The short description must not exceed 60 characters.
- Under Attributes select the project type you want to create.
The project type you select when creating a project cannot be changed at a later
time.
- Select Service with SAP Annotations if the OData service
in your project is to use standard SAP annotations.
- Select Service with Vocabulary-Based Annotations if the
OData service in your project is to use vocabulary-based annotations.
- Select Annotation Model for Referenced Service if the
OData service has to be annotated externally without modifying the service. You
can create and upload your own customer-specific vocabularies into the
Vocabulary Repository. The uploading of vocabulary files is an optional
preparatory step for implementation.
- Under Attributes, specify the generation strategy that is to
be used. The standard generation strategy is used as default, but other generation
strategies are feasible. If no customer-specific generation strategies have been
defined in the system, Standard is entered as default to
indicate that the standard generation strategy will be used.
For more information
about generation strategies, see Generating Runtime
Objects.
- Under Object Directory Entry, enter the name of the package
in which you want to create the new project and, implicitly, the service and click
Enter.
Note If you do not want 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. This ensures that the object is created
locally.
Result
The Service Builder creates the new project together with an
empty folder structure. You can see the newly-created project structure in the tree view in
the left-hand screen area. The project structure comprises the following folders and
subfolders:
- Data Model
- Entity Types
- Associations
- Entity Sets
The following subfolders are automatically added to the tree only when you
define new entity entries for them:- Association Sets
- Complex Types
- Function Imports
- Vocabularies: Imports - Lists the vocabulary or
vocabularies imported for your project. Implicit
References - Lists the vocabulary or vocabularies referenced by
the vocabulary file that was explicitly imported.
- Service Implementation
- Runtime Artifacts
- Service Maintenance
Note Service Implementation node will not be created for projects type
Annotation Model for Referenced Service.
To save the
newly-created project in the Service Builder, click
Save. 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 newly-created project, your data will be lost as soon as you close the Service
Builder.