Skip to content

Commit

Permalink
feat: 📝 updated documentation to fit vitepress
Browse files Browse the repository at this point in the history
  • Loading branch information
miggi92 authored Apr 24, 2024
1 parent 3dca5b8 commit 9d4c481
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 183 deletions.
49 changes: 0 additions & 49 deletions docs/api-examples.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,37 @@ tags:
date created: Wednesday, August 23rd 2023, 6:18:18 pm
date modified: Tuesday, September 5th 2023, 11:12:48 pm
---
# Creating a Service
# {{ $frontmatter.title }}

## Steps

1. [[#Create a SEGW Project]]
2. [[#Generate classes]]
3. [[#Implement the framework MPC method]]
4. [[#Implementing the framework DPC methods]]
  -  [[#Boilerplate coding for the OData methods]]
5. [[#Customize your service]]
1. [Create a SEGW Project](#create-a-segw-project)
2. [Generate classes](#generate-classes)
3. [Implement the framework MPC method](#implement-the-framework-mpc-method)
4. [Implementing the framework DPC methods](#implementing-the-framework-dpc-methods)
-  [Boilerplate coding for the OData methods](#boilerplate-coding-for-the-odata-methods)
5. [Customize your service](#customize-your-service)

## Create a SEGW Project

First of all we need to create a [[SEGW]] project.
Transaction code: [[SEGW]]
First of all we need to create a [SEGW](./definitions/SEGW) project.
Transaction code: [SEGW](./definitions/SEGW)

![segw_create_project](segw_create_project.png)
![segw_create_project](./attachments/segw_create_project.png)

![](segw_name_project.png)
![](./attachments/segw_name_project.png)

## Generate Classes

To start with our development we first need the [[SEGW]] transaction to generate the [[DPC]] and [[MPC]] classes.
To start with our development we first need the [SEGW](./definitions/SEGW) transaction to generate the [DPC](./definitions/DPC) and [MPC](./definitions/MPC) classes.

![[segw_generate_classes.png]]
![Generate segw class](./attachments/segw_generate_classes.png)

You might want to change now the class names to match the system naming conventions.

![[segw_model_service_def.png]]
![model service definition](./attachments/segw_model_service_def.png)

After this we're done using the [[SEGW]] for developing reasons.
After this we're done using the [SEGW](./definitions/SEGW) for developing reasons.

## Implement the Framework MPC Method

Expand All @@ -49,7 +49,7 @@ PUBLIC SECTION.
METHODS define REDEFINITION.
```

Next we add the OData framework by calling the "define_mpc" method of the framework class ([[ZCL_ODATA_FW_CONTROLLER]]). Notice, that 'Z_MY_PROJECT' is the namespace, that we need to use in the framework view cluster.
Next we add the OData framework by calling the "define_mpc" method of the framework class ([ZCL_ODATA_FW_CONTROLLER](../dev-objects/classes/ZCL_ODATA_FW_CONTROLLER)). Notice, that 'Z_MY_PROJECT' is the namespace, that we need to use in the framework view cluster.

```abap
METHOD define.
Expand Down Expand Up @@ -91,9 +91,9 @@ DATA: mt_data_providers TYPE REF TO zcl_odata_data_provider.

### Boilerplate Coding for the OData Methods

For the boilerplate code, that has to be inserted into the OData methods you can copy the lines in the [[DPC boilerplate code]] file.
For the boilerplate code, that has to be inserted into the OData methods you can copy the lines in the [DPC boilerplate code](./DPC-boilerplate-code) file.

## Customize Your Service

Implement your odata service customizing. By calling the **ZODATA_CUST** transaction.
For a detailed documentation you can look into the [[OData Customizing]] file.
For a detailed documentation you can look into the [OData Customizing](./OData-Customizing) file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ date modified: Tuesday, September 5th 2023, 5:37:56 pm

## Boilerplate Coding for Implementing

Look into [[DPC boilerplate code#create_deep_entity]].
Look into [create deep entity](./DPC-boilerplate-code#create_deep_entity) documentation.

## Defining Deep Entity Structure

Expand All @@ -29,5 +29,5 @@ TYPES:

Just insert the structure name into the "Deep entity structure" field.

![[cust_deep_entity.png]]
![deep entity customizing](./attachments/cust_deep_entity.png)

Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Transactioncode: **ZODATA_CUST**
## Create Namespace

To create a namespace, just enter the namespace you want to use and define weather it is a [[#global namespace]] or not. The name should match the name that you used in the [[DPC]] and [[MPC]] framework methods mention in the [[Creating a service]] file ([[Creating a service#Implement the framework MPC method]] / [[Creating a service#Implementing the framework DPC methods]] )
To create a namespace, just enter the namespace you want to use and define weather it is a [global namespace](#global-namespace) or not. The name should match the name that you used in the [DPC](./definitions/DPC) and [MPC](./definitions/MPC) framework methods mention in the [Creating a service](./Creating-a-service) file ([Implement the framework MPC method](./Creating-a-service#implement-the-framework-mpc-method) / [Implementing the framework DPC methods](./Creating-a-service#implementing-the-framework-dpc-methods) )

![[cust_create_namespace.png]]
![Create namespace](./attachments/cust_create_namespace.png)

### Global Namespace

Expand All @@ -30,9 +30,9 @@ A global namespace is appended to **every** OData Service that is using this fra

To define entities you need to select the namespace you want to define an entity for.

![[cust_define_entity.png]]
![define entity](./attachments/cust_define_entity.png)

The classes added to the customizing should inherit from "[[ZCL_ODATA_MAIN]]" class.
The classes added to the customizing should inherit from "[ZCL_ODATA_MAIN](../dev-objects/classes/ZCL_ODATA_MAIN)" class.

## Define Properties

Expand All @@ -43,8 +43,8 @@ The classes added to the customizing should inherit from "[[ZCL_ODATA_MAIN]]" cl

A navigation property also known as association can easily be created via customizing. The navigation properties are defined under an entity.

![[cust_nav_prop_tree.png]]
![navigation property tree](./attachments/cust_nav_prop_tree.png)

Just enter the navigation property name, the entity you want to navigate from and the entity you want to navigate to and at least the relation of that navigation.

![[nav_prop_cust.png]]
![navigation property customizing](./attachments/nav_prop_cust.png)
4 changes: 2 additions & 2 deletions docs/documentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ date modified: Tuesday, September 5th 2023, 5:38:03 pm

## Creating the First Service

[[Creating a service]]
[Creating a service](./Creating-a-service)

## DPC Boilerplate Code

[[DPC boilerplate code]]
[DPC boilerplate code](./DPC-boilerplate-code)
18 changes: 0 additions & 18 deletions docs/graph.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ hero:
tagline: My great project tagline
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
text: Documentation
link: /documentation/
- theme: alt
text: API Examples
link: /api-examples
Expand Down
85 changes: 0 additions & 85 deletions docs/markdown-examples.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/tags.md

This file was deleted.

0 comments on commit 9d4c481

Please sign in to comment.