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: 

replace table entries

Former Member
0 Kudos

Hi,

I want to replace some old values with new values at table level.there are so many tables need to replace those values.that means i have 30 to 40 tables to replace.for this i want a report program .Can any one give me the idea.

Thanks in advance.

5 REPLIES 5

Former Member
0 Kudos

if you want to replace some standard table value then better option is to change it through Standard SAP Tcode so that it will automatically change the values in all corresponding tables...

if you want to change values in the custom table then design a report that will change these values

0 Kudos

Those tables are not standard one.only custom tables.So I need a custom program.Can any one give me the idea about this program.

0 Kudos

you need to select the data from the custom table make sure you select proper record from each table.... (compare all the key values)

make change in the record (i.e. in internal table) ... update the custom tables with these values

0 Kudos

can u give me the brief coding for this.means i want table name in the selection screen.so table of type what?.

Former Member
0 Kudos

Hi

this code may help u out try it

loop at itabline.

zg8_ekpo-ebeln = zg8_ekko-ebeln.

zg8_ekpo-ebelp = itabline-ebelp.

zg8_ekpo-matnr = itabline-matnr.

zg8_ekpo-menge = itabline-menge.

zg8_ekpo-meins = itabline-meins.

zg8_ekpo-netpr = itabline-netpr.

zg8_ekpo-waers = itabline-waers.

*Update the entries into item table

modify zg8_ekpo.

endloop.

here itabline is an internal table and zg8_ekpo is the custom table so first get the the values u want to modify into an internal table and then move them into the custom table the modify statement will do the rest

reward points if found helpful.