Use
This section guides you to
generate the Model Provider Classes in the Service Builder.
Process
On successful generation, the
generated objects are stored under the
Generated Objects folder in
the tree view. Also the message displaying the results of the generation are displayed in
the mass edit view.
Figure 1:
Generated Objects and Messages
On successful generation, the Service Builder generates two classes:
-
Implementation Class
-
Base Class
Note It is strongly recommended
that the base class should not be edited. Rather, the Implementation class is inherited
from the base class and you can manually edit this class as required. The
method get_last_modified() has to be changed
to return the last modified timestamp of this class or its super class (whichever has
been changed recently). A sample code is provided here for you reference to achieve
this. This change is required only when the class in redefined manually.
To
redefine the Implementation class proceed as follows:
- Expand the Project folder in the tree view of the Service Builder.
- Navigate to .
- Click the icon, Edit, to switch to edit mode.
- Right click and select Go to ABAP Workbench. The selected
implementation class opens in the Class Builder.
- Click the Define Method and choose the redefine button to
redefine it: Here is a sample
code:
super->define( ).
<<Code for modifying the model - can use code patterns available>>
Endmethod.