‎2010 Jun 11 6:17 AM
Hi,
I am trying to update a Z-table in CRM. It has primary key of four columns. When I try to insert new record, ONLY SOMETIMES for few records it does not create new record, although it gives sy-subrc 0 on insertion. On repeating for same record many times it behaves same way, then as a last resort I have to create new entry manually.
What can be the reason for this ??
‎2010 Jun 11 6:31 AM
Hi,
If it is a Z-Table , u have to create a Module pool program then u create a trnasaction fro this....based on this transaction u can upload what ever the records...
‎2010 Jun 11 7:02 AM
But it does work fine for other records, only for a few records, it does not work. Please provide the reason not a workaround. Also, it woulld be a major change which would take time.
‎2010 Jun 11 7:49 AM
Hello Chitwanjit,
Do you use the "insert" or "modify" command to insert the new lines? If you are using the modify command, maybe some records are updated and there are fewer new records created than you have expected.
Hope it helps.
Ozcan.
‎2010 Jun 11 4:50 PM
Hi ozcan
I am using the insert command. So I think it should work.
‎2010 Jun 11 9:53 AM
U might be having the records in the internal table. Use Statement wait 2 seconds inside the loop after your insert
Edited by: san on Jun 11, 2010 2:24 PM
‎2010 Jun 11 4:51 PM
Hi San,
I have already put wait of 3 seconds. But for most records it does work, for some it does not. Is it that it might be open in some other t-code and there is lock on entry to be changed.
‎2010 Jun 14 10:35 AM
Hello Mr. Singh
Insert command is working fine in this case. Check for the few records that are not being updated, There might be duplicate entries in it.
When we are using the Insert command if the duplicate entries are there only one is updated and sy-subrc = 0 in that case.
‎2010 Jun 14 11:40 AM
Hi ,
Please read documentation for INSERT , it will behave differently when record with same primary key already aexists other than giving an error.
Rerards,
Uma Dave