4

I'm trying to update the value of a BC field using a Business Service. While executing it I get the following error:

ORA-01407: cannot update ("SIEBEL".""."MODIFICATION_NUM") to NULL.

Since the Modification Num is a system field there is no chance that I would even touch that particular column. Not able to understand why this error is coming.

AJPerez
  • 3,435
  • 10
  • 61
  • 91
Priya
  • 51
  • 2
  • 4

9 Answers9

1

I think what is likely here is that your Service Write Record is invoking code on the Business Component that is running conditionally and then itself forcing a Write Record from the Business Component code. This could be done either explicitly on within the Business Component code or be done implicitly by some of the manner ways that script can interact with a component. Once this happens then the Service Write Record which is trying to increment the Modification Number by one can then will be unable to do so as this Modification Number is incremented by possible BC code and you get this error. To resolve I would check out the offending BC and comment out code on events like PreSetFieldValue, SetFieldValue, PreWriteRecord and the like and see if the error still occurs as an initial test. Then you will need to isolate the part of the BC code which is causing the error.

AlexC
  • 10,676
  • 4
  • 37
  • 55
0

You'll have to post the update statement you attempted to run, because the ora error is specifically for attempting to update a column value to be null when the column attribute defines the column as specifically not allowing null values in it.

OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
0

If you look at the MODIFICATION_NUM it will always increase by one each time the record is saved. I believe this is how Siebel detects if another user has modified the record. You can try this: Start updating a record, but don't save it yet. Log in as a different user from a different computer or just a separate browser window and update the exact same record, and save it. Now go back to the first user and try to save the record. You'll get an error message.

Anyways, if you create a new record, set MODIFICATION_NUM to 0. If you update a record, increase MODIFICATION_NUM by 1.

In general it would be advisable, though, to either use EIM or other officially supported means (Java Data Bean for instance) to update Siebel records.

Thomas Müller
  • 15,565
  • 6
  • 41
  • 47
0

Please check the user id that you are using ..usually if the write access isn't given for at the DB that id ..it might update modification_num with null

0

Chances are that either you have a mistake in your code (you must post a sample here to get any help with it!), there is something messed up in the configuration of the relevant Siebel Objects (check the underlying BC to see if someone has added config or code that causes the error), or this is a known bug in Siebel (search on Siebel SupportWeb).

Bhasker Pandya
  • 193
  • 1
  • 1
  • 7
0

The first step is to find the buscomp that's attempting to blank out your mod number. To do that you'll have to find the SQL that's updating the mod number (it'll be the one immediately before your error appears) and then find the buscomp running that SQL (from a ObjMgrSqlObjLog log entry immediately before the SQL). Turn both ObjMgrSqlLog and ObjMgrSqlObjLog events to 4 and reproduce your error, and that should give you what you're looking for.

Next, find the field (or fields) on the buscomp that's mapped to the MODIFICATION_NUM column.

Last, figure out what's clearing that field and fix it. Could be a script, integration point, workflow process, buscomp user prop, etc...

Good luck.

Mike M. Lin
  • 9,992
  • 12
  • 53
  • 62
0

Please check if the BC in question has a field mapped to modification_num column ( system column should never be added to custom fields) , or check if write record event itself is invoking a custom service that explicitly saves the record, which should throw a different error of the likes of "the record you are trying to modify has already been modified"

0

Probably you are using WriteRecord() two times in the same function or method. Can you please check it ?

Best Regards.

Alijohnn
  • 113
  • 1
  • 1
  • 7
0

A good guess is that you've mapped a custom field to MODIFICATION_NUM (which you should never do) and made this field active, either by code or in the UI. Check your BC for use of the MODIFICATION_NUM column.

andig
  • 13,378
  • 13
  • 61
  • 98