Generating the Service
Use
This section guides you to generate the Model Provider Classes, Data Provider Class and Annotation Provider Classes in the Service Builder:Procedure
You can generate the service after importing the properly defined data model into the Service Builder project you have created. In addition, you should regenerate the service whenever you modify the properties of the data model. To generate Model Provider Class and Data Provider Class proceed as follows:- Open the SAP Gateway Service Builder using the transaction SEGW. There are two scenarios you could encounter:
- You have to create a new project. In this case, first create a project. For more information, see Creating a Project and Importing Data Model and then follow the steps provided in this section to generate the MPC, DPC and APC classes.
- A project might already exits.In this case proceed as follows:
- Click the icon
(Display-->Change) to switch to edit mode. - Right click the project folder and click Generate Runtime. Alternatively, you can also select the project and click the icon
(Generate Runtime Objects) in the tool bar.
On following any of the above steps, the Model and Service Definition dialog box displays for the projects of type Service with SAP Annotations and Service with Vocabulary-Based Annotations. For project of type Annotation Model for Referenced Service dialogue box Annotation Model Definition appears - To change the proposed names for MPC and DPC, do the following:
Fields
Proposed Naming Convention
Class Name - Implementation Class
CL_<Project Name>_MPC_EXT
Project Name is the actual name of project in the Service Builder.
Base Class Name
CL_<Project Name>_MPC
Project Name is the actual name of project in the Service Builder.
Class Name - Implementation Class
CL_<PROJECT NAME>_DPC_EXT
Base Class Name
CL_<PROJECT NAME>_DPC_EXT
Technical Model Name
<PROJECT NAME>_MDL. For example, SALESORDER_MDL
Technical Service Name
<PROJECT NAME>_SRV. For example, SALESORDER_SRV
- If the project is of type Annotation Model for Referenced Service:
- Class Name — Implementation Class: CL_<Project Name>_APC_EXT. Project Name is the actual name of project in the Service Builder.
- Base Class Name: CL_<Project Name>_APC. Project Name is the actual name of project in the Service Builder.
- Technical Model Name: ZTESTAPC_ANNO_MDL
- If you have redefined an existing service, an additional section Service Extension will be available in this wizard. In this section, select Overwrite Extended Service to overwrite the contents of the referenced service class. By doing this, the BEP registry stores the values of Technical Service Name and Service Version while generating the runtime objects.
- Click the icon, Continue,
(Continue) to start the generation. The Transport Request dialog opens. Click Local or assign the objects to the appropriate package.