How to create view and purpose in X3V9
View is virtual table and consists of rows and columns. View is good option when fetching the data from multiple tables in X3 and increase the performance at coding level.
View programming is similar to programming for a table and contains its own class.
The following steps are describing how to create view and use them in coding:
Development -> Data and Parameter -> Views
Write the either SQL or Oracle query based on data type is being used for X3.
Query has been written for testing purpose, which is for retrieving the data form ITMMASTER (Product table) and ITMFACILIT (Product-Site table) tables by using joins.
Once the query has been completed, we have to assign the fields in field table and make sure the number of fields in query and in tab are same. Data type should also be same.
We need to provide index code for view as well as for table.
Open the view using clalev function which is same for table as shown in following screen shot.
Once reading data from the view has been started, query will be executed and will load the data in to view automatically from database.
Ex: Displaying one record of data from both tables and displaying in info box.
Latest posts by Panni (see all)
- How to Check Numberof Records in the Table in Sage Enterprise Management (Formerly Sage X3) - December 12, 2018
- How to fix Unauthorised Journal on Invoice type Error in Sage Enterprise Management (Formerly X3) - October 31, 2018
- How to Change Length of Data Type in Sage Enterprise Management (Formerly Sage X3) - October 17, 2018