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: 

how to insert data with database view

Former Member
0 Kudos

Hi,

I created database view with only one base table.

I want to insert data in to that using database view.

Using Utilities->contents..i am only able to read data.

Pls guide me how to insert data

thanking u

5 REPLIES 5

Former Member
0 Kudos

Hi,

If it is a custom table..and no dependancies for the table...

Then create a table maintainence program using the following steps..

Go to SE11.

give the table name..

In the menu..choose..utilities -> table maintenance generator.

give the function group name..

Give the screen number..

Press create..

Now the table maintenance screen will be generated..

maintain the data in SM30

Thanks

naren

Former Member
0 Kudos

go to contents...

click F5 to create new entries...

0 Kudos

hi

after pressing F5 also i am not getting any screen.

i am not able to insert.

Former Member
0 Kudos

Hi,

Check in Delivery Maintenance tab of SE11, whether u have selected DISPLAY/MAINTENANCE ALLOWED. Save it and activate.

Former Member
0 Kudos

Follow the below steps for inserting the data from the view .

<b>Creating Maintenance Views</b>

<b>Procedure</b>

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.

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.

4.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.

5.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.

6.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.

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

8.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.

9.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).

10.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.

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.

Reward points if it is usefull....

Girish