Multi Main Table sessions

Introduction

A Multi Main Table (MMT) session is a combination of multiple sessions, each having their own main table.

MMT sessions are especially designed to present data with a typical parent-child structure, for instance:

  • Sales Order and the related Sales Order Lines
  • Financial Business Partner group and the related Ledger accounts and Control accounts
  • Work Order and the related Work Order activity lines, Work Order material resources, Work Order other resources, Work Order measurements, Work Order Hours accounting

Although this data is distributed among several main-tables in the system, it can all be presented and edited from within a single parent-child session.

This enables users to enter their data fast and to keep a good overview in their work.

A typical parent-child session has two areas: the upper part contains information and functionality about the parent. The lower part contains one or more lists that show data about the various types of children. Both parent data and child data may be edited inside the session, which makes the sessions extremely powerful for data entry. Apart from that, a parent-child session also gives the user a complete overview of all important data related to the object. The figure below shows an example of a parent-child session.

[...]
Sample parent-child sessions

Parent-child MMT sessions are available in various LN packages, for example:

PackageSession
ManufacturingProduction Order
ManufacturingGeneric Item – Structure
Order ManagementSales Order – Lines
Order ManagementSales Order Line – Deliveries
ServiceService Order – Lines
ServiceService Order Activity – Lines
ServiceMaintenance Sales Order
ServiceWork Order – Lines
FinanceMapping Scheme
FinanceLedger Mapping
FinanceDimension Mapping
FinanceFinancial Business Partner Group (Accounts Receivable)
FinanceFinancial Business Partner Group (Accounts Payable)
FinanceInvoice-Source Relation
Quality ManagementInspection Orders – Easy Entry
Quality ManagementItem – Storage Inspection
Object Data ManagementDocument Revisions – Easy Entry
Object Data ManagementChange Proposal – Easy Entry
ToolsTable Definitions
ToolsBusiness Objects

 

Header and satellites

A parent-child MMT session is actually an integration of multiple sessions into one single session. It consists of:

  • A header session: this is the upper part of the MMT session window. It contains information and functionality about the parent (e.g. about the Service Order, see the previous figure). The header is a single occurrence session.
  • One or more satellites (displayed as tabs) containing data and functionality for the various types of children, (e.g. for the activities, estimated materials and estimated labor). Each satellite is a separate session that is linked to the MMT header session. All satellites are multi occurrence sessions.

The header and satellites can also run stand-alone.

Header and satellites

Header and satellites

The header and lines in an MMT session are automatically synchronized: when you select a particular record in the header area, automatically the corresponding lines are displayed in the satellites. There is no synchronization between the satellites themselves.

A satellite tab only contains a grid. Additional fields outside the grid, (‘view fields’) are only displayed when the satellite runs stand-alone.

Example

When the Order Lines session runs stand-alone, the Order Number is displayed as a view field above the grid. However, when the session runs as a satellite in the Order MMT session, the satellite tab only displays the grid.

Developer guidelines

This section describes the prerequisites, possible issues and the procedure for creating an initial MMT header-lines session.

Prerequisites

You can only create an MMT header-lines session if:

  • There is a clear header-lines relation. Infor Enterprise Server only supports synchronization if each satellite is directly related to its header. For example: Sales Order Lines are directly related to the Sales Order Header through the Order Number field.
  • No synchronization is required between the satellites themselves.
  • The header has a single-occurrence representation. If it has not, it should be created first.
  • All satellite sessions you want to define have multi-occurrence representations. If they do not, they should be created first.
Possible issues

Before you start creating an MMT header-lines session, identify possible issues and development effort required to solve these.

Possible issues are:

  • Deep copy/delete
    The header of the header-lines session contains the Duplicate and Delete standard commands. In an initial MMT session, these actions only execute on the header. Functionality to automatically copy or remove the corresponding lines when a header is copied or removed, must be programmed separately. You can re-use already existing code to do this.
  • Implicit saves
    An implicit save means that a session and its contents are saved without a user action. An explicit save means that the user performs a (manual) "Save" action, e.g. by clicking Save on the tool bar or by selecting the Save menu item. In an MMT header-lines session, all data within each separate session is saved implicitly on each focus change from satellite to satellite, from header to satellite, or the other way around. For example, if a sales order is inserted and you switch the focus from the header to one of the satellites, the header is saved implicitly. To indicate that a save is being executed, a save icon appears in the lower right part of the session window. When you close the session while you modified data after the last implicit or explicit save, you will be prompted whether the changes must be saved. If you select No, this only undoes the changes after the last implicit or explicit save. While programming, be aware of this behavior. It can cause unreferenced data in the database, e.g. an order header without lines. You might consider programming either a way to remove this data directly when it is generated, or to build a session that cleans the database of these unreferenced entries.
To create an initial MMT session
Step 1. Create MMT header session

Start the Sessions (ttadv2500m000) session and create an MMT header session.

Points of attention are:

  • Select the Multi Main Table Window Type.
  • Specify a details session as Synchronized Dialog for the MMT header session. For example, specify the Order Header details session as synchronized dialog for the Order MMT header session. Users can start this session through the Details command in the MMT header session.
  • In the Label of Object field, select the label that must be used in the header session's menu items. Refer to Label of Object for details.
