‎2006 Nov 01 6:06 AM
hi experts,
I have one z table.i fetch the data from ztable and i display it in the screen.In screen i change that data and i want to save that data in that table.How to do that.
my ztable structure is
year(key) customer(key) month(key) quantity1 quantity2 quantity3.
my select statement is.
select quantity1 from ztable into wa where customer = xxxx and year = xxxx and month =xx.
i put the fetched data in screen. in screen i did some calculation.After the calculation the quantity1 value changes.finally i want to save the changed data in the same ztable.
my query is .
modify ztable from wa where year = xxxx and customer = xxxx and month = xx.
the above queury is not working.
Please give me the solution for this
thank you,
regards,
Ashok.
‎2006 Nov 01 6:14 AM
‎2006 Nov 01 6:24 AM
Instead of using modify for database tables use update
update ztable
set quantity1 = wa-quantity1
where where year = xxxx and customer = xxxx and month = xx.
‎2006 Nov 01 6:43 AM
hi,
try this.
DATA <b>ztable_wa TYPE ztable.</b>
select <b>year customer month quantity1</b>
from ztable into <b>ztable_wa</b>
where customer = xxxx and year = xxxx and month =xx.
ztable_wa-quantity1 = new_quantity.
MODIFY ztable FROM ztable_wa.
rgds
anver
if hlped pls mark points
‎2006 Nov 01 7:38 AM
hi,
thank you very much.Above both the answers solved my problem.
thanks ravi and anversha.
regards,
Ashok
‎2006 Nov 01 8:16 AM
hi ashok,
Assign the screen field value to the z.table field as
z.table-field(s) = screen field(s)
then u use modify statement ,it will work