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

update to VBAK table

Former Member
0 Likes
1,674

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
Read only

Former Member
0 Likes
1,151

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

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

5 REPLIES 5
Read only

Former Member
0 Likes
1,152

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

Read only

0 Likes
1,151

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

Read only

0 Likes
1,151

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

Read only

Former Member
0 Likes
1,151

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>.

Read only

Former Member
0 Likes
1,151

can you try this FM VS_BT_VBAK_MODIFY