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

ABAP Code

Former Member
0 Likes
1,249

Hello friends,

I am changing data at the table level and am able to do it. owever just for Safety purpose We are planning to make the entire table data as a Backup.

when we change the data in tables and if something goes wrong we want to restore this data back.

Is there a automated way for this or

do we need to write the entire data at the Application server and restore it back if needed.

If we have to write a custom program for this then I would pass the Table name at the selection screen and the program should make a copy of it based on the table name at the application server.

Any Inputs.

Thanks,

Ster

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,205

Hi Ster,

Dont take any risks. Just follow what SAP says which is safe for all Check the following link for that

http://help.sap.com/saphelp_470/helpdata/en/0d/d304c54a0c11d182b80000e829fbfe/frameset.htm

Hope this help

//Kothand

9 REPLIES 9
Read only

Former Member
0 Likes
1,205

Hi,

Go for a interface programming ( BDC programming ). Record your process (SHDB) what your are doing and execute the BDC program by changing the Table name.

Hope that would work.

Regards

Narin Nandivada

Read only

Former Member
0 Likes
1,206

Hi Ster,

Dont take any risks. Just follow what SAP says which is safe for all Check the following link for that

http://help.sap.com/saphelp_470/helpdata/en/0d/d304c54a0c11d182b80000e829fbfe/frameset.htm

Hope this help

//Kothand

Read only

0 Likes
1,205

Hi Ster,

Meanwhile if its a one time activity you dont need a back up, just do the modification to the table and once done use the database utility (SE14) to adjust and activate the table with the Save Data radio button selected. This would make sure that you dont loose the existing entries.

But in case if you want to be doubly sure that youdont loose the entries, just download the data to a local file and in case if something goes wrong you could write a simple program to load the data into the table from the file.

//Kothand

Read only

0 Likes
1,205

Thanks All..

ANy More suggestions.

Ster

Read only

0 Likes
1,205

Is your are looking for ways to download ALL sap tables? or only some specific tables?

a®

Read only

0 Likes
1,205

Ars,

I am looking for only some specific tables. Also need to know to restore the tables that I have downloaded if needed. Just a back up plan.

Ster

Read only

0 Likes
1,205

Hi Ster,

Its me again.In that case, I can give you the easiest way

Just goto that table in SE11

check number of entries.

give that number in Maximum number of hits and execute

in the menu list goto Edit -> Download -> Unconverted or Spreadsheet format and give the local file path

You can easily upload the excel data into Database table using LSMW t-code which is very user friendly.

Now enjoy playing with the database table

Cheers

Kothand

Read only

0 Likes
1,205

Try this way.

call function RFC_GET_TABLE_ENTRIES' using selection

screen table name.

and use open dataset and transfer to app server.

For Upload:

data: begin of itab occurs 0,

datarec(2000) type c.

data: end of itab.

data: dref type ref to data.

field-symbols: .

a®s

PS : But this not right solution for backing up the tables in SAP

Read only

Former Member
0 Likes
1,205

Altering an SAP table data through any means other than SAP -provided transactions is very wrong and a questionable practice, since there is no auditing or logging of the changes, and there could be N-number of dependencies that are not known, but would need to be handled. Not recommended unless SAP is appraised of your situation and agrees altering table contents is the only way out.

If it is a Y/Z table , and is on which, by design, is customer-maintained and all dependencies are known and provided for, then it is permissible to change data. You would be writing a BDC call transaction to SM30 messages into message tab like bdcmsgcoll and running it as a batch input session. That way you would know all errors and reprocess what is needed. A programmatic download of table contents before the procedure is also recommended.