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: 

update to VBAK table

Former Member
0 Kudos

hi Gurus ,

i am facing a very strange problem

i have update couple of z fields in master table VBAK i am writing a normal update statements

but it is not updating the value of that field and setting the sy-subrc to 4 . i am passing just the vbeln in the where clause for updating.

can anyone suggest me why my updating failing.

thanks in advance

regarsd,

khushi

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Do you really want to update the VBAK table or do you want to update the vbak-structure in a USEREXIT ?

Did you encue the table ?

Greatings

Manuel

5 REPLIES 5

Former Member
0 Kudos

Do you really want to update the VBAK table or do you want to update the vbak-structure in a USEREXIT ?

Did you encue the table ?

Greatings

Manuel

0 Kudos

yes i have locked the table .. and i have to update the VBAk table ... i am writing a VBAK update .. but its fai;ing and setting sy-subrc to 4.

please tell me the problem why it is happening.

regards,

khushi

0 Kudos

Hi,

Can you post your code here so we can investigate more.

Also check the data that you are passing to VBAK. it may contain data that cannot be accepted by the table like same primary keys to other records.something like that.

Regards,

Leonard Chomi

Former Member
0 Kudos

Hi,

Try the both way to update the Db table.

1. 
DATA wa TYPE scustom. 

SELECT SINGLE * 
       FROM scustom 
       INTO wa 
       WHERE id = '00017777'. 


wa-discount = '003'. 
UPDATE scustom FROM wa. 

2. UPDATE VBAK SET Zfield1 = <value> ZFIELD2 = <Value> where VBELN = <VBELN>.

Former Member
0 Kudos

can you try this FM VS_BT_VBAK_MODIFY