Liquid UI - WS Reference Library

4.2.4 Maintaining Record Structures

We have created the basic outlines for a Master Record structure. Now we will need to define the structures associated with the Master Record and with its Addendums. There are several elements concerned. These are discussed in the following section.

  • Name: Each application and Addendum will have a unique name. In our example, the application will be named 'Work Order; the first Addendum will be 'Parts'. The code is as follows:
    g_WorkOrderAppDesc.Name = "Work Order";
    g_WorkOrderAppDesc.Addendum[0].Name = "Parts";
  • Pattern: The Pattern, as explained previously, differentiates a Master Record from an Addendum and also identifies what kind of screen is created for that Addendum. There two possible styles. For our Master Record screen, which will contain edit fields, lookup tables, checkboxes and radiobuttons, the following code would be used:
    g_WorkOrderAppDesc.Addendum[0].Pattern = APPLICATION_PATTERN_TABLE_STYLE;
    For the first Addendum, however, screen consisting of elements represented in table format, the following code would be used:
     g_WorkOrderAppDesc.Addendum[1].Pattern = ADDENDUM_PATTERN_NORMAL_STYLE;
  • Database Structure: Each record and Addendum contains a data table. The Master Record and Addendum screens are created from these data tables. An example of the data table for our Master Record is shown below:
    g_WorkOrderAppDesc.MasterRecord.Database = [  
    //Label Text for FieldName Definition Display width for Field length Should the field Should this control Is this field
    //EDIT control edit control and show in table use the same line shared in Addendum a hidden field?
    // table column control ? as its preceding control? transaction?
    {label:"Order",fieldname:"g_wo_no",displaywidth:8,fieldlength:10,showintable:1, sharedfield:1},
    {label:"Status",fieldname:"g_sys_status_info",displaywidth:10,fieldlength:30,hidden:1 },
    {label:"Grp_Div",fieldname:"g_planner_group_info_div",displaywidth:4,fieldlength:10, usesameline:1},
    {label:"Ctr_Info",fieldname:"g_Mn_Wk_ctr_info",displaywidth:8, fieldlength:10},
    {label:"Per_Div",fieldname:"g_person_responsible_info_div",displaywidth:10,fieldlength:10, usesameline:1},
    {label:"Pri_Info",fieldname:"g_primary_accType_info",displaywidth:3,fieldlength:10, usesameline:1},
    {label:"Equipment",fieldname:"g_Equipment_info",displaywidth:8,fieldlength:20} ];
  • Screen Structure: The screens may require pushbuttons to assist in transaction navigation, basic functionality or custom functionality. In our examples, we will enable create, change and delete functionality for each transaction in addition to the Addendum functionality already introduced. The create, change and delete functionalities we will add via these pushbuttons will create new screens for the specific transaction. These functionalities are indexed and must be in the same order. If a user wants to change these, he or she can do so by accessing the screen object. The code is as follows:
    g_WorkOrderAppDesc.MasterRecord.Screen = "Process Order|Create Order|Change Order|Display Order|Delete Order";g_WorkOrderAppDesc.Addendum[0].Screen = "@17@Add Parts|Create Part|Change Part|Display Part";
  • Tcode Structure: The Tcode defines the transaction code for the Master Record and for the Addendum screen. The Master Record and Addendum screens are generated from the data contained in this table. In our example, we will set the Master Record equal to the 'wkdr' tcode. The first Addendum will be set as the 'IW32' transaction. The code is as follows:
    g_WorkOrderAppDesc.MasterRecord.TCode = "wkdr"; 
    g_WorkOrderAppDesc.Addendum[0].TCode = "iw32";