Skip to Content

How to update OINM table value

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 19, 2016 at 01:54 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 19, 2016 at 05:19 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2016 at 06:48 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2016 at 07:27 AM

    Dear Experts,

    Thanks for the information.

    Regards,

    Abdul Rasheed P

    Add comment
    10|10000 characters needed characters exceeded