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

Problem in clear modify statement(urgent)

Former Member
0 Likes
698

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.

5 REPLIES 5
Read only

Former Member
0 Likes
668

Add

commit work.

after your MODIFY statement.

Regards,

Amey

Read only

Former Member
0 Likes
668

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.

Read only

anversha_s
Active Contributor
0 Likes
668

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

Read only

0 Likes
668

hi,

thank you very much.Above both the answers solved my problem.

thanks ravi and anversha.

regards,

Ashok

Read only

Former Member
0 Likes
668

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