1

Getting Started with ABAP: How to Create Maintenance View

 1 year ago
source link: https://blogs.sap.com/2022/06/26/getting-started-with-abap-how-to-create-maintenance-view/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
June 26, 2022 4 minute read

Getting Started with ABAP: How to Create Maintenance View

This is the next blog post in this series. Here is the previous blog post Getting Started with ABAP: How to Create Projection View

In the previous blog post, we learned how to create projection view.

In this blog post we will learn how to create maintenance view.

What is Maintenance View?

A single maintenance view can be used to modify the content of multiple related database table consistently.

All database tables grouped in maintenance view must be joined using foreign key relationship. The first table included in the maintenance view is known as the primary table of the maintenance view. The tables added to this primary table using foreign keys are known as secondary tables.

While selecting secondary table make sure

  1. If secondary table is check table then no more than one dependent data record exists in each of the secondary tables for a specific data record in the primary table
  2. If secondary table is Foreign key table then the foreign key fields must be key fields of a secondary table

How to Create Maintenance View

Step 1: Go to SE11. Select view and enter name of maintenance view.

1-107.png

Step 2: Click on Create. Select Maintenance View.

2-43.png

Step 3: Enter short description.

3-39.png

Step 4: I have two tables. One is Employee table and another one is department table.

ZAKTABLE

4-40.png

ZAK_DEP

5-32.png

Employee_id field is foreign key in ZAK_DEP table.

Enter ZAK_DEP name in table column first.

6-36.png

Step 5: Click on Relationships. Here we can see that ZAK_Dep table is connected using foreign key. Select that table.

7-34.png

Step 6: Join condition will be added.

8-30.png

Step 7: Click on View Fields.

9-31.png

Step 8: Click on Table fields and select first table.

10-24.png

Step 9: select fields from table.

11-23.png

Step 10: Click on Table fields and select second table.

12-21.png

Step 11: select fields name.

13-21.png

Step 12: In selection condition, you can put condition if you want.

14-16.png

Step 13: Here you can see that 4 options are there.

1.Read Only

That means you will be able to read data through maintenance view.

2.Read, change, Delete, and Insert

If you select this option then you will be able to read, change, delete and insert the data into the table through maintenance view.

3.Read and Change

If you select this option then you will be able to read and edit data into database table through this view.

4.read and change (time-specific Views)

If you select this option then you will be able to read and change the data if it is time-specific view. That means key of maintenance view contain data field and time field.

What is delivery class and Data browser/Table editing?

I have explained it in earlier blog post. Here you can check Getting started with ABAP: How to Create Table Part 1

15-15.png

Step 14: Save and Activate it. Click on contents.

16-12.png

When you click on Contents, next screen is not getting display.

For maintenance view, we have to create maintenance dialog to read or to do any operation through this view.

Step 15: we can create maintenance dialog from transaction SE54. Go to SE54.

You will get below window.

17-11.png

Step 16: Click on Generated Objects. Click on Create/Change.

18-9.png

Step 17: Click on Yes.

What is Authorization group and maintenance type?

I have explained it earlier blog post. Here you can check Getting Started With ABAP: Table Maintenance Generator

19-7.png

Step 18: Enter function group name. I selected maintenance type as one step and click on find screen number button.

20-6.png

Step 19: Click on create button.

21-5.png

Step 20: Now go to your maintenance view and click on Contents.

Now you will be able to read data.

22-5.png

Step 21: If you want to edit, insert and delete data then click on Edit button.

23-5.png
24-4.png

If want to delete just select that particular entry and right click it and delete it.

Here we have created maintenance view.

Follow my profile to be notified of the next blog post. Please feel free to ask any questions you have in the comments section below.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK