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 with modify statement

Former Member
0 Likes
664

Hi

i am using the following statement

MODIFY ZDISPLAY FROM TABLE GT_OUTTAB. then my dbtable zdisplay is not updating only last record of gt_outtab. all records are not getting appended any commit statement i have to use before or after?

6 REPLIES 6
Read only

gopi_narendra
Active Contributor
0 Likes
640

make sure the int table GT_OUTTAB is of type ZDISPLAY only.

Regards

Gopi

Read only

Former Member
0 Likes
640

Hi srinivas

I think ur key value is same in urs internal table. u make one new key (in ztable & internal table) sr no. as a key field and incremant +1 in loop. urs problem may be slove. otherwise send me data & struct. of tables.

Thanks

Manish Kumar

Read only

Former Member
0 Likes
640

Hi kota,

1. Primary key

2. The modify statement,

will only modify

if the primary key combination of fields,

matches with that of work area.

3. If EXACT match is not found,

then it will automatically INSERT a new record.

4. Moreover, we have to use like this.

LOOP AT GT_OUTTAB.

MODIFY ZDISPLAY FROM GT_OUTTAB.

ENDLOOP.

regards,

amit m.

Read only

anversha_s
Active Contributor
0 Likes
640

hi,

tips

*********

1. gt_outtab should have the same structure of zdisplay

2.all the key combination shuld be there, if there is any chnage in the key field insdie the loop, it will insert a new record into the ZDISPALY.

3. use like this.

loop at gt_outtab.

modilfy zdisplay from gt_outtab.

clear gt_outtab.

endloop.

rgds

anver

if still problem pls let the forum know.

mark points 4 all hlpful answers

Read only

Former Member
0 Likes
640

hi srinivas..

give in loop.

loop at itab.

modify ZDisplay from table itab.

endloop.

Read only

Former Member
0 Likes
640

Hi Srinivas,

Adding to Anversha reply...

take care of key ...if you dont sepecify any then combination of all character fields will be taken as default key ..