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

data insert in Ztable

Former Member
0 Likes
3,644

Hi Guys,

I new to insert data in the Ztable, can any one provide coding for this.

Table doesn't have the Table maintainence and it is not possible in SE16 directly also

Thanks,

Gourisankar.

11 REPLIES 11
Read only

Former Member
0 Likes
1,594

HI,

Check the help on command INSERT

Eg:

INSERT INTO TABLE ZTABLE FROM WORKAREA.

Bhupal

Read only

Former Member
0 Likes
1,594

Hi,

Try the following code to insert data into ztable.

{}data: itab type <ZTABLE>.

ITAB-Field1 = <some value>.

ITAB-Field2 = <some value>.

insert <ztable> from itab.

if sy-subrc = 0.

endif.{}

Regards

Kiran Sure

Read only

Former Member
0 Likes
1,594

Hi,

<copy&paste_removed_by_moderator>

Regards,

Bhaskar

Edited by: Julius Bussche on Aug 20, 2008 7:56 PM

Read only

0 Likes
1,594

Lets say you have all your data in an internal table ITAB.

Now code this..

LOOP AT ITAB.

ZTABLE- FIELD1 = ITAB-FIELD1.

ZTABLE- FIELD2 = ITAB-FIELD2.

ZTABLE- FIELD3 = ITAB-FIELD3.

modify ZTABLE.

endloop.

Read only

former_member194669
Active Contributor
0 Likes
1,594

use fm SE16N_INTERFACE after giving table name & import paramter I_EDIT = 'X'.

a®

Read only

narin_nandivada3
Active Contributor
0 Likes
1,594

Hi,

Refer to this link

After getting records into you internal table you do even like this..

Insert Ztable from Table <itab>

just check the help if necessary..

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm

Hope this would solve your issue.

Good luck

Narin

Read only

Former Member
0 Likes
1,594

Hi,

please check the following links

Regards

Manish

Read only

Former Member
0 Likes
1,594

Hi,

plz try this way :

data: itab type table of ztable with header line.

itab-fld1 = 'A'.

itab-fld2 = 'B.

itab-fld3 = 'C'.

append itab.

itab-fld1 = 'D'.

itab-fld2 = 'E.

itab-fld3 = 'F'.

append itab.

insert ztable from table itab.

hope this helps.

thanx,

dhanashri.

Edited by: Dhanashri Pawar on Aug 21, 2008 7:38 AM

Read only

Former Member
0 Likes
1,594

HI shankar,

First create an internal table with the data you require to insert in the z-table.

If this is the first time you are entering data in the z-table use APPEND and if the records have to be inserted based on some condition use INSERT <dbatab> .In this way you can insert the records in the z-table.

Best of luck,

Bhumika

Read only

Former Member
0 Likes
1,594

Hi gouri,

For inserting data into z table you need to write the following...

First create an internal table with work area having all those type of fields of z table.

data: begin of itab occurs 0,

nit1 type ztab-field1,

nit2 type ztab-field2,

....

....

end of itab.

itab-field1 = 12.

itab-field2 = 23.

MOVE-CORRESPONDING itab TO ztab.

MODIFY ztab.

Hope it will work.

Thanks.

Nitesh

Read only

Former Member
0 Likes
1,594

Answered