Show TOC

Redefining the MPC Implementation ClassLocate this document in the navigation structure

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:

  1. Expand the Project folder in the tree view of the Service Builder.

  2. Navigate to Start of the navigation path Generated Objects Next navigation step CL_ProjectName_MPC_EXT End of the navigation path.

  3. Click Display-->Changeto switch to edit mode.

  4. Right click and select Workbench.

    The selected implementation class opens in the Class Builder.

  5. 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. 
More Information
More Information

To proceed with the next step in this cookbook, see Activate the Service in SAP Gateway.