2007 May 17 3:34 PM
Hi
I need a big help, I'm trying to insert 3 rows into ZTABLE with same keys (MANDT,FILENAME) but it's not possible, this is code line:
INSERT ZTABLE FROM TABLE IT_ZTABLE ACCEPTING DUPLICATE KEYS.How can I do?
Thanks in advance, It's URGENT
Regards,
Tokio.
2007 May 17 3:39 PM
Insert command will work like only new records..
if you have new records then it will insert on depends on primary key.
modify command will work both insert and update..
you can not insert primary key as duplicates..
Hi
I need a big help, I'm trying to insert 3 rows into ZTABLE with same keys (MANDT,FILENAME) but it's not possible, this is code line:
INSERT ZTABLE FROM TABLE IT_ZTABLE ACCEPTING DUPLICATE KEYS.How can I do?
Thanks in advance, It's URGENT
Regards,
Tokio.
2007 May 17 3:38 PM
Create another key field (SEQNO). Increase this by one for each file.
Rob
2007 May 17 3:55 PM
Rob
I put a field table (zdate) as key field, but I can't insert rows.
Tokio
2007 May 17 4:02 PM
Do it the way I suggested.
When you specify ACCEPTING DUPLICATE KEYS, it won't create new rows with duplicate keys; it just over-wrties the existing record. One way or another, you have to make sure the primary key is unique.
Rob
Message was edited by:
Rob Burbank
2007 May 17 3:39 PM
Insert command will work like only new records..
if you have new records then it will insert on depends on primary key.
modify command will work both insert and update..
you can not insert primary key as duplicates..
2007 May 17 3:42 PM
Use like this and then it works in normal way
create table like
mandt Primary key
Plant Primary key
date Primar key
count primary key ( you can count these values )
and other fields ( Non Primary key )..
Client Plant Request.dlv.dt count
300 1000 05/17/2007 001
300 1000 05/17/2007 002
300 1000 05/17/2007 900
300 1000 05/17/2007 901
300 1000 05/17/2007 902
300 1000 05/17/2007 903
300 1000 05/17/2007 904
300 1000 05/17/2007 905
300 1000 05/17/2007 906
300 1000 05/17/2007 907
300 1000 05/17/2007 908
300 1000 05/17/2007 909
300 1000 05/17/2007 910
300 1000 05/17/2007 911
300 1000 05/17/2007 912
2007 May 17 10:21 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |