The Service Builder allows you to redefine the
OData services created in
SAP Gateway. The
Redefine
SAP Gateway Service function allows the user to do the following:
- Redefine a service - Select this option if you want to redefine
a service for the first time in the Service Builder.
- Extend the existing model - Select this option if you wish to
add more artifacts to your model from an existing model. If your model already has
artifacts from a reference model, you can add more artifacts from this model
only.
- Overwrite existing model - Select this option to overwrite the
existing model in the Service Builder with a new model from a different service.
After selecting one of the redefinition options, the user is provided with options to
select the relevant service to be redefined (only those services that are registered in the
current SAP Business Suite back-end system can be selected). After the service has been
selected, the model is displayed in a tree view allowing the user to select the required
artifacts (entity types, associations, function imports) for the new model. The
Modification Generator enables the user to make certain restricted changes in the services
created using an external framework like SAP Business Information Warehouse (BW), Service
Provider Interface (SPI), and Generic Interaction Layer (GenIL). For example, these
services might not have a proper label or might not need all the artifacts. In these cases,
the Modification Generator enables the user to make cosmetic changes without influencing
the underlying data provider class, and reuses the existing model.
Process
Note Since the Wizard step 2 of
2: Redefine Service is same for all the redefinition scenarios, these
steps (14 to 19) are only mentioned in the "To Overwrite a model, proceed as follows"
section.
To redefine a service for the first time, proceed as follows - Empty
project:
When you select the Redefine option for an empty project, you will be provided with a
redefine wizard that allows you to specify a model of your preference.
- Log onto the SAP Gateway system.
- Open transaction SEGW. The SAP Gateway Service
Builder opens.
- Open an existing project you want to redefine.
- Choose Edit to switch to editing mode.
- Right-click on the Data Model folder and in the resulting
submenu, select . The Wizard step 1 of 2: Redefine Service
wizard opens.
- In the Select Service region, enter the technical name
of the service you wish to redefine in the Technical Service
Name field. Alternatively, you can also use the input help
available for this field.
- On selecting the service from the input help window, the version of the
service is automatically populated.
Note If
you enter the technical service name manually, you must specify the
version.
- If the metatdata of the selected service resides in another system, then
select Metadata to be fetched from an external system. in
the Target System for Metadata.
- On selection of the Metadata to be fetched from an external
system the RFC Destination field becomes
editable to select the RFC destination of the external system. Input help is
also available for this field.
- Click Next to continue.
Note If
the RFC destination is incorrect, an error message is displayed.
- On successful validation of the RFC destination, the Redefine
Service Wizard step 2 opens.
- Select the required artifacts. Refer to the artifacts selection logic
described in the " To Overwrite a model" section.
- Follow steps 14 to 19 in the To Overwrite a model
section below to complete the procedure.
To redefine a service for the first time, proceed as follows -
Project with a model:
When you select redefine option for a project with an existing model created by
methods other than redefine, for example, by importing a data model, importing a data
source or hand craft a model in the Service Builder, you will be provided with the
option to overwrite the existing model. On choosing to overwrite, the existing model
and the generated classes will be overwritten.
- Log onto the SAP Gateway system.
- Open transaction SEGW. The SAP Gateway Service Builder opens.
- Open an existing project you want to redefine.
- Choose Edit to switch to editing mode.
- Right-click on the Data Model folder and in the resulting
submenu, select
Note A
message box is displayed in which you are prompted to confirm whether you
want to overwrite an existing model
- Choose Yes to overwrite the existing model and
No to cancel.
- The Wizard step 1 of 2: Redefine Service wizard
opens.
- Enter the technical name of the service you wish to redefine in the
Technical Service Name. Alternatively, you can also use
the input help available for this field.
- On selecting the service from the input help window, the version of the
service is automatically populated.
Note If
you enter the technical service name manually, you must specify the
version.
- If the metatdata of the selected service resides in another system, select
Metadata to be fetched from an external system. in the
Target System for Metadata.
- On the selection of the Metadata to be fetched from an external
system the RFC Destination field becomes
editable to select the RFC destination of the external system using the input
help.
- Click Next to continue.
Note If
the RFC destination is incorrect, an error message is displayed.
- On successful validation of the RFC destination, the Wizard step 2
of 2: Redefine Service opens.
- Select the required artifacts. Refer to the artifacts selection logic
described in the To Overwrite a model section.
- Follow steps 14 to 19 in the To Overwrite a model
section to complete the procedure.
To Extend the existing model, proceed as follows:
In a scenario where you have already redefined a service using the redefinition
method, and later if you would want to add more artifacts from the same service
without overwriting the model. you can use the
Extend Current
Model option and select the artifacts from the model that was
redefined. In such cases, the Technical Service Name field in the Select Service
region is read-only and displays the specific service from which you can add more
artifacts.
- Log onto the SAP Gateway system.
- Open transaction SEGW. The SAP Gateway Service Builder opens.
- Open an existing project to be redefined.
- Choose Edit to switch to editing mode.
- Right-click on the Data Model folder and in the resulting
submenu, select . The Wizard step 1 of 2: Redefine Service
wizard opens.
- The Extend current model radio button will be selected by
default.
Note You can also choose to overwrite the existing model by selecting
the Overwrite Current Model radio button. For more information of overwrite
scenario, refer the To Overwrite a model section
below.
The Technical Service Name field in the
Select Service region displays the source model's
technical service name and the version. This field is read-only.
- If the metatdata of the selected service resides in another system, select
Metadata to be fetched from an external system. in the
Target System for Metadata.
- On the selection of the Metadata to be fetched from an external
system the RFC Destination field becomes
editable to select the RFC destination of the external system using the input
help.
Note If the RFC destination is incorrect, an error message is
displayed.
- Choose Next to continue.
Note If
the RFC destination is incorrect, an error message is displayed.
- On successful validation of the RFC destination, the Wizard step 2
of 2: Redefine Service opens.
Note The
existing artifacts are read-only.
- Select the required artifacts. Refer to the artifacts selection logic
described in the To Overwrite a model section.
- Follow steps 14 to 19 in the To Overwrite a model
section.
To Overwrite a model, proceed as follows:
If you want to overwrite an existing model you can use the overwrite the existing
model option. On selecting overwrite, the existing model and the generated classes
will be overwritten.
- Log onto the SAP Gateway system.
- Open transaction SEGW. The SAP Gateway Service Builder opens.
- Open an existing project that you want to redefine.
- Choose Edit to switch to editing mode.
- Right-click on the Data Model folder and in the resulting
submenu, select . The Wizard step 1 of 2: Redefine Service
wizard opens.
- Select the Overwrite model radio button to select and add
more artifacts from a different model. This action overwrites the existing
model.
- Enter the technical name of the service you want to redefine in the
Technical Service Name. Alternatively, you can also use
the input help available for this field.
- On selecting the service from the input help window, the version of the
service is automatically populated.
Note
If you enter the technical service name manually, you must specify the
version.
- If the metatdata of the selected service resides in another system, select
Metadata to be fetched from an external system. in the
Target System for Metadata.
- On the selection of the Metadata to be fetched from an external
system the RFC Destination field becomes
editable to select the RFC destination of the external system using the input
help.
- Click Next to continue.
Note If
the RFC destination is incorrect, an error message is displayed.
- On successful validation of the RFC destination, the Wizard step 2
of 2: Redefine Service opens.
- Select the required artifacts. There is a selection logic in the backend,
which automatically includes all the entity types that are end types/return
type of chosen association/function import. The reverse is not selected. For
example, consider the following model:
Example
COMPLEX TYPES
-
complex_type_1
-
complex_type_2
ENTITY TYPES
-
entity_type_1
-
entity_type_2
-
entity_type_3
- Case1: User selects Entity_Type_1, Entity_Type_2
and Association_1. All these entities are selected and used in the new
model. If Entity_Type_1 & Entity_Type_2 uses Complex_Type_1 &
Complex_Type_2, they are automatically selected.
- Case2: User selects Entity_Type_1,
Association_2. Since Entity_Type_3 is part of the Association_2,
Entity_Type_3 it is selected automatically along with Entity_Type_1
and Association_2.
- Choose Finish after you have made the relevant
selections.
- The Service Builder performs the consistency check of the imported model and a
message is displayed. The selected artifacts are then transferred to the
respective folders in the tree view of the Service Builder. Also, an entry with
the name and the version of the service selected for redefinition is created
under the Model Reference folder in the Service
Builder.
- Double-click the referenced model and the mass maintenance view displays
Model Reference Type as Extend to
indicate that this model is redefined.
Note If
the model has been Included, then the model reference type for that model
shows Include instead of Extend.
- You can perform the following redefinitions for the model imported:
- After you have completed the redefinition process, you can generate runtime
objects.
Note Generation of MPC- Case1: Overwrite Base/Extended Service - If you
have redefined an existing service, an additional section Service
Extension will appear in this wizard. Select Overwrite Base/Extended
Service, to overwrite the contents of the referenced service class.
This option allows you to access the redefined (new) service using the
redefining (base) service URL. You can no longer access the redefining
service using the same URL.
- Case2: Create a new service - A new service and
a new model will be created and registered during the generation
process.
See
Generating the Service for more
information.
- After the service has been generated, the MPC classes are stored in the
Runtime Artifacts folder.