08-09-2007 7:57 AM
Hi everyone,
I have to update 2 fields in my table zsd47_loc_master. I have used 2 update stmts.. for each field. Is it possible to update the table using single stmt.. ?
UPDATE zsd47_loc_master SET capacity = capacity - 1
WHERE location = wk_location
AND status = 'A'.
UPDATE zsd47_loc_master SET status = 'P' WHERE location = wk_location
AND status = 'A'.
thanks in advance,
regards,
Stanley.
08-09-2007 8:14 AM
Try the following syntax
UPDATE zsd47_loc_master
SET: capacity = capacity - 1,
status = 'P'
WHERE location = wk_location
AND status = 'A'.
Regards
08-09-2007 8:01 AM
HI,
You can use a single statment ..
UPDATE zsd47_loc_master
SET capacity = capacity - 1
status = 'P'
WHERE location = wk_location
AND status = 'A'.
Regards
Sudheer
08-09-2007 8:01 AM
Hi Jose,
Yes, You can do this with the help : in ABAP and don't forget to put comma after setting a value to the field.
UPDATE zsd47_loc_master
<b>SET: capacity = capacity - 1,
status = 'P'</b>
WHERE location = wk_location
AND status = 'A'.
Check this link which has example
http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/update.htm
<b>Friendly Note:</b> You have many open threads and Plz close the threads if they are answered/solved and reward points to the people who are helping you.
Thanks,
Vinay
08-09-2007 8:03 AM
Use a single update statement.
UPDATE zsd47_loc_master SET: capacity = capacity - 1
status = 'P'
WHERE location = wk_location
AND status = 'A'.
Please mark points if the solution was useful.
Regards,
Manoj
08-09-2007 8:14 AM
Try the following syntax
UPDATE zsd47_loc_master
SET: capacity = capacity - 1,
status = 'P'
WHERE location = wk_location
AND status = 'A'.
Regards