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

Database table not getting updated

Former Member
0 Likes
1,071

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 ??

8 REPLIES 8
Read only

Former Member
0 Likes
1,022

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...

Read only

0 Likes
1,022

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.

Read only

former_member848108
Active Participant
0 Likes
1,022

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.

Read only

0 Likes
1,022

Hi ozcan

I am using the insert command. So I think it should work.

Read only

former_member842213
Participant
0 Likes
1,022

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

Read only

0 Likes
1,022

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.

Read only

0 Likes
1,022

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.

Read only

Former Member
0 Likes
1,022

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