
The Service Builder provides the user with the option of generating the Model Provider Class and Data Provider Classes. For Model Provider Class, when the user initiates the generation process, two names should be specified in the dialog box under Model Provider Class:
Base Class Name
Class Name
|
Fields |
Description |
Naming Sample |
|---|---|---|
|
Class Name - Implementation Class |
This is the Implementation class that inherits the Base class. This class can be modified manually. |
CL_<Project Name>_MPC_EXT Project Name is the actual name of project in the Service Builder. |
|
Base Class Name |
This is the Base class that is generated by the system during the generation process. Note
Do not modify this class manually |
CL_<Project Name>_MPC Project Name is the actual name of project in the Service Builder. |
The MPC names cannot be changed after the generation.
During re-generation of the model in SEGW, the Model and Service Definition dialog box will be displayed again only if the Generated Classes option is unselected in the Data Provider Class region.
After generation, the Service Builder creates two types of Model Provider Classes, the Base Class and an Extension Class.
The generated Base class always inherits its code from /IWBEP/CL_MGW_PUSH_ABS_MODEL which in turn inherits from /IWBEP/CL_MGW_ABS_MODEL. The base class CL__Project Name_MPC that gets generated will have redefinition for DEFINE() and GET_LAST_MODIFIED() methods. See Base Class: Model Provider Class for more information.
The Service Builder creates an extension class CL_<Project Name>_MPC_EXT for the MPC, which is the implementation class. The extension class is inherited from the MPC base class. This class can be used to perform any manual changes required to the MPC, rather than changing the model in the Gateway Service Builder. See Extension Class: Model Provider Class.
This is a sample model definition as seen in the Service Builder for project PROJECT_DEMO. A representation of the generated base and implementation classes after the MPC generation is given in the Generated MPC Classes section below:
PROJECT NAME: PROJECT_DEMO
DATA MODEL
COMPLEX TYPES
complex_type_1
complex_type_2
ENTITY TYPES
entity_type_1
PROPERTIES
key_1
key_2
property_1
property_2
NAVIGATION PROPERTIES
nav_property_1
entity_type_2
PROPERTIES
key_3
property_3
property_4
NAVIGATION PROPERTIES
ASSOCIATIONS
association_1
REFERENTIAL CONSTRAINTS
referential_constraint_1
ENTITY SETS
entity_set_1
entity_set_2
ASSOCIATION SETS
association_set_1
FUNCTION IMPORTS
function_import_1
Generated MPC Classes
For given sample model definition above, on generation of runtime artifacts (MPC Classes), the base class and the implementation class will look as below:
Additional Information
If the generated Model Provider Class has a syntax error try to rectify the error from the Service Builder. The error information can be obtained when the MPC class is opened in SE24. Once the error is rectified delete the generated Model Provider Class before regeneration.
Execute the steps provided in this section in-addition to the steps executed above.