We confirm the mapping on the OData Channel Generation Tool mapping screen, and then enter naming details and generate the classes and interfaces on the generation screen.
The mapping screen lists the entity names and complex types extracted from the OData file in the top left-hand corner:
We do not change the settings for this cookbook, but it is possible to map the entity names to existing Data Dictionary structures and adapt and modify other mappings. For more information, see Using the OData Channel Generation Tool.
To confirm the mapping and continue with the generation, proceed as follows:
Choose the Continue button at the top of the mapping screen or press F8.
The generation screen, Generate OData Channel Implementation is displayed:
Enter $TMP for the Package to use local objects (the default) .
Do not check the Overwrite CDCs box in this example implementation. If you check the box, you could lose your implementation as existing custom coding will be overwritten.
Enter CL_MOD_EPM as the Model Provider Class name and CL_DATA_EPM as the Data Provider Class name.
In the Namespace/Prefix field, enter a namespace or prefix for the ABAP classes and interfaces that are to be generated. Choose a unique prefix to avoid naming conflicts, for example, Z_HS.
Generate the classes and interfaces by pressing the Generate Implementation button at the top of the screen, or press F8.
A popup displays, informing you of the classes that will be overwritten by the generation.
Select the green checkmark to confirm that you are happy to proceed.
A message informs you that the implementation artifacts have been successfully generated.
Open transaction SE80 and navigate to the package in which the artifacts have been generated. The result should look similar to the structure shown below:
The following classes are generated:
For each entity type:
For more information, see OData Channel Quick Guide.
The classes and interfaces are generated. Next, implement the required methods (GET_ENTITY and GET_ENTITYSET).