‎2008 Aug 09 11:26 AM
hi friends,
can anybody tell how to modify database table .
thanks in advance.
‎2008 Aug 09 12:32 PM
Hi bhupi,
Changes in a databse table can be done using UPDATE, INSERT & MODIFY.
Actually as MODIFY works as both update INSERT & UPDATE, so if requirement is only modify the dbtab...check this link
[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm]
Best of luck,
Bhumika
‎2008 Aug 09 11:28 AM
Hi,
We update a database table through Report program using MODIFY and UPDATE statement. For sample code and syntax check,
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
Regards,
Anirban
‎2008 Aug 09 11:29 AM
‎2008 Aug 09 11:33 AM
Goto SE11 add any field or delete any field.
Save , go to Database Utility from Menu bar > utilites > database utilities or from Tcode :- SE14 and Activate ur modified database table.( U will have option to keep data or completely delete data in the table just check it which option u need)
‎2008 Aug 09 11:30 AM
Hi
[Changing Lines|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm]
[UPDATE|http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=444]
Regards
Pavan
‎2008 Aug 09 11:31 AM
Hi,
If you want to update the record into table...
Read table it_spfli into wa_spfli with key carrid = 'AA' Connid = '0017'.
Update spfli from wa_spfli with key carrid = wa_spfli-carrid
connid = wa_spfli-connid.
[Change database table directly|http://www.sapdb.info/sap-hacks-change-database-tables-directly/]
[Inserting or changing lines|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm]
If you want to change the structure of the table.. first change as per your requirement and then
Go to SE14> give the table name> press enter--> click on the push button Activate and adjust Database button.
Hope this would help you.
Good luck
Narin
‎2008 Aug 09 11:36 AM
‎2008 Aug 09 11:43 AM
Hi,
If you are talking about modifying the records of database table then use MODIFY statement.
Check the link for procedure-
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm
2. If you are talking about modifying database structure then,
you can do it in three different ways-
a) By deleting the table and creating it again.It is aplicable if there is no records in the table.
b) By changing the database catalog(ALTER TABLE).
c) By table convertion.
Check this link for the procedure-
http://help.sap.com/saphelp_nw70/helpdata/en/cf/21f1ab446011d189700000e8322d00/content.htm
Regards,
Sujit
‎2008 Aug 09 12:00 PM
Hi Bhupi.
I would like to suggest my opinion with a few reference examples as it will be better understood.
[SDN - Reference - Modify Database table|;
[SDN - Reference - Modifying database table|;
[SDN - Reference - Modifying a few fields in the database table |;
[SDN - Reference - Scenario - Modify the table MSEG|;
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
‎2008 Aug 09 12:14 PM
hi,
DATA message_wa TYPE t100.
message_wa-sprsl = 'EN'.
message_wa-arbgb = 'MYMSGCLASS'.
message_wa-msgnr = '100'.
message_wa-text = 'Some new message ...'.
MODIFY t100 FROM message_wa.
the above will only modify the respective field value in dbtable.
if u want to modify huge amount of data in certain conditon
than use
loop
condition through read statement or hard coding
-
-
MODIFY dbtable FROM work area.
endloop.
‎2008 Aug 09 12:32 PM
Hi bhupi,
Changes in a databse table can be done using UPDATE, INSERT & MODIFY.
Actually as MODIFY works as both update INSERT & UPDATE, so if requirement is only modify the dbtab...check this link
[http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm]
Best of luck,
Bhumika