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: 

why we can't use insert to put an entry in std sap table

Former Member
0 Kudos

hi

why we can't insert directly in std sap table while we can use modify easily.

8 REPLIES 8

Former Member
0 Kudos

Hi,

You can use the INSERT command to update a database table

INSERT

UPDATE

MODIFY are used for this purpose. you cannot use APPEND as in internal tables

santhosh

0 Kudos

Hi you can use both

INSERT <table> from <wa>

MODIFY <table> from <wa>

BUT in case of INSERT always a new record will be added whether it is already exist.

but in case of MODIFY a new record will be added only if there is no same record.otherwise will be modified.

Former Member
0 Kudos

Hi,

Insert will be creating a new entry in the database where as in modify it will modify the data which is already present in the database but some times if the data is not present it will create... but the main functionality is using insert u can insert the records anywhere in the table...

example for the insert is,

use the table mara in the place of m

REPORT ZTEST_INSERT.

TABLES: <m>.

DATA: wa_m TYPE <m>.

wa_m-ernam = 'ZTEST'.

insert into <m> VALUES wa_m.

if sy-subrc = 0.

WRITE / 'Records inserted Successfully'.

ENDIF.

reward if usefull,

Vishnu. R

Edited by: vishnu ramanathan on Sep 18, 2008 2:22 PM

Former Member
0 Kudos

because while entering data directly into SAP table using INSERT, you wont be performing any consistency checks, required conversions etc which would otherwise be performed by relevant transaction/BAPI..This is essential to ensure that data always remains in a consistent state.

Moreover you are not likely to konw abt all the dependencies of your entry with any other table entries...

~Piyush Patil

GauthamV
Active Contributor
0 Kudos

hi,

we can use insert statement to update std database table.

but it is not suggested.

because the data which we insert in std tables may effect so many other transactions.

Former Member
0 Kudos

hi

it is a strange Q, but what I know is that with Insert keyword we insert Data at particular Row by giving INDEX hence indexing/sorting based on primary key will get disturbed .

while using Modify we never changes position of row manually.

that is why we allowed to use Modify,Update

if helpful don't forget

Regards

Sachin

Former Member
0 Kudos

Generally one can use Insert statment to a standard table. The problem is no validation of data is been performed over data in table and also, there might be some link tables wherein the data doesnot exist. Also, master data gets affected as such..

Former Member
0 Kudos

Hi,

We can insert modify update on sap standard tables, but it is not suggestable because SAP is highly integrated software.

if you update through transaction or insert through transaction it will update many tables in back end. if you modify only one table there will be inconsistency with the other related tables.

so..it is not recomended to update the SAP standard tables through insert command.

Regards,

Naresh.

Edited by: naresh durki on Sep 18, 2008 2:29 PM