Application Development and Automation 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: 
Read only

modify dtab.

Former Member
0 Likes
1,476

hi friends,

can anybody tell how to modify database table .

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,173

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

10 REPLIES 10
Read only

Former Member
0 Likes
1,173

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

Read only

Former Member
0 Likes
1,173

Hello

Use the UPDATE or MODIFY statement

Regards

Indu

Read only

0 Likes
1,173

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)

Read only

bpawanchand
Active Contributor
0 Likes
1,173

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

Read only

narin_nandivada3
Active Contributor
0 Likes
1,173

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

Read only

Former Member
Read only

Former Member
0 Likes
1,173

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

Read only

Former Member
0 Likes
1,173

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

Read only

Former Member
0 Likes
1,173

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.

Read only

Former Member
0 Likes
1,174

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