Tuesday, March 12, 2013

CREATING TABLE MAINTENANCE GENERATOR FOR A TABLE

FIRST  Lets create a database table with fields

MANDT
LIFNR
LAND1
NAME1

 GOTO  SE11

databasetable : zTmg.
click on CREATE.
give short description : Table for TMG.
Delivery class : A
Data browser/ table view maint : Display/maintenance allowed.

click on  Fields tab

(Mandt  check the key and initial  and dataelement give mandt
lifnr check the key and initial and dataelement give lifnr.)

fields      Dataelement
mandt     mandt
lifnr        lifnr
name1    name1_gp
land1      land1_gp

click on  Technical setings
It will ask to save and save it in a $tmp local package

Dataclass : APPLO
Size       : 0.

save , goback

Click on  EXTRAS----> Enhancement Category
click enter
choose can be enhanced . and click on copy.

now save, check, activate.


CREATING TABLE MAINTENANCE GENERATOR FOR A TABLE

lets create TABLE MAINTENANCE GENERATOR for the above table ZTMG.

Table Maintenance Generator is used only for customized tables not for standard tables.
It is basically used to update or delete records or to create new entries for the ztable .

open the  ztmg table   (se11) and then ..
Utilities----> TABLE MAINTENANCE GENERATOR


Authorization Group : &nc&
Function Group : Zfunctmg. ( SE37 you can create a function group)

Maintenance type : choose one step.

Click on Find screen numbers
choose propose screen numbers
enter
now click on CREATE button.
save it in $tmp Package and goback
save check and activate your table.

Now to Insert records or delete records.

Goto Transaction code : SM30

Table : Ztmg.

choose No restrictions.

Click on MAINTAIN.
then click on NEW ENTRIES.
And add the records
1 krish Land
save.

go and check the records in se11.( Utilities-->Table contents--->Display).
you can find them.










THE MAINTENANCE DIALOG FOR ZTABLE IS INCOMPLETE OR NOT DEFINED --ERROR

Goto transaction code SE54 then enter the table name for which you have created the Table Maintenance Generator.
Then choose Generated objects
And click on display.
It will show the table maintenance dialog you have generated for the table, if doesn't show then create the table maintenance generator again,

This Error usually occurs when you are creating Table Maintenance Generator, after clicking on Find screen numbers..people usually forget to press on the CREATE button (beside the Find screen numbers)
when you don't press on CREATE  button you are doing the whole procedure correctly  but not creating it, so the system is not creating the Table Maintenance Generator for that particular table. So when you goto
SM30 and try to maintain entries you will get this error.

Hope you understand.