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

updating database table - not working

Former Member
0 Likes
463

Hi ,

My database table 1 is having multiple data for a primary key

example :

table 1:

GLOBMATNR -> Primary key

WERKS --> non primary key -- multiple for globmatnr

MBLNR --> non primary key -- multiple for globmatnr

MBLPO--> non primary key --

BUKRS --> non primary key -- multiple for globmatnr

i m using below statement to make entry into the table.. but this insert is not working.. I stead of putting 30 entries its just inserting 1 entry..

Can any one help me in this..?

INSERT table1 FROM TABLE internal_table ACCEPTING DUPLICATE KEYS.

Edited by: neha gupta on Oct 29, 2010 1:25 PM

2 REPLIES 2
Read only

Former Member
0 Likes
416

Hi,

Hit F1 on ACCEPTING DUPLICATE KEYS. You will identify why it is inserting 1 line only. I hope the table is a custom table. For fields which can have multiple values, make it primary key.

In your example table, GLOBMATNR, WERKS, MBLNR could be primary keys if WERKS is in one company code only. If not add BUKRS also

Hope it helps

Sujay

Read only

Former Member
0 Likes
416

Moderator message - Please do not ask or answer basic questions or questions that are easily searchable - thread locked Rob