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 Records into database table.

senthil_kumar29
Participant
0 Likes
5,642

Hello Friends,

I am trying to insert set of records from an Internal table into Database table.

INSERT SPFLI FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.

This is my statement. But It inserts only one record in to SPFLI table.

Cheers

Senthil

8 REPLIES 8
Read only

Former Member
0 Likes
2,922

hi,

Plz check ur internal table whether it contains any values..

After tht if it is ok,u ca insert using

Insert <db> from table <internal table>

Reward if useful

Read only

0 Likes
2,922

Use like that

INSERT <database table> FROM <internl table>.

COMMIT WORK AND WAIT .

I think it will work for u.

If u still have any queries pls let me know.

Read only

Former Member
0 Likes
2,922

Hi Sentil,

USE THIS STATEMENT.

MOVE-CORRESPONDING ITAB TO SPFLI.

SPFLI-MANDT = SY-MANDT.

MODIFY SPFLI.

thy this....

<b>reward if useful</b>

regards,

sunil kairam.

Read only

Former Member
0 Likes
2,922

Hi,

Try this.

SORT itab.

DELETE ADJACENT DUPLICATES FROM itab COMPARING PRIMARY_KEY.

INSERT SPFLI FROM TABLE ITAB .

Reward if helpful.

Regards,

Ramya

Read only

Former Member
0 Likes
2,922

Hi,

you can not insert duplicate entries into database table...check for the key set...

Read only

Former Member
0 Likes
2,922

Hi

Dont update SAP tables directly

it is not recommended

make use of BAPI or BDC to update

Z table can be modified using the insert or modify or update

Regards

Shiva

Read only

Former Member
0 Likes
2,922

hi,

check for ur primary keys it will not allow any dublicate values...so if you entries are dublicate so it ll not allow to insert any dublicate values in database table....

<b>reward if useful</b>

regards,

sunil kairam.

Read only

0 Likes
2,922

Hi.. My only primary key is Client (MANDT) field.

If I insert through work area its accepting only one record.

Cheers

Senthil