Step 2. Customize the MMT header session
  • Edit the form of the MMT header session. Only include those fields, which are most probably needed for entering a new record. All other relevant properties will be specified in the Synchronized Dialog. The synchronized dialog will be shown in a separate window.
  • Make sure that the MMT session will fit into Web UI. Web UI supports 1024x768, but since the sessions are hosted within Web UI, they should be a bit smaller. Try your session in Web UI to see if it fits. To maximize a ERP session within Web UI, press ALT+F11. That way you will see the session full screen.
  • The fields specified in the dynamic form of the MMT header session are displayed in the upper part of the MMT session, above the satellite tabs. By default these fields should be read-only. They should only be accessible when a new record is inserted in the header session. To achieve this, use 'add.set' in the program script.

For details on form editing, refer to Dynamic sessions and dynamic forms. For details on program scripts, refer to Program Scripts Overview and to the ERP Enterprise (LN) Programmer's Guide.

Step 3. Define Label of Object for each satellite

Edit the properties of each satellite session in the Sessions (ttadv2100s000) details session. In the Label of Object field, select the label that must be used in the satellite's tab description and menu items. Refer to Label of Object for details.

Step 4. Link satellites to MMT Header session

Link the desired satellites to the new MMT header session:

  • Select the MMT header session in the Sessions (ttadv2500m000) session, and subsequently, on the appropriate menu, click MMT Satellite Sessions.
  • The Satellite Sessions (ttadv3110m000) session is started. Specify the satellites that must be linked. Per satellite, you must enter the field relations that are used to synchronize the MMT header session with the satellite session:
    • For each variable to be synchronized, specify the name of the relevant field in the header's main table, followed by the name of the corresponding field in the main table of the satellite. For example: specify the Order Number field from the Order Headers table and the Order Number field from the Order Lines table.
    • You can use the Generate Field Mapping command to define a default field mapping, based on field names and domains. This generated field mapping is not always correct and complete!
Step 5. Create/modify program scripts and DAL scripts

The MMT header session and the satellite sessions are separate sessions. Therefore you have to define a program script (UI script) for each of them, and optionally modify the DAL scripts of the corresponding tables. Other session components, such as Reports, Text fields and Indices must also be defined per session.

When a satellite tab is activated the first time, the corresponding session is started and its startup-sections (before.program, after.form.read, init.group.1) are called as usually.

The program script of the satellite session can run in two modes:

  • Stand-alone mode
    This is the ‘normal’ mode; used when the session is executed as stand-alone session.
  • Satellite mode
    This is the special MMT mode. Use the is.mmt.satellite() statement to check whether a session is running as an MMT satellite session. You can program different behavior for the satellite mode if required.

In the satellite mode you can perform the following actions:

  • Hide fields
    Hide certain form fields since they are not relevant in the satellite mode. Note however that there is only one form for both modes and that you must define all fields, that you want to use in either one of them, in the form.
  • Enable/disable satellite
    Enable or disable a satellite within an MMT session in a particular case. The tab of a disabled satellite is still visible in the MMT session, but cannot be selected or accessed. To disable a satellite, use the disable.satellite() function, to enable it use enable.satellite(). You must call these functions from the global after.form.read section in the header session's program script.
  • Hide/unhide satellite
    Hide a particular satellite using the satellite.invisible() function. Advantage of this method is that you can still make the satellite visible at runtime (e.g. you can check authorizations and subsequently hide/unhide satellites for specific users). You cannot hide/unhide satellites dynamically based on the availability of data in a satellite.

For details on program scripts and DAL, refer to Program Scripts Overview, DAL 1 Overview, DAL 2 Overview and to the ERP Enterprise (LN) Programmer's Guide.

Label of Object

For both, MMT header sessions and satellite sessions, you must define the so called Label of Object. This label contains a generic description of the object within the session.

To define a Label of Object for a session:

  1. create a label in the Labels (ttadv1140m000) session
  2. link the label to the session: specify the label in the Label of Object field in the Sessions (ttadv2100s000) details session.
Label for Header session

For a Header session, you must define a single label. Points of attention:

  • The text should be a singular noun, e.g. "Purchase Order" (for the Purchase Order MMT header session).
  • The Context of Label must be Session, Table or Report Description.

The Label of Object is used in the Header session's menu-items to make explicitly clear on what object the menu-item-command executes. For example: the menu-item for inserting a new record in the Purchase Order MMT header session will be called New Purchase Order instead of only New.

Labels for satellite sessions

For a satellite session, you can create 2 labels with the same label code. One label is used in the satellite's menus, the other is used as the satellite's tab description.

Menu items

Points of attention for the label that is used in the satellite's menu-items:

  • The text must be a singular noun, e.g. "Order Line" (for the Purchase Order Lines satellite session).
  • The Context of Label must be Session, Table or Report Description.

This label makes explicitly clear on what object the menu-item-command executes. For example: the menu-item for inserting a new record in the Purchase Order Lines satellite session will be called New Order Line instead of only New).

Tab description

By default the session-description of the satellite is shown on the tab. When this description is not suitable, you must create a new label with the following properties:

  • The label code must be identical to the code of the other Label of Object.
  • The text must be a plural noun, e.g. "Order Lines" (for the Purchase Order Lines satellite session).
  • The Context of Label must be General Use.