‎2007 Nov 15 11:02 AM
Hello, I can use
INSERT ZPEDIDOSCAB CLIENT SPECIFIED FROM TABLE IT_AUXCAB ACCEPTING DUPLICATE KEYS.
but it only insert one line.why??
SY-SUBRC = 4 AND SY-DBCNT =1. So only insert one row.
How can I change that?
Thanks
‎2007 Nov 15 12:09 PM
Hi Ana,
This may be the casue "If, for one or more of the rows to be inserted, a row with the same primary key or the same unique secondary key already exists and the ACCEPTING DUPLICATE KEYS addition is specified, the rows are not inserted and sy-subrc is set to 4. If, in this case, the addition ACCEPTING DUPLICATE KEYS is not specified, no rows are inserted. Prior to Release 6.10, this raises an exception that cannot be handled; as of Release 6.10, this raises the exception that can be handled CX_SY_OPEN_SQL_DB. "
Rgds,
Sandeep
‎2007 Nov 15 12:17 PM
Hi,
ACCEPTING DUPLICATE KEYS addition never inserts duplicate records into table it only avoids system dump when trying to insert duplicate.
reward if solved*
‎2007 Nov 15 12:30 PM
Hi,
How many records you got in IT_AUXCAB?
Only those many records will get inserting by deleting the duplicates.
Reward if it helps,
Satish
‎2007 Nov 15 2:28 PM