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

restore specific VBAP table values in development system

Former Member
0 Likes
1,586

Hello All,

Mistakenly, updated some VBAP values through update statement.

Actually i need to update 2 values in vbap table but i updated complete row .

so now the values are all are empty(20-30 values)

Can any one please tell me how to restore same values(20-30 field values updated) in VBAP standard table?

Regards,

Santhosh G

9 REPLIES 9
Read only

christophe_hu2
Participant
0 Likes
1,383

Hello,

I do not think there is a way to recover the lost data except if there is a back up of the database, you can ask the database admin.

tks.

Br,

Christophe

Read only

Former Member
0 Likes
1,383

Hi,

Please check change log tables CDHDR,CDPOS,BDCP,BDCPS and try to get old data and update

it using z program.Also please check if any idoc present for sales order you can get old data from IDoc's.

Thanks,

Sai Krishna

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,383

There is no "undo", sorry, but more important question is - why on earth are you updating VBAP values directly?

@sai - there are no change documents created when people do such bad things like direct table updates, just FYI.

Read only

0 Likes
1,383

Hi Jelena,

Yes i know no document log is created for direct table update but my suggestion was it will help in

recovering old data.

thanks,

Sai Krishna

Read only

0 Likes
1,383

But how would it help if it's not created? Even if order was changed (properly) before and there are any change documents, they would only capture limited information, i.e. old/new value for the changed field. Not even all changes trigger change documents. And when order is deleted (even through the transaction) then change documents only reflect the deletion fact. It does not capture all the data that was in the order when it was deleted.

Sorry, I just don't see a logic here... You might want to test this sometime just to see how limited is, in fact, the change log usefulness.

Read only

Former Member
0 Likes
1,383

Santhosh,

Inform this to your SD functional analyst, he/she needs to check for example only order was created, or subsequent documents (delivery etc.) were created; how to rectify this etc. and business needs to know, as it might impact them.

added: sorry, i overlooked that you did this in development system. my above suggestions were if this was done in production.

coming to your post, i suggest you do nothing! and take this as a learning, for the future.

TW

Message was edited by: TW Typewriter - added in blue

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,383

No SAP solution (*) are available, ask your database administrator for restore of data from a backup or use of some DB tool to remove journaled changes (depends on your database, version, and operating procedure)

NB: Restoring the whole development system will not make you popular with those who will lose their work for the day. Ask exploitation VBAP restore only the table (in another environment or by renaming it). You should then write a small recovery program (some native SQL may be required to access restored table).

Regards,

Raymond

(*) Except if table change log is active, and requires also that someone changed the technical setting of table VBAP before your wild SQL execution (very unlikely) so you could build a small report reading DBTABLOG...

Read only

Former Member
0 Likes
1,383

Hii Santosh,

Only solution is there first you delete the record from VBAP table and updated again but you have to check with SD consultant that it could make a business impact..

or else write a z program and update this two fields again.

but mainly you have do it after your business permit

Read only

Former Member
0 Likes
1,383

Hello,

Thanks for your suggestions.

Note : This is happend only in development system.

Regards,

Santhosh G