09-18-2008 1:18 PM
hi
why we can't insert directly in std sap table while we can use modify easily.
09-18-2008 1:19 PM
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
09-18-2008 1:25 PM
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.
09-18-2008 1:22 PM
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
09-18-2008 1:22 PM
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
09-18-2008 1:22 PM
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.
09-18-2008 1:25 PM
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
09-18-2008 1:25 PM
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..
09-18-2008 1:28 PM
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