Application Development 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: 

Insert Records into database table.

senthil_kumar29
Participant
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.

former_member202957
Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi,

Try this.

SORT itab.

DELETE ADJACENT DUPLICATES FROM itab COMPARING PRIMARY_KEY.

INSERT SPFLI FROM TABLE ITAB .

Reward if helpful.

Regards,

Ramya

Former Member
0 Kudos

Hi,

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

Former Member
0 Kudos

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

former_member202957
Contributor
0 Kudos

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.

0 Kudos

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

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

Cheers

Senthil