Liquid UI - Documentation - 4.02.09 Creating Lookup Data

4.02.09 Creating Lookup Data


As previously discussed, each Master Record is the primary object in any application. It is actually an array that holds the Addendums in the transaction. There can only be one Master Record transaction in any given application and each Master Record has the following pattern: 'APPLICATION_PATTERN_MASTER_ADDENDUM'.

This pattern specifies that in the application, the Master Record and the Addendums will be accessed through the Master Record - Addendum hierarchical pattern. Therefore, in our application, we created the Master Record as follows:

g_WorkOrderAppDesc.MasterRecord = { }; 

Since the MasterData creates only a data table, there are no screen-related objects included. Each MasterData contains only a TCode and a Database object. The TCode defines the transaction code for the MasterData table. All data that are required to appear on the lookup screen for that object are stored in the TCode data table. In our example, we used the following code:

g_WorkOrderAppDesc.MasterData.TCode = "conf";

The Database object is where the definitions that create the data table are in turn defined. Typically, these might include such things as the label that holds the display name of a field, the fieldname that contains the actual field name, the displaywidth that defines how wide the field appears on a screen and the fieldlength, which is the actual length of a field. In our example, we wrote the following definitions:

g_WorkOrderAppDesc.MasterData.Database = [
{label:"Order Type",fieldname:"m_ordtype",fieldlength:4,displaywidth:15},
{label:"Order Type Description",fieldname:"m_ordtypedesc",fieldlength:40,displaywidth:15}];

Can't find the answers you're looking for?