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

what is wrong with this UPDATE code...

Former Member
0 Likes
660

what is wrong in this code..

it is updating all the records of the table

UPDATE t001b CLIENT SPECIFIED

SET : frpe1 = uv_pperiod,

frye1 = uv_pyear,

tope1 = uv_npperiod,

toye1 = uv_npyear

WHERE mandt = sy-mandt

AND rrcty = '0'

AND bukrs = uv_bukrs

AND mkoar = ls_add_spec-mkoar

AND vkont = ls_add_spec-vkont

AND bkont = ls_add_spec-bkont.

Title was edited by:

Alvaro Tejada Galindo

4 REPLIES 4
Read only

Former Member
0 Likes
625

Pl make sure the values in thw WHERE clause are NOT blank/initial.. else your sitaution will occur ie ALL UPDATE..

Arya

Read only

Former Member
0 Likes
625

Hi,

can you please check the values before executing the UPDATE satatment, please check the valuesin the where condition, only those values will be updated ..

Regards

Sudheer

Read only

Former Member
0 Likes
625

Hi,

pls check whether values are passed in ls_add_spec-mkoar, ls_add_spec-vkont, ls_add_spec-bkont and uv_bukrs

because if these are blank then all rows in table will be updated.

syntax is:

update table set fld1 = wa-fld1 where fld2 = wa-fld2.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
625

what error u r getting?