Additional Blogs by SAP
Showing results for 
Search instead for 
Did you mean: 

Hi all,

Let us look at how to create a maintenance view cluster in a hierarchy model. Here is the view cluster. Click on New Entries and create an entry, lead select that entry and click on "Subject Texts" in the Dialog Structure which is on the left window pane of the screen and maintain language related entries, as shown in the images. This use-case is for tutoring institutes where they create regular and customized subject plans based on student needs. Some students prefer to study predefined courses and subject combinations and some students ask for specific subjects. The institute maintains the combinations in the view clusters and use this ID against the student's IDs.

Here are the entries made in the database tables

Now let us learn how to create this view cluster and achieve this behavior. This topic I have made it a two part blog series. In the first part I am going to cover creation of database tables, data elements, domains and creation of maintenance views. In the second part I am going to cover creation of maintenance view table generation and creation of view cluster.

Lets get started. I have created two tables. The first table has the subject indicators along with a description and the second table is a text table, it maintains the description of the first table in various languages.

Let us create the domain needed for usage in the tables. Choose the se11 screen and select the radio button Domain, type XFELD and create. This has the behaviour of boolean. If it doesn't already exist, then create it. Choose the data type as Char with number of characters as 1 and Output length as 1. Maintain Value Range as shown in the images.

Another domain needed is for description. We need to be able to maintain it in the same case that the user enters it in. Create a domain named "Char80_LC" with data type as char, number of Characters 80, Output Length 80 and select the Lower case checkbox. Here is an image of the same.

Let us create some Data elements. First is for the description field, in the se11 screen, choose Data Type, click create. Choose data element in the pop-up that appears. Provide a Short Description, Choose the radio button Elementary Type and the Domain as "Char80_LC" which we just created. Maintain field labels and activate this element. Next let us create the subject indicators with the XFELD domain and maintain its field labels. I have created indicators for C, C++, Java and ABAP. I also have a deletion indicator. Lastly I have created a common_id data element for type char 3. Here are the images showing the creation of these data elements

Now that the domains and data elements are ready, let us create the tables. In the se11 screen, choose tables and create a ztab1. Choose the table as Customising table with Display/Maintenance Allowed. Give the fields as shown in the image, maintain enhancement category and technical settings.

Create the second table as a text table with the same Delivery/Maintenance, enhancement category and technical settings. This are the fields available in the second table.

Provide a foreign key relationship between the two tables. It is set from the text table to the original table. Lead select the common_id field in second table and click on foreign key button, provide table1 and click on key fields of a text table and maintain cardinality as 1: CN

Our tables are ready. Now let us create the maintenance views for these tables. Select the se54 transaction, provide a view name for the first table, choose the abap dictionaryradio button and create.

Select the button View to create a maintenance view, provide a short description, in the Table/Join Conditions tab, provide the first table name ztab1. Choose the View flds tab and select all the view fields of the first table. Provide appropriate maintenance attributes as R, H, S or space.

Let us create a second View with the common_id marked as S attribute.

In the next blog post we'll see how to generate maintenance objects and creation of view cluster.