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

insert data to my table

Former Member
0 Likes
804

Hallow I build a table In se11 and I wont to insert data from itab into my table how can I do that thankes

5 REPLIES 5
Read only

Former Member
0 Likes
570

For Programmatically

Use

<b>INSERT (database table name ) FROM table itab

or

MODIFY (database table name ) FROM table itab</b>

Do an F1 on the statements to get more info on them

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
570

You can simply use the INSERT statement in your program.

data: iztab type table of ztable with header line.

iztab-fld1 = 'A'.
iztab-fld2 = 'B.
iztab-fld3 = 'C'.
append iztab.

iztab-fld1 = 'D'.
iztab-fld2 = 'E.
iztab-fld3 = 'F'.
append iztab.


loop at iztab.
  insert iztab into ztable.
endloop.

Regards,

Rich Heilman

Message was edited by:

Rich Heilman

Read only

Former Member
0 Likes
570

So long as you have set maintenance allowed in SE11, you can create data directly in SE11 or SE16.

In SE16, press F5.

Rob

Message was edited by:

Rob Burbank

Read only

Former Member
0 Likes
570

hi,

to insert values in the table in SE11, you can use the INSERT or MODiFY statements.

the syntax is

INSERT (database table name ) FROM table itab

MODIFY (database table name ) FROM table itab.

data: itab type table of <table name>.

itab-fld1 = 'X'.

itab-fld2 = 'Y'.

append itab.

loop at itab.

insert itab into <table name>.

endloop.

hope this helps!!!

Read only

Former Member
0 Likes
570

Hi,

Remember to follow the below mentioned procedure when you try to insert records into a database table.

1. Always Lock the table before updating it.

Lock Concept in SAP

http://help.sap.com/saphelp_47x200/helpdata/en/41/7af4c5a79e11d1950f0000e82de14a/content.htm

2. Use the INSERT or MODIFY Command to insert records into the table.

Click the link below to know how to insert records into DB

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

b. http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3ac8358411d1829f0000e829fbfe/content.htm

3. Check SY-SUBRC after each Database update.

4. After all the records are updated COMMIT the database.

5. Unlock the table.

Regards,

Vara