12-17-2016 12:01 PM - edited 01-21-2024 9:45 PM
Dear Support Team,
I wand to update the Goods Receipt document posted on '2015-03-31' to date '2015-04-01'
I successfully updated Goods Receipt document posting date (OIGN & IGN1) through sql update query.
now I wand to update OINM table also to get correct inventory audit report.
While updating OINM table data by using this query '
UPDATE OINM SET DocDate = '2015-04-01 00:00:00.000' WHERE BASE_REF = 23 AND TransType = 59'
That time I am getting an error
Msg 4406, Level 16, State 1, Line 1
'Update or insert of view or function 'OINM' failed because it contains a derived or constant field.'
SELECT * FROM OINM WHERE DocDate = '2015-03-31 00:00:00.000' AND BASE_REF = 23 AND TransType = 59
UPDATE OINM SET DocDate = '2015-04-31 00:00:00.000' WHERE BASE_REF = 23 AND TransType = 59
Thanks & Regards,
Abdul Rasheed P
abdulrasheed.co.in@gmail.com
Dear Experts,
Thanks for the information.
Regards,
Abdul Rasheed P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is not advised nor it is recommended to use update/insert statements in the database. The queries can render the database inconsistent.
Also, you loose the support from SAP.
Please check Note 896891 regarding the support scope of SAP Business One.
Request to contact SAP Business One Support in case of any issue/corruption.
Regards,
Jitin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Firing DML statements on SQL is not recommended. You may loose SAP support.
And OINM is a view and not a table which is dynamically getting updated because of a query definition in the database.
Regards
Pradnya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdul,
Direct modifications to the SAP Business One tables can affect the integrity of the database & hence any such database will no longer be supported.
About your error with OINM, this occurs because OINM is not a table, is a view.
"A view is the result set of a stored query on the data, which the database users can query just as they would in a persistent database collection object. This pre-established query command is kept in the database dictionary. Unlike ordinary base tables in a relational database, a view does not form part of the physical schema: as a result set, it is a virtual table computed or collated dynamically from data in the database when access to that view is requested. Changes applied to the data in a relevant underlying table are reflected in the data shown in subsequent invocations of the view."
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.