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

Modify DB table from internal table

Former Member
0 Likes
4,977

Hello All,

I am modifying my zDB table from my internal table.

but only the last record is inserted into it. Following is code I am using.

Kindly suggest where I am getting wrong.

Regards,

Dilip

CASE SY-UCOMM.

WHEN 'EXT'.

LEAVE PROGRAM.

when 'SAVE'.

modify zcostsheet from izcostsheet[].

ENDCASE.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,079

Hi dilip,

Use the below

Modify zcostsheet from table izcostsheet.

It should be

Modify <b>DBtable</b> from table <b>Itab</b>.

Thanks&Regards,

Siri.

8 REPLIES 8
Read only

Former Member
0 Likes
1,080

Hi dilip,

Use the below

Modify zcostsheet from table izcostsheet.

It should be

Modify <b>DBtable</b> from table <b>Itab</b>.

Thanks&Regards,

Siri.

Read only

andreas_mann3
Active Contributor
0 Likes
1,079

modify zcostsheet from table izcostsheet.

Read only

Former Member
0 Likes
1,079

modify zcostsheet from table izcostsheet.

is the correct syntax

Read only

Former Member
0 Likes
1,079

Hi,

use modify <dtable> from <b>table</b> <itab>

Regards,

Sakthi

Read only

Former Member
0 Likes
1,079

hi

try this

tables zcostsheet.

zcostsheet-field1 = ''.

zcostsheet-field2 = ''.

modify zcostsheet.

instead of <b>modify</b> you could also use <b>insert</b>

regards

Arun

Message was edited by: arun a v

Message was edited by: arun a v

Read only

Former Member
0 Likes
1,079

hi,

try this.

loop at izcostsheet.

modify zcostsheet from izcostsheet[].

endloop.

regards,

maheswaran.B

Read only

Former Member
0 Likes
1,079

hi dilip,

Use modify ztab from table itab.

Read only

Former Member
0 Likes
1,079

try this code snippet.

<b>loop at itab.

ztable-fieldname = itab-fieldname.

..

..

..

..

..

..

Modify ztable.

endloop.</b>

if you are adding a new record, go for

<b>Insert ztable</b>. instead of <b>Modify.</b>