
|
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 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 name of project in the Service Builder. |
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
For given sample model definition above, on generation of runtime artifacts (MPC Classes), the base class and the implementation class will look as below:
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.
lo_reference = vocab_anno_model->create_vocabulary_reference(
iv_vocab_id = 'ZCAPABILITIES'
iv_vocab_version = '0001').
lo_reference->create_include( iv_namespace = 'Org.OData.Capabilities.V1'
iv_alias = 'UI' ).lo_ann_target = vocab_anno_model->create_annotations_target( 'EPMDemo.PurchaseOrderItem' ). lo_annotation = lo_ann_target->create_annotation( iv_term = 'Core.Updateble' ). lo_simp_value = lo_annotation->create_simple_value( ). lo_simp_value->set_boolean( abap_true ).
lo_ann_target = vocab_anno_model->create_annotations_target( 'EPMDemo.PurchaseOrder/GrossAmount' ).
lo_annotation = lo_ann_target->create_annotation( iv_term = 'Core.AcceptableMediaTypes'
iv_qualifier = 'iPad' ).
lo_collection = lo_annotation->create_collection( ).
lo_simp_value = lo_collection->create_simple_value( ).
lo_simp_value->set_string( 'image/jpeg' ).
lo_simp_value = lo_collection->create_simple_value( ).
lo_simp_value->set_string( 'image/gif' ).lo_annotation = lo_ann_target->create_annotation( iv_term = 'UI.HeaderInfo'
iv_qualifier = 'iPad' ).
lo_record = lo_annotation->create_record( iv_record_type = 'Some_Type' ).
lo_property = lo_record->create_property( 'ValueID' ).
lo_collection = lo_property->create_collection( ).
lo_simp_value = lo_collection->create_simple_value( ).
lo_simp_value->set_string( 'Inside a collection in a record' ).End of the code.