Guidelines for Modifying SAP Business One Data
SAP Business One gives you the power to customize the business flow easily. One of the easiest ways to do this is to run direct SQL statements on the SAP Business One database. We can always see Customers/Partners using several direct updates in some form of Add-Ons/TransactionNotification. However, it is not recommended to perform direct updates. Here are the top questions I get asked about modifying SAP Business One data:
Is it permitted to INSERT/UPDATE/DELETE on UDTs through SQL Scripts HANA Studio, SQL Management Studio, SDK DoQuery() method, Coding, B1if?
Direct updates are not allowed. It is ok for User Defined Tables (UDTs) of type [No Object & No Object with Auto. Increment] only.
Is it permitted to INSERT/UPDATE/DELETE on UDFs from System table through SQL Scripts HANA Studio, SQL Management Studio, SDK DoQuery() method, Coding, B1if?
No, it is not allowed for SAP Business One system tables.
Is it allowed to CREATE/ALTER/DROP in SAP Business One Database but not as UDTs?
It is not allowed to create tables in SAP Business One other than via SDK UDTs.
Below are some examples:
Is it allowed to use the following query: UPDATE OPOR SET Printed = ‘Y’ ?
Is it allowed to use the following query: UPDATE OPOR SET U_DSIC_ParentDoc = ‘1234’ ?
Is it allowed to use the following query: INSERT INTO [@DS_TESTUDT] ?
No, if UDT is registered for User Defined Object (UDO)
Yes, for UDTs of type [No Object & No Object with Auto. Increment] only.
These rules are described in the SAP Business One certification page:http://scn.sap.com/docs/DOC-8590 and specifically the Test Plan document:http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/206767e1-8f64-2c10-49ba-aeacbfdd528c?quicklink=index&overridelayout=true section 3.4 Modifying SAP Business One Data.
The same applies while doing all these modifications in SBO_SP_PostTransactionNotice and SBO_SP_TransactionNotification. Refer to SAP Note 1320484 for the same.