09-16-2006 12:42 AM
Hello all,
I am trying to update a ztable which is having the following key fields.
1. MANDT
2. BUKRS
3. BELNR
4. GJAHR
I am moving some the following values in to the workarea 1st time.
110 200 0019000001 2006
Using MODIFY statement I am inserting this record into the ztable. Next I am trying to insert another record in to the ztable with the following values.
110 300 0019000001 2006
But this is not getting inserted into the ztable. I believe as long as the key combination is not same, it should insert a record in to a table using MODIFY statement.
Why is it not happening here? Any ideas?
Thanks,
09-16-2006 9:45 AM
Hi Somen,
Can you please try to use 'INSERT' inplace of 'MODIFY' and then let me know if it dumps during second instance of insert of the record you mentioned.
Regards
Nishant
09-16-2006 1:27 AM
Hi Somen,
I think if you use the MODIFY with correct workarea then it should insert.
This cases only happens when the system tries to do a key comparison using the characeter fields as the key.
Cheers
VJ
09-16-2006 3:19 AM
Hi Somen,
It is strange ...
There are two possibilities:
- If your custom table contains no line with the same primary key as the line/record to be inserted, MODIFY works like INSERT, i.e the line/record is added.
- If the custom tables already contains a line/record with the same primary key as the line/record to be inserted, MODIFY works like UPDATE, i.e the line/record is changed.
Can you double check the data for 110 300 0019000001 2006 in your custom table again?
Is it possible the custom table corrupted? Perhaps you may want to run database utitlity.
Hope this will help.
Regards,
Ferry Lianto
09-16-2006 4:24 AM
It's pretty hard to say without seeing the code. Would you please post it? Also let us know the return code after the modify.
Rogb
09-16-2006 9:45 AM
Hi Somen,
Can you please try to use 'INSERT' inplace of 'MODIFY' and then let me know if it dumps during second instance of insert of the record you mentioned.
Regards
Nishant
09-16-2006 3:31 PM
09-16-2006 6:12 PM
Sorry folks...my oversight. The MODIFY statement is works correctly but one the fields is been over written at some point. Hence the record is not getting inserted.
Thanks. Points awarded.