Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Table maintenance

Former Member
0 Kudos

Hi,

There are two ways to maintain Data records in a table :

1. By program : using insert/delete/modify or update statement.

2. By table maintenance

What is the advantage or disadvantage of one process to another.

Thanks & Regards,

Abhishek Sarkar

4 REPLIES 4

Former Member
0 Kudos

Hi,

Table maintenance is used to maintain data in the tables created (ZTABLE)

Generally for inserting new records into custom table thru transaction SM30, we need to enter all the values manually and save the record.

When certain data for the key fields needs to be populated automatically while creating entries, the steps involved are:

Maintaining the subroutine in view V_TVIMF for a particular custom table.

Logic for extracting relevant data for the fields entered, when user press enter button.

Check this blog for more information on extracting data in table maintenance.

/people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance

With the help of the table maintenance generator, you are able to maintain the ENTRIES of the table in SM30 transaction.

It can be set in transaction SE11 - Tools - Table maintenance generator.

Table maintenance Generator is used to manually input values using transaction sm30

follow below steps

1) go to se11 check table maintenance check box under attributes tab

2) utilities-table maintenance Generator-> create function group and assign it under

function group input box. Also assign authorization group default &NC& .

3) Select standard recording routine radio in table table maintenance generator to move table

contents to quality and production by assigning it to request.

4) Select maintenance type as single step.

5) maintenance screen as system generated numbers this dialog box appears when you click on create button

6) save and activate table

One step, two step in Table Maintenance Generator

Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.

Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.

SM30 is used for table maintenance(addition or deletion of records),

For all the tables in SE11 for which Table maintenance is selected , they can be maintained in SM30

Sm30 is used to maintain the table ,i.e. to delete ,insert or modify the field values and all..

It creates the maintenance screen for u for the particular table as the maintenance is not allowed for the table..

In the SE11 delivery and maintenance tab, keep the maintenance allowed..

Then come to the SM30 and then enter the table name and press maintain..,

Give the authorization group if necessary and give the function group and then select maintenance type as one step and give the screen numbers as system specified..

Then create,,,

Then u will able to see the maintenance view for the table in which u can able to insert and delete the table values...

We use SM30 transaction for entering values into any DB table.

First we create a table in SE11 and create the table maintenance generator for that Table using (utilities-> table maintenance generator) and create it.

Then it will create a View.

After that from SM30, enter the table name and Maintain, create new entries, change the existing entries for that table.

check these links --

http://help.sap.com//saphelp_470/helpdata/EN/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20im...

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm

/message/2831202#2831202 [original link is broken]

Regards

Sudheer

Former Member
0 Kudos

Hi Sarkar

if u doing in program then it is possible to lock the table before doing operation,

but in table maintainance generator i think the locking mechanism dont apply here

reward points to all helpful answers

kiran.M

Former Member
0 Kudos

Hi

Data updation in SAP was always preferred to enter through the Transaction Screen, since it will take care of screen/field validations automatically.

It is not advisable to update the data into SAP tables using the SQL commands like UPDATE/INSERT/MODIFY

so we use Transactions to update the data into SAP.

similar way is the Table maintenace generator, through which we enter data using SM30 screen

table maintanance Generator is used to manually

input values using transaction sm30

follow below steps

1) go to se11 check table maintanance check box under

attributes tab

2) utilities-table maintanance Generator->

create function group and assign it under

function group input box.

also assign authorization group default &NC& .

3)

select standard recording routine radio in table

table mainitainence generator to move table

contents to quality and production by assigning

it to request.

4) select maintaience type as single step.

5) maintainence screen as system generated numbers

this dialog box appears when you click on create

button

6) save and activate table

http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm

http://help.sap.com/saphelp_46c/helpdata/en/a7/5133ac407a11d1893b0000e8323c4f/frameset.htm

/message/2831202#2831202 [original link is broken]

One step, two step in Table Maintenance Generator

Single step: Only overview screen is created i.e. the Table Maintenance Program will have only one screen where you can add, delete or edit records.

Two step: Two screens namely the overview screen and Single screen are created. The user can see the key fields in the first screen and can further go on to edit further details.

<b>Reward points for useful Answers</b>

Regards

Anji

0 Kudos

Hi Experts,

Thanks for your replies.

Firstly, I know how to create table maintenance. So let us not spend time on discussing that. I don’t have any confusion about how to create table maintenance.

Secondly, what I know and what I researched, when we create table maintenance, one custom function group is create by SAP which only use some sophisticated mechanism ( by creating user friendly screen and all) to update or create table entries. But ultimately these custom function groups also use insert/update/delete command in lower level to update a table. As in the database levels there are not others commands except insert/update/delete/modify to update a table entries.

So it is the only advantages that we are getting a readymade code to maintain table by table maintenance which are optimized as created by SAP or there is something beyond that. <b>Can any one please give any light on that?</b>