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

basic abap

Former Member
0 Likes
660

friends, i have ascenario where,the table vbuk

has all the entries in it, but now it was found

out that out of the whole table, one specific field of

a specific record, value was wrongly put as B instead of C.

now when i tried to change it through TMG ,

or directly , its not allowing me,

so i decided on changing it through zprogram, i thought of coding as follows,

please point out errors if any,

the main thing to remember is that, rest of the fields of that record are

very important and should not be touched.

data: begin of itab with header line,

vbeln type vbuk-vbeln,

wbstk type vbuk-wbstk,

endof itab.

itab-vbeln = 'xyz'.

itab-wbstk = 'C'.

append itab.

update vbuk from itab.

will it work or will it mess with the other entries.

thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
636

Yes it will work

5 REPLIES 5
Read only

Former Member
0 Likes
636

yes it will work.

Read only

Former Member
0 Likes
636

as u said 'one specific field of

a specific record'

that means u need not update all the records of the data base table

so see the below eg

eg: UPDATE <table name> SET: DISCOUNT = '003',

TELEPHONE = '0621/444444'

WHERE ID = '00017777'.

UPDATE SFLIGHT SET SEATSOCC = SEATSOCC + 3

WHERE CARRID = 'LH' AND

CONNID = '0400' AND

FLDATE = '19950228'.

Message was edited by:

vamsi reddy

Read only

Former Member
0 Likes
636

so if i code only one line like below it should work right?

***************

update table vbuk set wbstk = 'C' where vbeln = xyz.

Read only

0 Likes
636

Hi Saritha,

Yes. It would work.

Best Regards,

Ram.

Read only

Former Member
0 Likes
637

Yes it will work