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

performance problem

Former Member
0 Likes
532

i made this comma

DATA : zins LIKE ztable.

INSERT ztable FROM zins.

this takes a lot of time (se30)

why?????

5 REPLIES 5
Read only

LucianoBentiveg
Active Contributor
0 Likes
498

Try with:

INSERT INTO ztable VALUES zins.

Regards.

Read only

Former Member
0 Likes
498

hi rani,

INSERT dbtab FROM wa. or

INSERT (dbtabname) FROM wa.

Inserts one line into a database table. The line to be inserted is taken from the work area wa and the data read from left to right according to the line structure of the database table dbtab. Here, the structure of wa is not taken into account. For this reason, the work area wa must be at least as wide (see DATA) as the line structure of dbtab, and the alignment of the work area wa must correspond to the alignment of the line structure. Otherwise, a runtime error occurs.

If the database table dbtab or the work area wa contain strings, wa must be compatible with the line structure of dbtab.

When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).

The Return Code is set as follows:

SY-SUBRC = 0:

Line was successfully inserted.

SY-SUBRC = 4:

Line could not be inserted since a line with the same key already exists.

Example

Insert the customer Robinson in the current client:

DATA: wa TYPE scustom.

wa-id = '12400177'.

wa-name = 'Robinson'.

wa-postcode = '69542'.

wa-city = 'Heidelberg'.

wa-custtype = 'P'.

wa-discount = '003'.

wa-telephone = '06201/44889'.

INSERT INTO scustom VALUES wa.

Read only

Former Member
0 Likes
498

are you sure?????????

Read only

0 Likes
498

hi rani,

u can also give

DATA : zins LIKE ztable occurs 0 with header line.

INSERT ztable FROM table zins.

Read only

0 Likes
498

u can also add 'accepting duplicate keys' to avoid short dumps.