Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
maheshsinghmony
Explorer
0 Kudos

Creating Custom Tables for Table Maintenance

Go to SE11 and give the table name that you want to create.

maheshsinghmony_2-1712008821453.png

 

 

 

 

 

 

 

 

 

 

Give the Description of the table and enter the following details.

1. Delivery Class

Delivery Class Used For

  • A - Application table (master and transaction data).
  • C -Customer table: data is maintained by the customer only
  • L  - Table for storing temporary data
  • G  - Customer table, SAP may insert new data records, but may not overwrite or delete existing data records. The customer namespace must be defined in table TRESC. (Use Report RDDKOR54 here).
  • E - System table with its own namespaces for customer entries. The customer namespace must be defined in table TRESC. (Use Report RDDKOR54 here.)
  • S - System table, data changes have the same status as program changes.
  • W - System table (e.g. table of the development environment) whose data is transported with its own transport objects (e.g. R3TR PROG, R3TR TABL, etc.).

2. Data Browser/Table View Maint.

Options Available

  1. Display/maintenance not allowed: The usage of standard table maintenance tools is not allowed.
    • Maintenance and display of this Dictionary object is not possible in transaction SE16.
    • Transaction SE54 does not allow the generation of a maintenance dialog, which means automatically calling transactions SM30/SM34 for this Dictionary object is no longer possible.
  2. Display/maintenance allowed to limited extent: Usage of standard table maintenance tools is allowed to a limited extent.
    •  Transaction SE16 allows the display function for this Dictionary object, but no maintenance.
    • Generation of a maintenance dialog for this Dictionary object is possible using transaction SE54.
    • Transaction SM30 does not allow maintenance and display functions for this Dictionary object
  3. Display/maintenance allowed: The usage of standard table maintenance tools is allowed:
    • Transaction SE16 allows the maintenance and display functions for this Dictionary object. Note: If an SM30 maintenance dialog exists for this Dictionary object, it is called.
    • Transaction SE54 allows the generation of a maintenance dialog for this Dictionary object.
    • Transaction SM30 allows the display and maintenance functions for this Dictionary object.

maheshsinghmony_3-1712008893071.png

Enter the Fields of the table.

maheshsinghmony_4-1712008905071.png

Significance of the Above fields:

  • LASTCHANGED: Username of the person who created or changed the data.
  • CHANGEDATE: The date on which the records was created or changed.
  • CHANGE_TIME: The time on which the records was created or changed.
  • COMMENTS: The reason for the changes made to be specified by the user.

Once all the fields have been entered then, click on Technical Settings and enter the following details on the next screen:

maheshsinghmony_5-1712008947481.png

Data Class

The data class defines the physical area of the database (for ORACLE, the TABLESPACE) in which your table is logically stored. If you choose a data class correctly, your table will automatically be assigned to the correct area when it is created on the database.

The most important data classes are (other than the system data):

  • APPL0: Master data
  • APPL1: Transaction data
  • APPL2: Organizational and customizing data

Master data is data that is frequently read but rarely updated. Transaction data is data that is frequently updated. Organizational and customizing data is data that is defined when the system is initialized and then rarely changed.

Two more data classes are available, USR and USR1. These are reserved for user developments, and the tables assigned to these data classes are stored in a table space for user developments.

Note: The data class only has an effect on table storage for the database systems ORACLE and INFORMIX.

Size Category

The size category determines the probable space requirement for a table in the database.

You can select categories 0 to 4 for your table. Each category is assigned a specific fixed storage area value in the database. When you create a table, initial space is saved for it in the database. If more space is required later due to data that has been entered, the storage space is increased in accordance with the category selected.

Press F4 on the field size category to see the number of data records that can be maintained for the individual categories of your table without complications ensuing. These complications could be for example a reorganization becoming necessary because the maximum space to be reserved for the table was exceeded due to the maintained size category.

Buffering Status

The buffering status specifies whether or not a table may be buffered.

This depends on how the table is used, for example, on the expected volume of data in the table or on the type of access to a table (mainly read or mainly write access to the table). In the latter case, for example, one would not select buffering.

You should, therefore, select:

  • Buffering is not allowed if a table is not buffered.
  • Buffering allowed but not activated if buffering is principally allowed for a table, but at the moment no buffering should be active. The buffering type specified in this case is only a suggestion.
  • Buffering is allowed if the table should be buffered. In this case, a buffering type must be specified.

Buffering Type

The buffering type defines whether and how the table should be buffered.

There are the following types of buffering:

  • single-record buffering --> Press F1 for more details
  • generic area buffering --> Press F1 for more details
  • full buffering --> Press F1 for more details

In generic area buffering, a number of key fields between 1 and no. of key fields-1 must be specified.

No. Of Key Fields for Generic Buffers

If you read a record from a generically buffered table, all records whose left-justified part of the key corresponds to that of this record (generic key fields) are loaded into the buffer.

This left-justified part of the key is determined in this field by entering a number n of key fields. The first n key fields of the table are thus the generic key fields.

Create Authorization Object

To create an Authorization Object, go to transaction SE54.

Enter the Table/View name for which the Authorization object has to be created.

Select the Radio Button ‘Authorization groups’.

Then click on Create/Change.

maheshsinghmony_6-1712009165816.png

Then, the next screen will give a list of Authorization Objects that are already present in the system. You can Select one of them from the available list as per the requirement. But if the table demands a new authorization object then click on New Entries pushbutton given on the screen.

