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

How to Edit the Database Record

SurendarT
Explorer
0 Likes
3,934

Hi Folks,

How to Edit a Database Record ....

Example : If i want to Edit the NAME of a Customer from KNA1 .(Consider If that table doesn't have an TABLE MAINTENANCE GENERATOR).

Hi Folks,

How to Edit a Database Record ....

Example : If i want to Edit the NAME of a Customer from KNA1 .(Consider If that table doesn't have an TABLE MAINTENANCE GENERATOR).

11 REPLIES 11
Read only

Former Member
0 Likes
2,477

Tcode se16

Read only

Former Member
0 Likes
2,477

Hi,

Check this link for a step by step solution of requirment with screenshots.

http://www.sapdb.info/sap-hacks-change-database-tables-directly/

Regards,

anirban

Read only

Former Member
0 Likes
2,477

Hi Surender,

Go for the below link>>

[http://help.sap.com/search/highlightContent.jsp]

Thnks

Read only

Former Member
0 Likes
2,477

Hi Dude,

if its a ZTable we can do as follows.

1. goto se11 and enter the table name.

2.goto Utilities>Table Contents>Display

3. press Execute button.

4.select the check box . goto menu bar's Table Entry-->change.

Read only

Former Member
0 Likes
2,477

Surender,

To update the data of any table, go to transaction SE16N, type u201C&SAP_EDITu201D. It will activate SAP editing function.

Esle.

Opern any record in SE16.Double click on the record so that all the fileds will be displayed in vertical format.

start debugging by /H

change the value of "code" to "DELE" and execute.

Moreover if you want to do this in PROD environment, I would NOT use the SE16n way, due to dependencies, which can have unwanted effects (database inconsistencies). Although in this case (only Name of customer), it might not be as bad as it normally would be.

Amit.

Read only

Former Member
0 Likes
2,477

if its standard table.

from the code u have to modify.

this can be done using modify statement.

Read only

former_member217544
Active Contributor
0 Likes
2,477

Hi Surender,

When there is no maintanance generator then you need to do programatically. You can use UPDATE statement to edit that field.

UPDATE kna1

SET fieldname = <' new value '>

WHERE <for which record you want to update (you can use primary key for specifying teh record)>.

This statement will replace the old field value if any with the specified new value in SET condition.

Hope this will help.

Regards,

Swarna Munukoti.

Read only

bpawanchand
Active Contributor
0 Likes
2,477

HI

DATA :
  BEGIN OF fs_tab,
    name1 TYPE kna1-name1,
    land1 TYPE kna1-land1,
    ort01 TYPE kna1-land1,
  END OF fs_tab.
 
fs_tab-name1 = 'XYZ'.
fs_tab-land1 = 'IN'.
fs_tab-ort01 = 'Hyderabad'.
 
UPDATE kna1 SET name1 = fs_tab-name1 land1 = fs_tab-land1 ort01 =
fs_tab-ort01 WHERE kunnr  = '0000000001'.
 
IF sy-subrc eq 0.
 
  WRITE :
   / 'Updated'.
ENDIF.

Regards

Pavan

Read only

Former Member
0 Likes
2,477

Hi,

To update the data of any table, go to transaction SE16, start debugging /h and type &SAP_EDIT , it will take use to edit mode.

Esle.

Opern any record in SE16.Double click on the record of table,.

then start debugging by /h and type DELE and execute.

hope this helps,

thanx,

dhanashri.

Read only

Former Member
0 Likes
2,477

Hi Surender,

Dont play with standard Tables, its very easy to change a Customer Name....

Go to XD02, give the customer number and change what are all the details of the customer needs modification. Press Save to save the changes.

Regards

Karthik D

Read only

Mohamed_Mukhtar
Active Contributor
0 Likes
2,477

hi Surendar,

If the table has a table maintenance generator attached with it then use tran SM30/SE54 etc.

Otherwise SE16/SE16n etc.

Steps:SE16

Go to SE16 transaction

Give any table name and press Enter , Ex: MARA

Now execute (F8) this screen

Choose the record you want to manipulate and display (F7)

Go to Debug mode (/H) and press u2018Enteru2019 2 times

Change the value of the variable u2018CODEu2019. By default, it is 'SHOW'

Change the code value as 'EDIT' for modifications, 'INSR' for insert and 'DELE' for delete.

Steps:SE16n

Goto transaction SE16N

Give the table name

In command box write u2018&sap_editu2019 then press u2018Enteru2019

Press execute button

note : it is not advisable to edit standard table due to some reasons

With Regards

Always Learner