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: 

regarding table

Former Member
0 Kudos

hi,

i have created a table with 8 fields.but they are asking to do something as below.

can anyone tell me what is actually needed to fulfill the following requirement.

""One more thing is that we need have functionality of maintaining this table manually with transaction code. I also want to have the feasibility of display, change, delete and create a new record in the table using authorization objects. Ie. Some people should have an authorization of create a record, some for change, some for delete and some for display. Can you suggest me how to achieve this functionality? This is the requirement from the business.""

points will be awarded.

regards,

kiran

2 REPLIES 2

Former Member
0 Kudos

Hi Kiran,

You need to create a maintainace view of the table.

Make the table as display maintainace allowed and create a maintainace view .

Go to SE93 and create a trnsaction code for SM30 giving the view name.

Reward points if useful.

Regards,

Atish

Former Member
0 Kudos

Creating Tables



Procedure



1.In the initial screen of the ABAP Dictionary, select object class Database table, enter the table name and choose Create.
The maintenance screen for the table is displayed.

2.Enter an explanatory short text in the field Short text.
You can for example find the table at a later time using this short text.

3.On the Attributes tab page, enter the delivery class of the table.
Mark the Table maintenance allowed flag on this tab page if users with the corresponding authorization may change the data in the table using the Data Browser (Transaction SE16). If the data in the table should only be maintained with programs or with the table view maintenance transaction (Transaction SM30), you should not set the flag.

4.On the Fields tab page, enter the table fields. Perform the following steps for each table field:
5.Enter a name for the table field in the column Fields. The field name may only contain letters, digits and underlining, and it must begin with a letter. A field name may not be longer than 16 characters.

Select the Key column if the field should be part of the table key.

6.Enter the name of a data element in field Field type. In this case the field takes the data type, length, decimal places and short text from this data element. If there is no suitable data element, you can go to the data element maintenance screen by entering a name and double-clicking.

7.With Data element/Direct type, you can directly enter the data type, field length, decimal places and short text. Press this key again if you want to enter data elements for further fields.

8.Only a limited functionality is provided for fields without data elements. No foreign keys or fixed values may be defined for such fields, and there is no F1 help.

9.You must also define the reference field and reference table on tab page Currency/quantity fields for fields of types CURR (currency) and QUAN (quantity)

11.You also can include the fields of an existing structure in the table. Note that the field names in the structure may not be longer than 16 places in this case.

12 .Maintain the technical settings for the table. The corresponding maintenance screen is displayed with Goto ® Technical settings.
The technical settings are a separate object and can be activated and transported separately from the table.

13.Maintain (if necessary) the foreign key relationships of the table to other tables.
The corresponding maintenance screen is displayed if you place the cursor on the check field and choose .

14.Create (if necessary) secondary indexes for the table.
To do this choose Goto ® Indexes.

15.Save the table.
A dialog box appears in which you have to assign the table a development class.

16. Choose Activate .



Creating Maintenance Views



Procedure



1.Enter an explanatory short text in the field Short text.
You can for example find the view at a later time using this short text.

2.Enter the primary table of the view under Tables in the Tables/Join conditions tab page. Only those tables that are linked with the primary table (indirectly) with a foreign key can be included in the maintenance view.

3.If required, include more tables in the view. In a maintenance view you can only insert tables that are linked to one another with foreign keys.
Place the cursor on the primary table and choose Relationships. All existing foreign key relationships of the primary table are displayed. Select the required foreign key and choose Copy. The secondary table used in such a foreign key is included in the view. The join conditions derived from the foreign keys (see Foreign Key Relationship and Join Condition) are displayed.

4.You can also insert tables that are linked by foreign key with one of the secondary tables that was already inserted. To do this, place the cursor on the secondary table and choose Relationships. Then proceed as described above.

5.For maintenance and help views, there are certain restrictions on the foreign keys with which the tables can be included in the view (see Restrictions for Maintenance and Help Views). The foreign keys violating these conditions are displayed at the end of the list under the header Relationships with unsuitable cardinality.

6.On the View fields tab page, select the fields that you want to copy to the view.
Choose Table fields. All the tables contained in the view are displayed in a dialog box. Select a table. The fields of the table are now displayed in a dialog box. You can copy fields by selecting them in the first column and choosing Copy.

7.All key fields of the primary table must be included in a maintenance view. In addition, all key fields of secondary tables that are not involved in the foreign key (that is, which are not linked via a join condition to a key field already included in the view) must be included in the view.

8.This ensures that the records inserted with a maintenance view can be written correctly in the tables contained in the view.

9.On the Selection conditions tab page, you can (optionally) formulate restrictions for the data records that can be displayed with the view (see Maintaining Selection Conditions for Views).
The selection conditions define the data records that can be selected with the view.

10.In the Maintenance status tab page, define the maintenance status of the view.
The maintenance status defines how you can access the view data with the standard maintenance transaction (SM30).

11.Choose Activate .
At activation, a log is written; it can be displayed with Utilities ® Activation log. If errors or warnings occurring when the view was activated, the activation log is automatically displayed.

12.Go to Transaction SE54 with Environment ® Tab.maint.generator.
From the view definition you can generate maintenance modules and maintenance interfaces that distribute the data entered with the view to the base tables of the view. You can find more information in

Creating a Maintenance Dialog

.


Maintenance Attribute of a View Field



You can control how to access a field of a maintenance view with the maintenance attribute. There are the following maintenance attributes:

R :

Only pure read accesses are allowed for such fields. You cannot maintain such fields with Transaction SM30.

S :

These fields are used to create subsets when maintaining view data. Only a subset of the data is displayed. This subset is defined by entering a suitable value in this field.

H :

These fields are hidden from the user in the maintenance dialog. The field does not appear in the maintenance screen. You have to ensure that such fields have the correct contents. By default they are left empty.

: There are no restrictions for the field maintenance.

reward points if it is usefull .....

Girish