maheshsinghmony_7-1712009187479.png

Enter the new authorization object name and description as shown in the screen below. The authorization object must follow a certain naming convention. (It should always start with 'Z'.) Click on Save

maheshsinghmony_8-1712009306752.png

Table Maintenance Generator

  1. Go to SE12 transaction. Open the table for which the table maintenance is to be implemented.
  2. Change it to the Editable mode and then click on Utilities -> Table maintenance generator.

maheshsinghmony_9-1712009347030.png

Enter the following details on the next screen:

  • Authorization group: Assigned/created for the table by following the procedure given in Section I.
  • Function group: Name of the function group to which the generated maintenance modules will belong.
  • Maintenance type: According to the table requirement, anyone should be selected.
    • One step: Only one maintenance screen is processed during extended table maintenance. The entries are displayed in list form on this screen.
    • Two step: Two maintenance screens are processed during the extended table maintenance:

On the Overview screen, the entries are displayed in list form.

One entry is displayed on the single screen. For every entry, the single screen can be called from the overview screen by pressing the function key.

Maintenance Screen No

According to the maintenance type selected, an overview screen and a single screen should be entered. Recording routine—This is an indicator of the recording routine that should be used for the table contents.

  • Standard recording routine
  • No, or user, recording routine

Compare Flag

This flag indicates whether the maintenance transaction allows the (checked) activation of Business Configuration Sets (BC Sets) and the adjustment. This is the case if the maintenance transaction can run in the background. There are four options present for the compare flag:

  • No Information
  • Not Adjustable
  • Adjustable in Dialog
  • Automatically Adjustable

Once done. Click on Create.

Exceptions

If changes are made to the table after the generation of table maintenance, table maintenance should be re-generated for the table.

1. Click on Utilities -> Table Maintenance Generator.

 2. Click on the Edit button. A pop-up would ask for Reason for change. Select the appropriate reasons.

3. Then, Save the data.

4. Go to System -> Status and copy the Program Name.

maheshsinghmony_10-1712009381104.png

Changing the Source Code of Table Maintenance

If fields like last changed on, last changed by, etc., are present in the table, logic should be included to save them by the system.

1. Go to transaction SE80 and open the program that was received from the above logic.

2. Go to the Screens drop-down list and click on 0001. In the PAI event of that screen, add a module to include the logic.

3. Double-click on the module. It will ask for the ‘Include’ in which this module should be included.

4. Select the Include where we need to include the logic.

maheshsinghmony_11-1712009417714.png

 5. Enter the logic to update the table with the parameters --> person responsible for making change, timestamp, etc. It is as shown below:

maheshsinghmony_12-1712009453449.png

6. Go to the layout of the screen

maheshsinghmony_13-1712009500128.png

7. Once you click on the Layout button, the screen below will appear.

maheshsinghmony_14-1712009535683.png

8. Enter the text to be displayed as the column heading in the output screen.

maheshsinghmony_15-1712009573968.png

9. Change the attributes of the fields of the table that are required to be non-editable as 'OUTPUT ONLY', i.e., the fields LASTCHANGED, CHANGEDATE, and CHANGE_TIME. The Columns will automatically be grayed out and uneditable on the output screen.

maheshsinghmony_16-1712009611255.png

10. Save and Activate the changes.

 

Create Transaction

1. To create a transaction, go to transaction SE93. Enter the transaction name which is to be created.

2. Click on Create.

maheshsinghmony_24-1712009988936.png

3. Enter the Short text and the Start Object and select Ok.

maheshsinghmony_25-1712010071812.png

4. Enter the below details and the Click on SAVE

     1708721572863.png

5. Enter the created T-code and the below screen would appear as output.

 

maheshsinghmony_26-1712010242009.png

6. Click on the New Entries button to create an entry in the table. Enter the details and then click on SAVE.

maheshsinghmony_27-1712010259540.png

7. As soon as you click on the save button the username, Date and Time appears automatically.

maheshsinghmony_28-1712010314165.png

8. You can check the same data in the Se16 transaction for the table.

maheshsinghmony_29-1712010330238.png

 Conclusion:

I hope I was able to give you a little insight into how the you can create, maintain and add security on a custom SAP table.

I would love to hear back suggestions, feedback and questions that you might have. Please do share the article with your Team members, Colleagues and Friends working in SAP and who use or plan to use SAP custom table to maintain critical data in SAP. Also, don’t forget to like and share the blog and follow me on SAP blogs to not miss more content: maheshsinghmony

Reference: https://dzone.com/articles/sap-table-creation-maintenance-and-authorization

2 Comments
Sandra_Rossi
Active Contributor
0 Kudos

Thank you. Yet another blog post about table creation and table maintenance dialog generation and events coding (one among tens of blog posts and questions).

maheshsinghmony
Explorer
0 Kudos

Hi Sandra,

I had posted this blog first time back in 2010 as a White paper when they used to be uploaded on SAP.com in form of a .pdf file after it was reviews by SAP moderators. Over the years when SAP migrated to a new platform and to save space online they deleted/removed all those .pdf files and requested all the authors who have any white paper published on SAP.com to reposted them as a blog. Hence I have reposted it again as a new blog which is still relevant to all the SAP users using ECC and S/4 HANA.

Regards,

Mahesh

Labels in this area