JDE Development Guide
JDE Development Guide
Development Tools
PeopleBook
May 2002
EnterpriseOne JDE5
Development Tools PeopleBook
SKU JDE5EOD0502
All material contained in this documentation is proprietary and confidential to PeopleSoft, Inc.
("PeopleSoft"), protected by copyright laws and subject to the nondisclosure provisions of the applicable
PeopleSoft agreement. No part of this documentation may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, including, but not limited to, electronic, graphic, mechanical,
photocopying, recording, or otherwise without the prior written permission of PeopleSoft.
This documentation is subject to change without notice, and PeopleSoft does not warrant that the material
contained in this documentation is free of errors. Any errors found in this document should be reported to
PeopleSoft in writing.
The copyrighted software that accompanies this document is licensed for use only in strict accordance with
the applicable license agreement which should be read carefully as it governs the terms of use of the
software and this document, including the disclosure thereof.
PeopleSoft, PeopleTools, PS/nVision, PeopleCode, PeopleBooks, PeopleTalk, and Vantive are registered
trademarks, and Pure Internet Architecture, Intelligent Context Manager, and The Real-Time Enterprise are
trademarks of PeopleSoft, Inc. All other company and product names may be trademarks of their respective
owners. The information contained herein is subject to change without notice.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
Copyright (c) 1999-2000 The Apache Software Foundation. All rights reserved. THIS SOFTWARE IS
PROVIDED “AS IS’’ AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE
FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PeopleSoft takes no responsibility for its use or distribution of any open source or shareware software or
documentation and disclaims any and all liability or damages resulting from use of said software or
documentation.
Table of Contents
Fundamentals 11
Object Management Workbench.....................................................................11
Working with the Object Management Workbench ................................................. 14
Working with Projects .............................................................................................. 16
Working with Tokens ............................................................................................... 34
Working with Attachments ....................................................................................... 39
Data Dictionary................................................................................................41
Using the Data Dictionary........................................................................................ 44
Defining a Data Item ................................................................................................ 45
Data Dictionary Naming Conventions...................................................................... 47
Data Dictionary Naming Conventions...................................................................... 60
Table Design ...................................................................................................74
Adding a Table......................................................................................................... 75
Table Naming Conventions ..................................................................................... 77
Working with Table Design...................................................................................... 78
Working with Tables ................................................................................................ 82
Viewing the Data in Tables...................................................................................... 84
Business View Design.....................................................................................88
Table Join ................................................................................................................ 88
Table Union ............................................................................................................. 90
Select Distinct .......................................................................................................... 91
Indices ..................................................................................................................... 91
Adding a Business View .......................................................................................... 91
Working with Business View Design ....................................................................... 93
Data Structures ...............................................................................................103
System-Generated Data Structures ........................................................................ 103
User Generated Data Structures ............................................................................. 104
Working with Interconnection Data Structures ........................................................ 104
Creating a Data Structure........................................................................................ 107
Defining a Data Structure ........................................................................................ 112
Creating a Type Definition ....................................................................................... 113
Cross Reference Facility .................................................................................114
Caching 395
Understanding JDECACHE..................................................................................... 395
Working with JDECACHE........................................................................................ 397
JDECACHE Cursors................................................................................................ 404
JDECACHE Errors................................................................................................... 410
JDECACHE Example Program ............................................................................... 410
JDECACHE Standards............................................................................................ 422
Additional Features 427
Processing Options .........................................................................................427
Processing Options Templates................................................................................ 427
Defining a Processing Options Data Structure (Template) ..................................... 428
Attaching a Processing Options Template .............................................................. 436
Transaction Processing...................................................................................437
Commits and Rollbacks........................................................................................... 437
Understanding Transaction Processing................................................................... 438
Working with Transaction Processing ..................................................................... 441
Setting the jde.ini for Transaction Processing and Lock Manager .......................... 452
Record Locking ...............................................................................................460
Understanding Record Locking ............................................................................... 460
Currency..........................................................................................................461
OneWorld Currency Implementation ....................................................................... 462
Advantages.............................................................................................................. 462
Working with Currency............................................................................................. 462
Menu Design ...................................................................................................470
Understanding Menus.............................................................................................. 470
Working with Menus ................................................................................................ 471
Working with Menu Selections ................................................................................ 475
Working with Menu Selection Revisions.................................................................. 485
Tips of the Day ................................................................................................489
Working with Tips of the Day................................................................................... 489
Messaging 494
Message Types ....................................................................................................... 494
Understanding Error Handling ................................................................................. 495
Working with Error Messages.................................................................................. 502
Working with the Send Message System Function ................................................. 513
Batch Error Messages.....................................................................................523
Understanding Batch Error Messaging.................................................................... 523
Creating a Level-Break Message ............................................................................ 528
Debugging 543
Overview of the Debugging Process ....................................................................... 543
Interpretive and Compiled Code.............................................................................. 544
Working with the Event Rules Debugger................................................................. 544
Debugging Business Functions Using Microsoft Visual C++ .................................. 550
Working with the Visual C++ Debugger................................................................... 554
Debugging Strategies .............................................................................................. 556
Debug Tracing ......................................................................................................... 560
OneWorld Tools
The OneWorld Tools are an integrated set of application development tools. These tools
allow business analysts to develop complete interactive and batch applications, such as
forms and reports. The tools simplify the development process and limit the amount of
programming necessary to create applications.
OneWorld Tools also allow you to create applications for client/server environments using the
stability of J.D. Edwards methodology and the ease of the Microsoft Windows interface.
Fundamentals
Fundamentals covers the basic concepts and tools you need to know to start developing
applications. It includes the preliminary steps you must take before you actually design an
application. Fundamentals includes the following:
Application Design
Application Design includes the steps that you follow to actually design an application. It
describes different form types and controls.
Event Rules
Event Rules discusses using event rules and logic. It also describes how to use BrowsER.
Business Functions
Business Functions discusses both C business functions and named event rules. It also has
information about master business functions, Business Function Builder, and business
function documentation.
Caching
Caching describes how you can use caching for better performance.
Additional Features
Additional Features discusses additional features of the OneWorld development tools that
you can use to enhance your applications. It includes the following:
• Processing options
• Transaction processing
• Record locking
1
• Currency
• Menu design
Messaging
Messaging discusses error handling, interactive messaging, and batch messaging.
Debugging
Debugging provides information to help you debug your applications. It includes different
methods of debugging and strategies to help you.
Web Applications
Web Applications discusses designing and generating Web applications.
Performance
Performance discusses troubleshooting your application and addressing various performance
issues. It includes tips to help you develop better-performing applications.
Appendices
The appendices include information about software modifications and detailed information
about the process flow for different form types. The appendices include:
OneWorld Acronyms
Following are some acronyms that are commonly used in OneWorld.
APPL Application
DD Data Dictionary
ER Event Rules
2
OCM Object Configuration Manager
OL Object Librarian
Specs Specifications
TBLE Table
TC Table Conversion
WF Workflow
Understanding an Object
By industry standards, an object is a self-sufficient entity that contains data as well as the
structures and functions used to manipulate that data. In OneWorld, an object is a reusable
entity that is based on software specifications created by the OneWorld Tools.
A specification is a complete description of a OneWorld object. Each object has its own
specification, which is stored on both the server and the workstation. Some specifications
describe different types of objects. For example, the data structure specification is used to
describe a business function data structure, a processing option structure, and a media
object structure.
The OneWorld architecture is object-based. This means that discrete software objects are the
basis for all applications, and that developers can reuse the objects in multiple applications.
This use of objects (applications being broken down into smaller components) allows J.D.
Edwards to provide true distributed processing. Developers create the objects using
OneWorld Tools.
3
Examples of OneWorld objects include the following:
• Batch applications
• Business functions (encapsulated routines)
• Business views
• Data dictionary items
• Data structures
• Event rules
• Interactive applications
• Media objects
• Tables
Understanding an Application
An application is a collection of objects that performs a specific task. J.D. Edwards uses the
OneWorld Tools to build the following standard groups of related applications:
You might not need to use every tool to create an application; however, you always begin
your application development from the Object Management Workbench. For example, you
might not need to add or modify data items. If so, you can proceed to Table Design from the
Object Management Workbench. If one or more existing database tables already contain all
of the data items that you want to include in your application, then you can skip the step of
designing a table and proceed to Business View Design.
4
Understanding the Development Cycle
The following figure illustrates the software development cycle, showing relationships
between the tools.
5
Understanding How OneWorld Stores Objects
OneWorld stores objects in the following two places:
• Any machine (workstation or server) that runs OneWorld and stores replicated
objects
A copy (replicated) set of the central objects must reside on each workstation and
server that runs OneWorld. The path code indicates the directory in which these
objects are located.
You move objects between the server and workstation using the design tool for the specific
object type, and using check in and check out. When you create an object, it resides initially
on your workstation. Unless you check it into the server, it is available only to you. After you
check it into the server, it is available for other users to check out.
When you check out an object, all object specification records (a collection of data that
defines a OneWorld object) are replicated from the server to your workstation.
The OneWorld Object Management Workbench manages all objects. Developers use the
Object Management Workbench to check out objects from a central development
environment and copy the objects to their desktops. They can then use the tools to change
6
objects and check in the objects so that others can access the objects. Developers can
access only OneWorld Tools through the Object Management Workbench.
Data Dictionary
Just as a dictionary contains word definitions, the J.D. Edwards data dictionary is a central
repository that contains data item definitions and attributes. These attributes determine the
way in which a data item does the following:
• Appears on reports and forms (such as number of decimals and default values)
• Validates data entry within an application
• Assigns column and row descriptions
• Provides text for field-sensitive help
• Is stored in a table
The data dictionary is active because the changes that you enter in it are automatically
reflected in applications; you do not need to recompile the software to see the changes.
Table Design
A relational database table stores data that an application uses. You can create one or more
tables for use in an application. To create a table, select data items for the table and assign
key fields as indices for retrieving and updating data.
Table Design Aid creates a .H file. You use OMW to check this file into source.
Business views are the link between applications and data. A business view defines the data
items from one or more tables that an application uses. After you create the tables, select the
data items from one or more tables that you want to include in your business view. With
business views, you can select only the columns that you need in the application, which
increases performance by reducing the amount of data that must move over the network. For
example, from a table that contains all employee data, you can create a business view that
contains only employee names and addresses.
Form Design
To create an application, determine the type of form that your application requires, and
associate each form with a business view. To design forms, you add controls such as a grid,
edit fields, push buttons, and radio buttons.
7
Several standard form types have much of the required processing already established.
Examples include:
Find/Browse Used for inquiry forms, such as Work with Sales Orders.
Fix/Inspect Used to add or modify a single record. Sales Order Header is an example of a
Fix/Inspect form.
Header Detail Used to modify multiple records at a time (particularly on normalized tables). Sales
Order Detail is an example of a Header Detail form.
Headerless Used to modify multiple records in a table that is not normalized. Voucher Entry is an
Detail example of a Headerless Detail form.
Report Design
You use Report Design to create reports and batch processes. In Report Design, you design
sections instead of forms. To create a report, determine the data that you want to appear on
the report. Attach event rules that provide business logic, and specify processing options that
control the format, page breaks, report totaling, and how the report processes data.
Examples of reports and batch processes are:
• Sales Update
• General Ledger Post
• Trial Balance by Cost Center
• Invoices
• Table Conversions
• Financial Reporting
A business function is an encapsulated reusable routine that can be called through event
rules. This code can be written in most industry standard third-generation languages. You
use Business Function Design to write business functions to provide background processing
to handle specialized tasks that an application needs, such as specialized editing on a field.
Event Rules
Event rules are logic statements. You create event rules and attach them to events. Events
are activities that occur in an application, such as entering a form, exiting a field, exiting a
row, or initiating a page break on a report. Event rules process when the user or the system
initiates an event. Events are attached to controls, such as a particular field, the entire form,
the grid, or a report section.
8
You use event rules to create complex business logic without the difficult syntax that comes
with most programming languages. Examples of business logic that you can accomplish with
event rules include:
9
Processing Options
Processing options control how interactive and batch applications process data. You can
have several versions of the same basic set of processing options. Each version might have
one slight difference from another version. For example, you can use processing options to
do the following:
Menus
Menus are the entry point to J.D. Edwards applications and reports. To access an application
or report from a menu, it must be attached to a menu selection, and menu selections must be
attached to a menu. See the OneWorld Foundation guide for information about creating
customized menus.
10
Fundamentals
The Object Management Workbench (OMW) is the change management system for
OneWorld development. A change management system is vital to a productive development
environment because it helps organize a myriad of development activities and helps prevent
problems, such as when a developer intermixes components from different releases or when
multiple developers simultaneously change an object. OMW automates many of these
change management activities.
This unit discusses the OMW GUI. The configuration and logging systems are discussed in
Object Management Workbench Configuration in the OneWorld System Administration guide.
See Also
Configuring Notification Subscriptions in the System Administration documentation
for information about using the OMW to notify you when specific events occur
Projects
Projects are composed of objects and owners. All development of objects within OneWorld
must be performed within the context of a project. Usually, you must first create or choose a
project, add an object to it, and then you can work with that object. Typically, objects are
included in a project because they have been modified or created by a developer to complete
a specific task.
In addition to objects, users can be associated with different projects. In fact, before you can
add an object to a project, you must have been added to the project as a user in a role that
has permission to add objects. A user can be assigned to the same project more than once
with different roles. Projects may also contain other projects.
Default Project
The default project is your personal project that can be used for development and research. It
holds any miscellaneous development objects that you want to work with but that you have
not associated with a specific project. OneWorld creates a default project when you run the
OMW for the first time. OneWorld uses your OneWorld logon to name the default project.
11
Some objects, such as versions, menus, workflow data, and reports can be created and
edited outside of the OMW. Nevertheless, any changes that you make to these objects must
be tracked and managed. You use your default project to manage these objects. If you create
or access such objects outside of the OMW, these objects are added to your default project.
User Roles
Users must be assigned to a project before they can affect the project or the objects within
that project. When you add a user to a project, you also identify the role of the user within the
project. The user role defines the function of the user within the project organization and
might limit the user's access to certain OMW functions, depending on the allowed actions
associated with the role. User roles and their allowed actions are defined in the Object
Management Configuration application.
Note
Do not confuse user roles in the OMW with the concept of user roles as applied in other
components of OneWorld software, such as the ActivEra Solution Explorer. OMW roles
function independently of all other role-based systems in OneWorld.
Allowed Actions
Allowed actions are rules that define the actions that may be performed by a user who is
assigned to a user role at a given project status. An administrator uses the OMW
configuration application to set up these rules for each user role, object type, and project
status.
Tokens
Some objects use tokens to minimize the possibility of one user overwriting another user's
changes to an object. Projects hold tokens for an object, and each object has only one token.
You can check out an object only if your project holds the token for the object. In this way, an
object can reside in several projects, but can be checked out and in only by qualified users of
the project that holds the token. You can, however, allow other projects to share an object's
token, thereby allowing the object to be checked out and in by qualified users of one or more
projects. However, only one person can check out an object at a time.
Note
Only Object Librarian objects have tokens. See Object Librarian and Non-Object Librarian
Objects for more information about Object Librarian objects.
12
Object Management Workbench Interface
From left to right, the initial OMW form displays the following:
• The project window, which displays your projects and their related objects and users.
To view your current projects, click Find.
The following information describes how the color of an Object Librarian Object icon
indicates its status:
• Gray Object Icon with Checkmark: Another project holds the token for this object.
• Colored Object Icon (not gray): The project that contains the object holds the
token for this object.
• Colored Object Icon with Checkmark (not gray): The project that contains the
object holds the token for the object, and the object is checked out.
• Gray Object Icon: This object is not checked out and no project currently holds
the object for the token.
Non-Object Librarian Object icons do not vary in appearance.
• The center column, which contains action buttons that you use to perform actions on
a selected object. Available buttons vary based on your roles in the current project
and on the status of the project in which the selected object resides. When you first
launch the OMW, no buttons appear in the center column because you have not
selected an object.
13
• The information window, which displays a web site; project status and release
information; object or user information; and search results. Initially, the window
displays a web site or HTML page. The contents change based on your tab and
object selections. For example, when you select a project or an object in the project
window, the information window displays information about the selected project or
object. To return this window to its initial state, click News.
The OMW also allows control of some non-Object Librarian objects that are based on data
source rather than path code.
14
Understanding Project Life Cycle
This topic discusses a typical project life cycle from inception to completion. It includes steps
required by a SAR-based system. If you are not using a SAR-based system, some of the
following steps might not apply to you. Furthermore, depending on your business's software
development procedures, the steps that you follow and their order might vary from the
following process.
When you create a project with SAR integration turned off, you are automatically
added to that project in the role determined by your system administrator (usually, as
the Originator). You might want to add yourself to the project in other roles as well.
When you create a project with SAR integration turned on, the person who entered
the SAR is added to the project in the role of Originator.
See Adding Users to Projects for instructions for adding users to a project.
If you create a new object, drag and drop the object from your default project to the
project, when appropriate.
See Adding Objects to Projects for instructions for getting existing objects. Note that
getting an object is not the same as checking out an object.
When you attempt to check out an object, you will be successful if no other projects
hold the token for that object. If the token is available, it passes to your project when
you check the object out. If another project already holds the token for the object, you
can join a token queue to be notified when the token becomes available. See
Working with Tokens for information about how tokens work.
After checking out an object and modifying it, you can save your changes without
checking the object in. See Changing Objects for instructions for saving objects.
When you check an object in, the system might not release the token from the
project, depending on how the OMW has been configured. As long as your project
holds the token, another qualified user in your project can check the object out, but
users in other projects cannot. You can allow users in other projects to check out an
15
object by removing the object from the project (see Removing Objects from Projects),
by releasing the token (see Releasing Tokens Manually), by switching the token (see
Switching Tokens), or by sharing the token with another project (see Inheriting
Tokens).
In addition to projects in which you have a role, you can also view any other projects in the
system. You can search for projects based on a variety of criteria, including object.
Filtering Projects
You can choose to filter by user, role, and status the projects that appear in your project
window.
► To filter projects
• User
This field is required. When you launch the OMW, this field displays your ID. You can
also enter other user IDs in this field.
• Role
• Status
The range you enter in these fields is inclusive. To search for projects with a specific
status, enter the status code in both fields.
16
2. Click Find.
For projects on which you do not play a role, you can search by object or other criteria. If you
complete the filter fields in the project window before you perform a search, you can refine
the search based on the information that you enter in the filter fields.
Note
Searches are case sensitive. When you complete fields, verify that you enter your search
criteria using the commonly-accepted spelling and standard capital and lower case. If you
receive no search results, try different capitalization or spelling.
1. On Object Management Workbench, select Advanced Search from the Form menu.
2. If you entered a user ID on the previous form, the OMW Project Search & Select by
Project User form appears, and you can limit the search by completing the following
fields:
• User ID
• Role
• Project Status
To search for projects with a specific status, enter the status code in both fields.
The range that you enter in these fields is inclusive.
The OMW Project Search & Select form appears if you did not complete any of the
filter fields in the project window. These fields are unavailable on the OMW Project
Search & Select form.
3. Enter the desired criteria in the Query By Example (QBE) columns and then click
Find.
4. Choose one or more projects, and then click Select.
The projects that you chose appear in the project window.
17
► To search for projects by object
This search method places all of the selected projects directly in the project window.
1. On Object Management Workbench, select Search by Object from the Form menu.
2. Enter the desired criteria in the Query By Example (QBE) columns, and then click
Find.
3. Choose one or more projects, and then click Select.
18
► To create new projects
3. Choose how you want to create the project, and then click OK.
The option to create a project using a SAR is valid when SAR integration is enabled.
This form is unavailable if your system is does not use the J. D. Edwards SAR
system.
4. Click the Summary tab, and then complete the following fields:
• Project ID
J.D. Edwards recommends that you use the following format when you name
your projects: YYYzzzzz
• Description
• Type
• Severity
19
• Product System Code
• Release
5. Click the Dates tab, and then complete the following field:
6. Click the Category Codes tab, and then complete the following optional fields:
• Category Code 1 through Category Code 10
7. Click the Attachments tab, and then add optional text comments to document the
new project.
8. Click OK.
• Description
• Type
• Severity
• Product system code
• Release information
• Start date
• Planned completion date
• Category codes
• Text attachments
2. On Project Revisions, click the Summary tab, and then revise the information in the
following fields:
• Description
• Type
• Severity
• Release
3. Click the Dates tab, and then revise the information in the following fields:
20
• Date Started
4. Click the Category Codes tab, and then revise the information in the following
optional fields:
• Category Code 1 through Category Code 10
5. Click the Attachments tab, and then add optional text comments to document the
project.
6. Click OK.
Advancing Projects
After development is complete for all objects in a project, the status of the project must be
advanced to send the project through the development cycle. Changing the status of a
project might affect the allowed actions of certain roles. The OMW can be configured to allow
users, based on their roles, to perform specific actions when a project is at a specific status.
For example, a user who is assigned to a project in the role of developer might be able to
perform the following actions before the project is advanced: check out, design, and check in.
However, after the project is advanced to the next status, a developer might not be able to
perform any actions at all.
Changing the status of a project can also initiate actions, such as transferring objects in the
project and deleting from the system objects that have been marked for removal. You cannot
advance a default project.
► To advance projects
Note
Turn on the Validate Only option to validate the status change without actually
advancing the status of the project. This option allows you to verify that the project is
valid before attempting any object transfers. Any projects that are linked to it through
token inheritance are validated at this time as well.
4. Click OK.
If you did not turn on the Validate Only option, the system advances the project
status and initiates any required object transfers and deletions. Otherwise, the
system validates only the project status.
21
Use the OMW logging system to view any errors that occurred during the status
change. If you cannot advance the project, verify the following:
• Verify that all of the objects in the project are checked in. This includes objects in
projects that are inheriting a token.
• If you are using a SAR system, ensure you have completed all of the required
fields in the SAR.
See Also
Adding Objects to Projects
Moving Objects
Deleting Projects
When you delete a project, the system removes all objects and owners from the project. The
project is then completely deleted from the system.
If you delete a project that contains objects that are checked out, the system erases the
check-out on each object before deleting the project. If the project holds any tokens, the
system releases them at this time, as well.
► To delete projects
Creating Objects
You can create a variety of objects with the OMW, including:
• Applications
• Business functions
• Data structures
• Tables
• Business views
• Data and menu items
• User defined codes (UDCs)
• Workflow processes
This topic describes how to create objects in general.
22
See Also
OneWorld Enterprise Workflow Management documentation for instructions for
creating workflow processes
► To create objects
3. On Add Object, complete the fields as appropriate for the type of object you are
creating, and then click OK.
Depending on the object that you are creating, a design form might appear that
provides the functions that you need to design the object. For example, if you create
an interactive application, the Interactive Application Design form appears. Click the
Design Tools tab to access the buttons that launch Form Design Aid, Work with
Vocabulary Overrides, Work with Interactive Versions, and so on.
23
Searching for Objects
Conducting an efficient search is preliminary to adding objects to a project. You can search
for objects by category and type, or you can perform an advanced search and find objects
based on other criteria.
Note
Searches are case-sensitive. When you enter your search criteria, enter the commonly-
accepted spelling in standard capitals and lower case. If you receive no search results, try
different capitalization or spelling.
24
► To search for objects
2. Complete the following fields, and then click the button next to the Search field:
• Category
You can search a variety of categories. For example, to find a report, select
Object Librarian as the category because reports are Object Librarian objects. To
find a project, select OMW Project. To find a user, select Owners.
• Search Type
Valid choices for this field vary based on the category that you select.
If you set the search type to Object Name|Version Name, you can use the |
delimiter to specify a search suffix. For example, if the category is Object
Librarian and the search type is object name, entering R0008P|XJDE* displays
all XJDE versions of object R0008P.
• Search
Entries in this optional field must match the Search Type that you selected.
3. To search for objects based on criteria other than category, search type, and name,
click Advanced Search.
4. On Object Librarian Search and Select, enter the desired criteria in the Query By
Example (QBE) columns, and then click Find.
5. Choose one or more objects, and then click Select.
25
The objects that you selected appear in the information window. See Adding Objects
to Projects for information about moving objects to the project window.
Note
If you try to add an object to a project that already exists in that same project, the Release
Search & Select form appears because OneWorld allows you to modify the same object
across multiple releases.
This task can be used to add users to a project. You can also use this task to add a project to
another project.
See Also
Moving Objects for instructions for moving an object from one project in your project
window to another project in your project window
Checking Objects In and Out for instructions for checking objects out so that you can
modify them
Getting Object Specifications for instructions for downloading the specifications of an
object to your workstation without checking out the object.
► To add an object
1. On Object Management Workbench, click the project to which the object will be
added.
2. Find the object to add to the destination project by performing a search using the
Search tab in the information window.
See Searching for Objects for more information about performing searches.
3. When the search completes, on the search form, select the object to be added to the
destination project.
4. Verify that the destination project is highlighted in the project window. If it is not
highlighted, click it.
5. With the object to be added highlighted, click the Add Object or User to Project button
in the center column.
1. On Object Management Workbench, click the project to which the objects will be
added.
2. Find the objects to add to the destination project by performing a search using the
Search tab in the information window.
See Searching for Objects for more information about performing searches.
26
3. Verify that the destination project is highlighted in the project window. If it is not
highlighted, click it.
4. From the Row menu, choose Advanced, and then choose Add All Objects.
The system adds all of the objects that fit the search criteria to the project that you
selected in step 1.
27
Moving Objects
You can move objects from one project to another by dragging and dropping them. Both
projects and the object must be visible in your project window. This task can be used to move
users from one project to another. You can also use this task to move a project under another
project.
► To move an object
1. On Object Management Workbench, in the project window, click the object that you
want to move.
2. Drag the object over the target project and drop the object.
The system removes the object from the source project and adds it to the target
project.
1. On Object Management Workbench, in the project window, click the project that
contains the objects that you want to move.
2. From the Row menu, choose Advanced, and then choose Move Objects.
3. In the To Project field, enter the project to which you want to move the selected
objects.
4. On Move Multiple Objects Search & Select, click the objects that you want to move.
28
5. Click Select.
The system moves the objects from the source project to the target project. This
process might take a while, depending on the number of objects that you selected.
Deleting Objects
You can delete any object from the server that is defined for the current status. You can also
mark an object for deletion from its transfer locations upon project advancement or from its
current save location (the location where the system saves the object when you click the
Save button in the center column of the OMW).
You can also use this task to remove the specifications for Object Librarian object from your
workstation.
When you select Delete Object from Server for a non-Object Librarian object, the system
deletes the object from locations that are defined in the transfer activity rules when you click
OK. If you select Mark Object to be Deleted from Transfer Locations, the system deletes the
object from any other configured locations when the project advances.
For an Object Librarian object, you can delete the local and save specifications. If the Object
Librarian object is checked in, you can delete the checked-in version of this object by
selecting Delete Object from Server. If you select Mark Object to be Deleted from Transfer
Locations, the Object Librarian object is deleted from its transfer locations, which are defined
in the transfer activity rules when the Project Status is advanced.
► To delete objects
3. Select one or more of the following options, and then click OK:
• Delete Object from Server
Click View Locations for a list of locations from which the object is deleted when
you select this option. This action occurs as soon as you click OK.
29
• Mark Object To Be Deleted From Transfer Locations
Objects marked to be deleted from transfer locations appear in bold letters in the
project window. They are deleted from the transfer locations when the project
status is advanced.
The Get button allows you to get the specifications for objects that reside in your path code
only. However, you can download the specifications of an object that resides in other areas of
the system as well. For example, you might want to get the specifications for an object as it
existed in a previous software release. Use the advanced get feature to specify the location
of the object that you want to download.
Note
If you want to review the object and not save any changes, use the Get button to copy the
latest specifications to your local workstation instead of checking out the object and then
erasing the checkout.
Check in an object when you want to upload its specifications to the server and make it
publicly available. When you check in an object, the system records the project in which the
object resides and ensures that only changes made under the current project are transferred
when the project is advanced to a status that triggers a transfer. If you move an object from
30
one project to another using the drag-and-drop method, the system tracks the change and
records the new project for the object. However, consider the following scenario:
If an object is checked out, you can erase the check out. When you erase a checkout, local
changes are not uploaded to the server. Erasing the checkout for an object does not release
its token, but it does allow other developers who are assigned to the same project to check
out the object.
See Also
Working with Tokens
Note
If the object is unavailable, the system asks if you want to be added to the token
queue for the object. If you choose to join the queue, the system alerts you when the
token is released and assigns the token to your project. To determine which project
holds the token for an object, select the object in the project window and click the
News/Status tab in the information window. Additionally, if you have joined a token
queue, your position in the queue appears here.
► To check objects in
31
► To erase checkouts
Changing Objects
When you create an object using the Object Management Workbench (OMW), the OMW
allows you to define the properties of the object. The OMW also provides access to design
tools and system actions for the object. Similarly, after the object has been created, you can
use the OMW to modify the object and its specifications.
Your system administrator can also specify a separate save location that is different from
your local environment and from the location of the object on the server. Save objects to this
location by selecting the object and clicking the Save button in the center column. Retrieve an
object from its save location by selecting the object and clicking the Restore button in the
center column. Note that the save location for the object must be different from its system
location.
You must check out the object before you modify it to be able to check the object back in and
upload the changes.
As users modify objects, the changes exist only in their local environments until they either
save the object to its save location or check in the object to its system location.
► To change objects
3. Make the necessary changes to the object, and then click OK.
Caution
Changing and maintaining objects in multiple releases can cause problems due to OneWorld
object interdependencies. Changing an object in one version and then updating the object in
another version to match might cause dependent objects to malfunction.
32
Before You Begin
Determine the paths of the objects that you modify initially.
1. On Object Management Workbench, choose Advanced from the Row menu, and
then choose Change Release.
2. On the Release Search and Select form, click Find.
All available releases for which the object can be added to the project appear.
3. Click the release that you want, and then click Select.
The object is added to the project for the selected release level.
7. Check in object B.
33
► To update different objects in different releases
The following three actions are allowed while your project holds the token:
• Allow another project to inherit the token. This forces both projects to be advanced
together as if they were one project and allows multiple corrections to a project to be
applied to a single object. No matter how many projects have inherited the token,
however, only one user at a time can check out the object. For a project to
successfully inherit a token, the target project must be at the same status as the
source project.
• Switch the token to another project. After the token is switched, the project that loses
the token will be placed in the token queue as the first project that is waiting for the
token. When you configure the OMW, token switching should be restricted to a
specific user role so that you can maintain object security.
• Release the token. An owner on the project can give up the token and allow the next
project in the queue to receive it.
The Object Management Workbench might have been configured to release tokens for
different object types at different project status levels. Therefore, all object types might not
give up their tokens during the same change in project status.
When a project has a token, the token stays with that project until the project advances to a
status that is configured in the activity rules for release of the token or until it is switched or
released manually. When the token is released, the next project in the token queue is notified
and assigned the token. Each Object Librarian object has one token per release.
34
If you join a token queue and then decide later that you do not need the token, remove the
object from your project to relinquish your position in the queue.
See Also
Inheriting Tokens
Inheriting Tokens
Token inheritance can be useful when developers have the same object in multiple projects
for which they would like to implement changes simultaneously, without having to wait for
other projects that are holding the token to progress through the project life cycle.
To inherit tokens, both the project holding the token and the inheriting project must be at the
same project status. After a token is inherited, these projects will be linked and will
automatically advance in project status together. Therefore, if the project status of one project
is advanced, the project status of its linked project also advances. If one or more projects are
linked through token inheritance, ensure that all development in the linked projects is
complete before you advance the projects. The user who is attempting to advance the project
must be assigned a role that permits this action in all of the linked projects, or the advance
attempt will fail.
All project advancement requirements must be met for all projects that are linked through
token inheritance; if one project fails to advance, OMW does not advance any of the other
linked projects. If an advancement failure occurs, review the logs for all of the linked projects
to determine where the errors occurred.
► To inherit tokens
1. Attempt to check out an object for which another project holds the token.
The system asks you whether you wish to enter the token queue for the object or
inherit the token.
Switching Tokens
A project owner whose role allows switching tokens might take the token from the project that
currently holds it and assign it to another project. Switching tokens might be necessary when
you need to make an emergency change. If a change in another project needs to be
35
implemented to an object in your project, you can switch the token to the other project to
allow the change.
Note
After the token has been returned, the user from whom the token was taken can save the
object, check the object out, and then restore the object to return the object to its previous
state before switching. However, the user must manually implement any changes made
during the switch.
To switch a token, you must be an owner in both the holding and the requesting projects.
Your role in both projects must be one that allows the action, switch token, at the current
status of the project and for the object type.
► To switch a token
1. On Object Management Workbench, select the object that has the token that you
want to switch.
2. Click the Switch Token button on the central column.
3. On Project Token Queue Search and Select, click Find.
A list of projects in the token queue appears.
4. Choose the project to which you want to give the token, and then click Select.
The current token owner should save the object before you switch the token.
See Also
Understanding the Token Queue
Advancing Projects
1. On Object Management Workbench, either erase the check-out or check in the object
that has the token that you want to release, if appropriate.
2. Select the object, and then click the Release Token button in the center column.
36
Searching for Users
Conduct an efficient search before you add users to a project. You can search for user
names or Ids, or you can perform an advanced search and find users based on their class or
group.
Note
Searches are case-sensitive. When entering your search criteria, enter the commonly-
accepted spelling in standard capitals and lower case. If you receive no search results, try
different capitalization or spelling.
• Search Type
• Search
Entries in this optional field must match the search type that you selected.
37
You can use | to specify a search suffix. For example, if the category is Owners
and the search type is Address Book#|Search Type, entering *|E displays all
entries in the Address Book with a search type of E for employee.
• Search Type
3. Click Advanced Search.
4. On OneWorld User ID Search and Select, complete one or more of the QBE columns
and click Find.
5. Choose the users that you want, and then click Select.
1. On Object Management Workbench, click the project to which you want to add the
users.
2. Set up a list of users to add to the destination project by performing a search using
the Search tab in the information window.
See Searching for Users for more information about performing searches.
3. On the search form, select the user to be added to the destination project.
4. Verify that the owner's node in the destination project in the project window is
highlighted. If it is not highlighted, click it.
5. With the user to be added highlighted, click the Add Object or User to Project button
in the center column.
6. On Add User to Project, complete the following fields, and then click OK:
• Role
• Lead
Note
To add a user in more than one user role, repeat the add user procedure and select
a second user role for the same user. Different functions are enabled for different
38
user roles, according to their allowed (user) actions. These actions are configured by
the administrator for your project using the configuration program of the OMW.
• User Role
• Estimated Hours
• Lead
1. On Object Management Workbench, select a user (owner) in the project window, and
then click Select.
2. On Project User Details, complete the following fields, and then click OK:
• User Role
• Project Lead
• Estimated Hours
See Also
Media Object Attachments in the OneWorld Foundation documentation for
information about adding and working with attachments
Media Objects and Imaging in the System Administration documentation for
information about enabling media objects
Creating a Media Object Data Structure
39
Processing Media Objects
40
Data Dictionary
Just as a dictionary contains word definitions, the J.D. Edwards data dictionary is a central
repository that contains data item definitions and attributes. A data item identifies a unit of
information. The data item definition defines how the item can be used and includes
information such as the type of item and its length. The data item attributes determine how a
data item does the following:
• Appears on reports and forms (such as number of decimals, and default values)
• Validates data entry within an application
• Assigns column and row descriptions
• Provides text for field-sensitive help
• Is stored in a table
The data dictionary is dynamic. That is, any changes that you make to a data item are
effective immediately for all applications that include the data item. Applications access the
data dictionary at runtime and immediately reflect modifications to data item attributes, such
as field descriptions, column headings, decimals, and edit rules.
Use the data dictionary to create, view, and update attributes for data items. You can copy a
data item that has similar attributes and modify it for your specific needs. This method might
be quicker and easier than creating a new one. If you do this, you must modify the alias to
distinguish between the copy and the original.
41
When you change a data item, the changes are immediately reflected throughout the
OneWorld tools at runtime. Changing the type and any of the attributes might affect how your
data is stored and cause discrepancies between records.
Caution
The data dictionary does not verify whether a data item is used by an application when you
delete it. If you delete a data item that an application uses, the application will fail.
• Display Decimals
• File Decimals
• Alpha Description
• Data Type
• Size
• Glossary
• Allow Blank Entry *
• Upper Case Only *
• All Triggers *
• Row and Column Headings *
42
The application retrieves field information from the data dictionary. Fields marked with an
asterisk (*) can be overridden in Forms Design and Report Design. In these instances, the
application retrieves the overrides, if any exist.
After a data item is created, you can change only the alpha description; you cannot change
the data item and alias. When you add a data item, the data dictionary edits the data item
and alias fields to ensure that they are unique.
See the Development Standards Application Design Guide for naming standards.
• The central object data dictionary is stored in a relational database. All changes to
the data dictionary that will be replicated a must be done here.
• The replicated data dictionary allows each workstation to have a set of data
dictionary tables stored in specification tables on the client machine.
Data dictionary items reside on enterprise (logic) servers in relational database tables.
Workstations retrieve from the publisher data dictionary (the relational database tables) only
those data items that are necessary for the applications that you are using. This replication
occurs when you use an application for the first time after installing OneWorld. This data
dictionary information is stored on your workstation in a permanent cache under the same
local path code and spec directory as the following global tables:
If you are using OneWorld and World coexistence, you must maintain two data dictionaries.
You cannot share one dictionary because, in World, the $ is reserved for business partners
and is used for the beginning of an alias. The $ does not compile and thus cannot be shared
with OneWorld. Some of the file formats in World and OneWorld are also different.
See Also
Data Dictionary Administration in the System Administration documentation
43
Glossary Items
Glossary items are items that cannot be attributes in tables. Glossary items are typically used
as information messages.
Error Messages
Error messages used in OneWorld are stored as data items. Use the data dictionary glossary
item application to display error messages because you do not need to use all the fields
required for regular data items.
44
► To use the data dictionary
From the Data Dictionary menu (GH951), choose Work With Data Dictionary Items
(P92001).
1. On Work With Data Items, complete ant of the following fields, and then click find.
• Search Description
• Data Item
• Description
• Alias
• Glossary Group
• System Code
45
Creating a Data Item
Data dictionary items are the building blocks of OneWorld objects. You create data dictionary
items so that they can be used as fields on a form of an application, columns in a table, fields
in a business view, members of a data structure, fields on a UBE, and so on.
46
► To name a data item
• Data Item
• Alias
• Glossary Group
If you are creating a data item for use in both WorldSoftware and OneWorld, separate
limitations and considerations are required that are not addressed in detail in this guide.
The data item name forms the C-code data name (for example, AddressNumber) that is used
in business functions, data structures, and event rules.
When creating a J.D. Edwards data dictionary item, do not use a Y or Z in the first character
of the data item name. Y and Z are reserved for Partners in Development business partners.
(J.D. Edwards data items beginning with Y or Z might exist because they were created before
the B73.2 release of OneWorld. These items will remain J.D. Edwards items.)
Blanks and the characters % & , . + are not allowed as part of the data item name in
OneWorld.
You can also identify a data item by its alias or alpha description.
After you add a data item, you cannot change its name.
The data item name can be a maximum of 32 alphanumeric characters, and it uses the
following format:
Ysssdddddddddddddddddddddddddddd, where:
Y or Z designates an external data dictionary item and is the first digit of any J.D.
Edwards-assigned external system code.
47
sss is the system code number. This number is either 55xx through 59xx for
enterprise-level development of new modules, 60xx through 69xx for J.D.
Edwards custom development, or another number that the Partners in
Development system administrator assigns.
The data item alias is used in searches, database routines (application program interfaces
used in business functions), and Table Design when you create a table. For each table, a
prefix is added to the alias, which makes it unique to this table. For example, ABMCU
indicates that MCU is within the Address Book table (P01012).
When assigning an alias, do not begin the alias with TIP or TERM. Aliases that begin with
TIP are reserved for OneWorld tips information; aliases that begin with TERM are reserved
for term glossaries that are included in OneWorld guides.
Blanks and the characters % & , . + cannot be included as part of the data item alias in
OneWorld.
You can also identify a data item by its data item name or alpha description.
After you add a data item, you cannot change its name or alias.
Ysssdddd, where:
Y or Z designates external data dictionary item and is the first digit of any JDE-
assign external system code.
sss is the system code number. This number is either 55xx through 59xx for
enterprise-level development of new modules, 60xx through 69xx for J.D.
Edwards custom development, or another number that the Partners in
Development system administrator assigns.
48
► To define general information
• Description
• System Code
• Data Type
• Control Type
• Row Description
This description is for the base language only, unless you update the description
for another language.
• Column Title
This description is for the base language only, unless you update the description
for another language.
• Size
• File Decimals
49
• Display Decimals
• Class
• Item Occurrences
Item occurrences is used for arrays. It allows you to create an item as a child of
another item. The data dictionary verifies that attributes are consistent between
the parent and the child. If you change the parent item, the changes are
duplicated in the child items. The data item names use the parent data item
name and a number, such as a parent item ABC and child items ABC1, ABC2,
and so on.
• Row Security
• Auto Include
• Do Not Total
1. On Data Item Specifications, click the appropriate tab to attach any of the following
applicable triggers to a data item:
• Default Value
• Visual Assist
• Edit Rule
• Display Rule
• Next Numbers
• Smart Field
Although you can override any of these triggers in Forms Design in the Edit Control
Properties, you should anticipate how they will be used most often.
A default value trigger automatically inserts a specified default value in a field when the
following conditions are met:
50
• Control is exited
• Dialog is initialized
You use the default value trigger for fields in which the default value is appropriate in almost
every situation. If a value is passed to this field through a processing option, business
function, form interconnection, or data structure, or if the user enters a value, this default
value will not be used.
• Default Value
51
► To attach a visual assist trigger
• No Visual Assist
• Calculator
• Calendar
• Search Form
3. If you click Search Form, click the Browse button to select the form that you want to
access for valid values.
52
If you attached a Search Form assist trigger, at runtime when you click the Search
Form flashlight button, the selected form appears. You can enter search criteria and
return with a valid value. These Search and Select forms are based on files, not UDC
tables.
You use edit rule triggers to validate field values based on business functions or rules. For
example, you can define a rule that does the following:
53
3. If you clicked the Business Function option, click the Browse button to choose from
available business functions.
Create the business function if it does not exist.
54
4. Choose the desired business function.
Read the Attachments to learn what each function does.
5. If you clicked the Rule option, click the flashlight button to choose from the available
rules.
These rules can include user defined codes such as:
EQ Equal
GE Greater or Equal
GT Greater
LT Less Than
NE Not Equal
RANGE Between
55
VALUE In a List
You use a display rule trigger to format data. You attach a display rule trigger based on either
a business function or a user defined code. The following two types of display rule triggers
are available:
• Business Function
• Rule
• Rule
3. Click the Visual Assist for data display rules to browse and select from available user
defined codes.
56
4. Choose from the following values:
*RAB Right-adjusts the value and precedes it with blanks. Data items that define business units use this
rule.
*RABN Right-adjusts the value and precedes it with blanks. Data items that do not define business units
use this rule.
*RAZ Right-adjusts the the value and precedes it with zeroes. For example, Company appears as
00001. This value is used for non-numeric fields only.
CODE Uses the specified Edit Codes to format numeric fields. See UDC 98/EC for a list of valid codes.
The code should be entered into the parameter field.
MASK Embeds the specified characters within the data when it appears. For example, to display Social
Security number (SSN_) with embedded dashes, the mask parameter would appear as:
bbb-bb-bbbb, where b = the digits in the Social Security number
Mask can be used only with char or string data item types.
You attach a user defined trigger to a UDC table to validate data. If you attach a trigger, only
the values in that UDC table are valid for that field.
57
► To attach a user defined code trigger
3. Click the Visual Assist to browse and select UDC, User Defined Codes.
58
UDC is one of several available options. Each option is described in the following
table:
GT Greater than
LT Less than
NE Not equal
RANGE Range
VALUE When Y, N, 1, and 0 are the only valid values; Y N 1 0 appears by default in the parameter field.
ZLNGTH AS/400 database only. The parameter field contains the allocated length for a variable-length
field. This specification is optional.
When you enter UDC in the Rule field, the following two fields are enabled:
• System Code
• Record Type
59
5. Click the Browse button to choose a record type.
If you are creating a data item for use in WorldSoftware and OneWorld, separate limitations
and considerations are required that are not addressed in detail in this guide.
The next numbers feature controls the automatic numbering for such items as new general
ledger account numbers, voucher numbers, and address numbers. It allows you to specify
the numbering system code that you want to use and gives you a method of automatically
incrementing numbers to reduce transpositions and keying errors.
Use a next number when you want the system to enter a default value in a numeric data item
if the user does not enter a number. Next numbers are assigned from an array. The
combination of system code and index defines how the next number will be assigned.
60
Next Numbers
The Next Numbers table is F0002, and it has the following logic:
For example, if you select system code 09 in the Next Numbers program, six rows
are populated and four are blank. The system uses each of these coded, populated
rows as hard code. The first row defines New Account ID. Within J.D. Edwards
applications that create new accounts, the system retrieves the account number from
system 09, row 1 of the Next Numbers table. Row 2 contains Journal Entries. In a
master business function (MBF) that creates journal entry documents, the system
retrieves the document number from system 09, row 2 of the Next Numbers table.
If you select system 04 in the Next Numbers program, the system uses a completely
separate set of rows that have hard codes for use within system 04.
For example, if you are using check digits and the next number is 2, the system adds
a check digit such as 7, making the last two numbers 27. Check digits provide a
method of randomly incrementing numbers to prevent the assignment of transposed
numbers. In the following algorithm, the system would never assign next number 72
while check digits is activated.
After you set next numbers, do not change it. If you change next numbers, the following might
occur:
• Next Number
61
3. Complete the following fields:
• System Code
• Index
Smart Fields are actually data dictionary items with attached business functions. The
business functions that are attached include named mappings, which simplify the process of
selecting a data item with particular functionality. End users do not need to know which
business function to use and what parameters to pass; instead, the user simply selects a
data item that inherently has this information. Smart fields can be used in all section types in
Report Design. For example, you can use smart fields to derive a column heading or an
object value in a tabular section. Smart fields are always glossary group K.
• Description
• System Code
• Data Type
62
• Control Type
• Row Description
• Column Title
• Size
• File Decimals
• Display Decimals
• Class
• Item Occurrences
• Row Security
• Auto Include
• Do Not Total
63
5. From the Form menu, choose Smart Fields.
• Event Name
Specify the event in which the smart field should be triggered.
• Named mapping
Enter the named mapping that is associated with the business function data
structure.
On Smart Fields, you can click the Browse button to select a business function.
64
On Smart Fields, you can click the visual assist on Named Mapping to select a
value.
65
Updating the Glossary
Each data item is described within the glossary. The end user of an application sees this text
at runtime. Thus, it should explain how the field is used in the application. Within an
application, you can access this glossary description in field-level help. You can also do the
following:
66
► To update the glossary
67
► To add glossary for an item with languages
1. On Work with Data Items, choose the item that you want to change.
68
3. On Work with Data Item Glossary Overrides, click Add.
4. On Data Item Glossary Header, complete the following fields, and then click OK:
• Language
• Form
Enter a Form Name if you want the glossary to be for a specific form only.
If you do not enter a form name, the glossary applies to all forms that use this
item.
5. On Work with Data Item Glossary Overrides, choose the row that you just added.
69
7. On Data Item Glossary, enter the glossary text that you want to add.
You can also change the glossary for an item with existing language overrides.
For example, the cost center field MCU is widely used throughout the system. Its row
description is Business Unit, which is a term used by financial applications. However, in
distribution applications, this data item appears as Branch/Plant. In warehousing applications,
the data item appears as Warehouse.
70
In addition to any alternate terms you define, users can implement their own language
overrides at the application level. OneWorld checks for and resolves overrides in the
following order:
1. If a user applies a language override in the application (such as the Form Director Aid
or Report Design), OneWorld uses the term indicated by the language override, if
one exists.
2. If the user did not specify a language override in the application, then OneWorld
determines at runtime whether a system code has been attached to the menu
selection. If the menu selection has an attached system code, then OneWorld
displays the alternate term dictated by the system code, if one exists.
3. If no alternate term has been indicated for the menu selection, OneWorld determines
at runtime whether a system code has been attached to the application. If the
application has an attached system code, then OneWorld displays the alternate term
that is dictated by the system code, if one exists.
4. If no alternate term has been indicated for the application, then the data dictionary
text appears.
In all cases, OneWorld first checks the user's preferred language for an alternate term before
checking without language. Language and language overrides always take precedence over
non-language overrides. For example, assume that, in an environment in which English is the
base language, all the forms have French translations that a user can view by selecting the
French override. A form might contain a data dictionary item that in English has an alternate
term; in this example, however, the French version of the data dictionary item does not have
an alternate term. When it appears in English, the form displays either the main term or the
alternate term, as appropriate. When it appears in French, however, the form displays only
the main term, even when an alternate term is called for, because the language override
takes precedence over displaying the alternate term.
71
Jargon and alternate language terms must be added after the data dictionary item has been
created.
See Also
Updating the Glossary for information about how to create alternate language
glossary items for a data item
► To define jargon
1. On Work with Data Dictionary Items, find the item for which you want to define
jargon.
2. From the Row menu, choose Descrip. Overrides.
3. Click Add.
The Data Item Descriptions form appears.
4. On Data Item Descriptions, complete the following fields, and then click OK:
• Jargon Code
Enter or select the system code with which you want to associate the current
jargon. Different system codes are associated with specific categories and
applications in the system.
• Row Description
• Column Title
5. Repeat this process for each jargon term that you want to associate with the data
item.
1. On Work with Data Dictionary Items, find the item that you want to update.
2. From the Row menu, choose Descrip. Overrides.
3. Click Add.
The Data Item Descriptions form appears.
• Language
• Row Description
• Column Title
5. Repeat this process for each language that you want to associate with the data item.
You can change the row and column text for all applications (interactive or batch) that use a
data item.
72
► To change row and column text for all applications
1. On Work with Data Dictionary Items, find the item that you want to update.
73
3. Choose a language record and modify it.
You can change the alpha description by clicking Glossary Overrides and creating a record.
You then use the Glossary form to change the description.
For information about changing the row and column text for a particular application
(interactive or batch) that use this data item, see the Package Management Guide.
Changes to row and column descriptions are not replicated through data replication. To
deploy row and column changes to workstations, you must deliver a new full or partial
package, or an update package that includes the affected applications. The new or update
package deletes the existing row and columns that are stored in a cache on the workstation.
Table Design
A relational database table stores data that an application uses. You can create one or more
tables for use in an application. To create a table, you select data items (the data items must
exist in the data dictionary) to include in the table and assign key fields as indices for
retrieving and updating data. You must define your table so that OneWorld recognizes that
the table exists.
You must use Table Design to generate the table whenever want to perform the following:
74
An index identifies records in a table. A primary index identifies unique records in a table. An
index is composed of one or more keys, or data items, within the table. An index enables a
database management system (DBMS) to sort and locate records quickly.
Adding a Table
Determine whether an existing table contains the data items required by your application. If
not, you must add a new table.
► To add a table
3. On Add Object, complete the following fields, and then click OK:
• Object Name
See the J. D. Edwards naming standards below.
• Description
See the J. D. Edwards naming standards below.
• Product Code
75
• Prefix - File
See the J. D. Edwards naming standards below.
• Object Use
4. On Table Design, click the Summary tab and change the data in the following fields
to alter the table properties:
• Description
• Product Code
• Object Use
5. To document the table, click the Attachments tab, and then add attachments.
See Working with Attachments for more information about adding attachments to an
object.
J.D. Edwards recommends you use the following naming conventions when you add a table:
The Object Librarian name for a table can be a maximum of 8 characters and should be
formatted as follows: Fxxxxyyy
F = data table
76
00 - OneWorld Foundation environment
01 - Address Book
03 - Accounts Receivable
01 - Master
02 - Balance
1X - Transaction
yyy (sixth through eighth digits) = object version, such as programs that perform
similar functions but vary distinctly in specific processing
The table description is the topic of the table. If it came from the AS/400, it should be the
same name as the file it represents, such as Address Book Master (F0101) and Item Master
(F4101).
The column prefix is a two-character code used to uniquely identify table columns. The first
character must be numeric and the second character must be alpha-numeric.
The Object Librarian name for a table can be a maximum of 8 characters and should be
formatted as follows: Fxxxxyyy
F = data table
01 - Address Book
03 - Accounts Receivable
01 - Master
02 - Balance
1X - Transaction
yyy (sixth through eighth digits) = object version, such as programs that perform
similar functions but vary distinctly in specific processing
77
LA through LZ - Logical file
The table description is the topic of the table. If it came from the AS/400, it should be the
same name as the file it represents, such as Address Book Master (F0101) and Item Master
(F4101).
The column prefix is a two-character code used to uniquely identify table columns.
The first character must be alphabetic. The second character can be alphanumeric. You
cannot assign special characters (for example, $, #, or @).
The data item name follows the column prefix. For example, Address Number in the Address
Book Master (F0101) is ABAN8. The prefix does not have to be unique in OneWorld®
because the Tool Design Aid makes it unique. For example, the system references ABAN8
as F0101_ABAN8.
Indices
List the field as the index name, such as Address Number, if there is only one field in the
index.
For coexistence, it is critical that OneWorld indices match logicals on the AS400. When you
run the Generate Table command in Table Design, OneWorld automatically determines
whether a matching file exists on the AS400. If a matching AS400 file does not exist, then
OneWorld creates logical files on the AS400. If a matching AS400 file exists, OneWorld does
not create any logicals on the AS400.
If an index has two fields, list them consecutively, such as Address Number, Line Number ID.
List the first two fields followed by an alpha character (A), such as Address Number, Line
Number, A, if there are more than two fields in the index and the first two fields are the
same as the first two fields of another index. Otherwise, list the fields followed by a (+), such
as Item Number, Branch, +.
Place a comma and space ( , ) between each index field and between the last index field and
the plus sign.
The total length of the index name cannot exceed 19 characters if the index has two or more
fields. If you exceed 19 characters, the compiler displays the warning Re-definition is not
identical.... This situation affects fetches that use the wrong index ID in business functions.
• Table Columns, which displays the data items that make up your table.
• Data Dictionary Browser, which locates data items for selecting and moving to the
Column view.
• Indices, which defines the unique data items for quicker sorting and updating of the
table.
78
• Properties, which displays data item attributes for a selected data item in the Column
view. This is a display view only and is primarily used when defining indices.
When you modify or delete data items or indices, you must reconfigure the table. Changes
might affect business views and forms that reference that table.
You use Generate to generate a newly-modified table. The existing data in the table will be
lost.
Caution
If you delete a table or delete columns from that table, any business views that reference the
table or the deleted table columns will be invalid, and the system will display error messages
when you generate the application.
If you use Table Design to delete a table, it deletes only the specs. It does not delete the
physical table.
1. Complete the steps to add a table, or, in Object Management Workbench, choose a
table and click the Design button in the center column.
See Adding a Table.
79
2. On Table Design, click the Design Tools tab, and then click Start Table Design Aid.
3. In the Data Dictionary Browser view, use QBE to locate the data dictionary items that
you want to include in your table.
4. To include a data item in your table, drag it from the Data Dictionary Browser view to
the Table Columns view.
5. To remove a column from a table, choose it and choose Delete from the Edit menu.
Defining Indices
You use indices to find specific records and to sort records faster. Table indices are like tabs
in a card file. Each index is comprised of one or more keys, which are individual data items.
You use indices to access data in the most simple manner so you do not have to read the
data sequentially.
OneWorld middleware generates an SQL statement that the native database understands.
A table can have multiple indices; however, every table must have only one primary, unique
index. The primary, unique index is the one unique identifier for each record in the table. The
database should use the index that returns the most detail. It does not always use the
primary index. Additionally, you use the primary index to build business views.
See Also
Performance for information about performance issues regarding indices
Business View Design for information about how business views use the primary
index from a table
► To define indices
1. On Table Design, focus on the Indices form so that the Indices menu appears.
2. From the Indices menu, choose Add.
You can also drag indices from the column view into the index view.
The index description is Untitled; it is marked with a key that displays the letter P to
indicate a primary index.
80
3. Double-click the index title to name the index. After you name the index, press Enter.
4. On the Table Columns view, choose one or more columns from the columns view
and drag them to the index.
A unique index is marked with a single key. You can toggle the unique/not unique
status of a key by clicking your right mouse button and choosing Unique from the
Index menu. The Unique Primary Index cannot be changed to nonunique status.
5. Indicate the ascending or descending sort order for an index column. An arrow
pointing in the upward direction indicates that the index column is sorted in
ascending order.
• List the field as the index name, such as Address Number, if the index contains only
one field.
• For coexistence, OneWorld indices must match logicals on the AS/400. When you
run the Generate Table command in Table Design, OneWorld automatically
determines whether a matching AS/400 file exists. If a matching AS/400 file does not
exist, then OneWorld creates logical files on the AS/400. If a matching AS/400 file
exists, OneWorld does not create any logicals on the AS/400.
• If the index contains two fields, list them consecutively, such as Address Number,
Line Number ID.
• List the first two fields followed by an alpha character (A), such as Address
Number, Line Number, A, if the index contains more than two fields and the first
81
two fields are the same as the first two fields of another index. Otherwise, list the
fields followed by a (+), such as Item Number, Branch, +.
• Place a comma and space ( , ) between each index field and between the last index
field and the plus sign.
• Do not include more than 10 fields in an index.
• The total length of the index name cannot exceed 19 characters if the index has two
or more fields. If you exceed 19 characters, the compiler displays the warning Re-
definition is not identical.... This situation affect fetches that use the wrong index ID in
business functions.
Previewing Tables
You can preview how tables will look when you print them.
1. On Table Design, focus on the Columns form and choose Print Preview from the File
menu.
A print preview of your table appears.
82
Generating Tables
After you have selected data items and assigned indices for your table, you are ready to
configure the table for a specific data source. If you have not established an index, your
generation will fail.
You must generate a table to create the physical table. You cannot add to or update the table
until it is generated. Table generation also creates a .h file that is used for compiling in
business functions and table event rules.
The OMW calls the Object Configuration Manager application (P986110) to configure tables.
You can configure the table within any existing data source. If you do not indicate a data
source, OneWorld automatically configures the table for the default map. You can change the
path code to generate the table in a different location. This actually does a drop statement
similar to the remove table, and then the table is recreated. If you regenerate the current
table, the data in it will be lost.
You must regenerate a table after you modify it, such as when you delete or add data items.
To ensure that data is not lost, you must export your data, generate the table, and copy the
data back into the table.
► To generate tables
1. On Table Design, click the Table Operations tab, and then click Generate Table.
2. On Generate Table, complete the following fields, and then click OK:
• Data Source
• Password
A message appears indicating whether the generation was successful.
Generating Indexes
If you create additional indices or modify existing ones, you must regenerate them. This
modifies the .h file, but you will not lose existing data, as you do when you regenerate the
entire table.
► To generate indexes
1. On Table Design, click the Table Operations tab, and then click Generate Indexes.
2. On Generate Indexes, complete the following fields, and then click OK:
• Data Source
• Password
83
► To generate header files
1. On Table Design, click the Design Tools tab, and then click Generate Header File.
The system generates the header file.
Copying Tables
You can copy tables from one data source to another. This operation does not copy table
specifications. You can also use table conversion to copy tables from one data source to
another.
See Also
Table Conversion Guide for more information about using the Table Conversion tool
to copy tables
► To copy tables
1. On Table Design, click the Table Operations tab, and then click Copy Table.
2. Complete the following fields, and then click OK:
• Data Source
• Data Source
• Object Owner ID
• Password
1. On Table Design, click the Table Operations tab, and then click Remove Table from
Database.
2. On Remove Table, complete the following fields, and then click OK:
• Data Source
• Password
84
structure of the table. The Universal Table Browser uses JDEBASE APIs to retrieve data
from the database, making it independent of the database that you access.
Note
You cannot use OneWorld security to directly secure users from the Universal Table Browser
because it is a Windows executable application, not a OneWorld-generated application.
However, you can place form security on the Table and Data Source Selection form
(W98TAMC). This secures the Universal Table Browser because the Windows executable
cannot function without this OneWorld form. All column and row security that you set up
through Security Workbench applies to the Universal Table Browser.
From Cross Application Development Tools (GH902), choose Universal Table Browser.
1. On Universal Table Browser, choose Open Table from the File menu.
85
2. Complete the following required fields:
• Table
• Data Source Name
3. Complete the following optional field:
• Format Data
86
Example: Universal Table Browser (Formatted Data)
In this example, a database table appears as it was opened with the Format Data option
turned on. Notice that the structure of the information in the ABAN8 column of table F0101 is
formatted using the data dictionary specifications.
87
Business View Design
A business view is a selection of data items from one or more tables. After you create a table,
use Business View Design to select only the data items that are required for your application.
OneWorld uses the business view to generate the appropriate SQL statements needed to
retrieve data from any of the supported OneWorld databases. After you have a business
view, you can create a form that updates data (in an interactive application) or design a report
that displays data. Because you select only those data items that are required in an
application, there is less movement of data over the network.
Table Join
A table join combines data from individual rows of joined tables. The joining columns satisfy a
join condition, such as when the rows have the same values in key columns. The primary
table is the table that you are starting from (usually the table on the left in Table Design) and
the secondary table is the table that you are going to (usually the table on the right in Table
Design). Several types of joins exist, including the following:
• Simple joins, which are also known as inner joins. They include only rows that match
both the primary and secondary tables.
88
• Right outer joins, which include rows common to both the primary and secondary
tables, and unmatched rows from the secondary table.
• Left outer joins, which include rows common to both the primary and secondary
tables, and unmatched rows from the primary table.
89
Table Union
A table union appends entire tables. It first presents to the application selected rows from the
primary table, then rows with corresponding columns from the secondary table. If the rows
from the two tables contain identical data, then only one of the records is retrieved in the
union.
Unions include rows from the primary table and corresponding columns from the secondary
table.
90
Select Distinct
You can use the Select Distinct feature to help eliminate duplicate rows in the business view
query.
Indices
You use the primary index from a table to build business views. Business views then carry
information from the table to an application If you need to carry forward additional information
to the application, other than the primary key, you might need to change the business view
index.
Business views usually contain more fields than are used on the form or grid. If you need a
field that is in a business view, but not on a form or a grid, you can add the field without
changing the business view.
You use different business views for each form type. For forms with grids, the grid should
contain fewer fields than the business view to allow for business-specific issues that might
affect performance. Typically, Search and Select should have the minimum number of items
you need, so it is smaller. It should include only the basic fields needed for filtering and
necessary output fields, such as descriptions.
Find/Browse and Parent/Child forms have a few more items and are more medium sized.
They include those fields needed for filtering and necessary output fields, such as
descriptions.
Input-capable forms have all of the items from the table and tend to be larger. They should
include all of the fields necessary to add or update a record, including audit information.
See Also
Performance for performance information about business views
91
3. On Add Object, complete the following fields and click OK:
• Object Name
See J. D. Edwards Naming Standards for guidelines.
• Description
• Product Code
• Object Use
The Object Librarian name for a business view can be a maximum of 10 characters and
should be formatted as follows: VzzzzzzzzA, where:
V = Business view.
A = A letter that designates the view. For example, V0101A is the first view of the
table F0101, and V0101B is the second view of the same table.
92
External Developer Considerations
External development refers to creation of applications by developers who do not work for
J.D. Edwards, such as Partners in Development and J.D. Edwards consultants who create
custom applications for specific clients. To prevent interference between J.D. Edwards and
non-J.D. Edwards objects, you must use caution when naming a business view. When you
create a new business view for a standard J.D. Edwards table, format the business view
name as follows: Vssss9999, where
V = Business view.
Provide up to a 60-character description for a business view. It should reflect the application
description followed by the form type, such as Item Master Browse and Item Master
Revisions.
Primary unique key fields should remain in the business view. Do not reorganize the primary
unique key fields.
Note
One business view for each table should include all columns. Use this business view for the
level 01 section in all reports upon which the file is based. Also, only one business view is
allowed for each form type, except for a header/detail form. In this instance, two business
views may be selected, one for the header portion of the form and one for the detail portion of
the form.
Joined Views
To format the name for a joined view, use the names of the two tables being joined,
separated by a forward slash. Place the primary table first.
For example, where F4101 is the primary table in the join view between F4101 and F4102,
use the following naming standard: F4101/F4102.
• Table Joins, which defines the tables over which you create the business view.
• Available Tables, which locates tables for selecting and moving to the Table Joins
view.
• Selected Columns, which lists the data items from your table that are included in your
business view.
• Properties
93
You should generate the business view when you create a new business view or when you
add a data item to the business view.
• When you delete a data item from a business view, if the data item is used in an
application, an error results when you run the application.
If this occurs, you must open the application and delete the item from the application
or reselect the column in the current business view to fix the control.
• When you delete an entire table from a business view, any application that uses the
business view will not run.
If this occurs, you must fix all items that refer to the business view.
• If you delete a business view, any forms that use the business view will fail.
If this occurs, you must connect the forms to a new business view and connect all of
the controls.
You can create a business view over one large table to retrieve and update only those
columns that the application needs. However, performance is diminished when the system
retrieves and updates a very large table. Consider joining two smaller tables rather than
creating one large table that contains many data items.
94
► To choose a table for a business view
3. On the Available Tables view of Business View Design, locate the table for the
business view using the query-by-example line. You can search by description,
name, and system code.
4. Choose one or more tables and drag them to the Table Joins view. The view is called
Table Join regardless of whether you are joining multiple tables.
The Table Joins view displays selected tables, along with the columns that comprise
each. Key symbols appear next to columns that are index keys in the table. The
primary table supplies the key to the business view. This is where an application
begins a search.
Note
To ensure maximum performance in your application, OneWorld limits the number of
tables to five if all joins are simple joins, or to three tables if any of the joins is an
outer join or if there is a union.
95
5. Designate a primary table by double-clicking the title bar of the desired table
(optional).
If the business view contains multiple tables, the first table added is automatically
designated as the primary table. A crown symbol appears in the upper left corner of
the window to indicate the primary table. If a business view contains only one table,
that table is automatically the primary table.
6. To delete a table from a business view, choose it and choose Delete from the Table
menu, or click the right mouse button and choose the Delete menu item.
Choose the data items that you want to use in an interactive application or batch job. When
you create an application, you do not have to use every item in the business view.
1. On the Table Joins view of Business View Design, double-click the data items to
include in the business view.
Selected data items appear highlighted in the Table Joins window. As you select
each item, it is added to the Selected Columns window.
Do not select more than 256 columns for your business view. An application that
uses a business view that contains more than 256 columns will fail at runtime.
96
2. Double-click a selected item in the Table Joins window to remove it from the
business view.
If you have two tables in a join, the primary index is automatically selected for both.
Index keys of selected tables are automatically highlighted for use in the business
view. Except for the primary table index keys, you can remove index keys if they are
not going to be used in the business view. You cannot remove index keys for the
primary table from the business view.
If you create a join, items from both tables are automatically selected. If the same
data item appears in multiple tables, you need to select the data item from only one
table.
Do not select the same data item from two different tables because that causes it to
appear twice in the business view.
For example, Journal Entry is unique by line number within a document. You need only the
first document number with Line 1, not all line numbers within the document. Select Distinct
fetches only the first occurrence of the document number, not all the line numbers within it.
97
Any business view with a primary table that contains one or more of the following columns,
which are used for currency support or security features, might cause the Select Distinct
feature to output duplicate values:
CO Company
LT Ledger Type
AID Account ID
MMCU Branch
1. On Business View Design Aid, choose Distinct from the File menu.
2. Choose the primary table of your view.
3. From the Table menu, choose Change Index to change the index of the primary table
to a nonunique index.
Choose the primary table in Business View Design Aid. From the Table menu, choose
Change Index to change the primary table index. Change Index is available only for the
primary table.
98
A warning, indicating that your selected column list will be changed, appears. Click Yes to
continue.
The Available Indices form appears. The first edit field on the form displays the current index
of the table used by the business view. The default is the primary index.
For this example, choose Key by Formtyp, Evtype, Obj from Available Indices and click OK.
99
The Table Joins list and Selected Columns list change to reflect the keys of the new index.
Now, if you run an application that uses the V98EVDTL business view, with Select Distinct
off, and the changed business view index, Key by Formtyp, Evtyp, Obj, the generated SQL
statement is:
SELECT EDOBJTYPE, EDEVTYPE, EDFORMTYPE FROM PVC. F98EVDTL
Using this example, you might now have 281 rows of data from table F98EVDTL.
Next, you reopen the V98EVDTL business view. Choose Select Distinct from the File menu.
Choose Change Index to reselect the Key by Formtyp, Evtyp, Obj index from Available
Indices and click OK. Save the business view and exit Business View Design Aid.
Now you might need to exit and restart OneWorld. OneWorld caches the business view in
memory, so even though you have changed the business view, the previous cached business
view will run until it is cleared.
When you generate and rerun the same application using the V98EVDTL business view that
you just completed (with Select Distinct on and the changed business view index Key by
Formtyp, Evtyp, Obj), the generated SQL statement is:
SELECT DISTINCT EDOBJTYPE, EDEVTYPE, EDFORMTYPE FROM PVC. F98EVDTL
Using this example, you might now have 53 rows of data from table the Event Detail File
(F98EVDTL).
100
You typically use joins for non-input-capable forms, such as Find/Browse forms, and reports.
You do not usually use them for forms that update and add to the database because the
relationship between the records must be precise. Use joins for input capable forms when the
relationship between two tables is simple. Joins are faster than using individual fetches to
retrieve data.
If a business view uses multiple tables, link them by establishing joins between columns in
those tables. The links indicate how rows between a table correspond to rows in another
table.
Data item attributes are defined in the data dictionary. Use the Properties window to view
attributes for a column when determining whether you can use it in a join. The highlighted
data item in the Selected Columns window displays the properties of that data item in the
Properties window.
Review each table and decide how the data in each table is related to the data in other tables
for your application or report. You might need to add columns, build indexes, or even create
new tables. If you build new indexes, consider your needs carefully before you do so.
1. Click and draw a line that links a column in the primary table to a column in a related
table.
You can create table joins only between like columns. The name of the columns can
be different, but the attributes for Data Type and Decimals must be identical. To
determine whether data items are candidates for a join, view the data item attributes
that appear in the Hover Hints for each data item.
2. To delete a join, choose it and then choose Delete from the Join menu; alternatively,
click the right mouse button and then choose Delete from the pop-up menu.
101
3. From the Join menu, choose Types and then choose one of the following join types:
• Simple
• Left Outer
• Right Outer
The default join type is simple.
4. From the Join menu, choose Operators and choose one of the following operators:
• Equal (=)
• Less than (<)
• Greater than (>)
• Less or equal (< =)
• Greater or equal (> =)
The default operator is equal.
102
Data Structures
Data structures are a key element of any programming language or environment. A data
structure is a list of parameters that passes data between applications and tables or forms.
OneWorld uses data structures in the following instances:
• Form
• Report
103
Structure menu option in Report Design. Unlike a form data structure, this data structure is
not automatically populated with data items.
You can also create data structures for text substitution messages (see Messaging for more
information).
You can attach notes, such as an explanation of use, to any data structure or data item within
the structure.
For interactive applications, the default data structure contains only the keys from the
business view selected for a form. If you want to pass a value for a data item that is not in the
default data structure, you must add the data item to the data structure.
A default data structure is created at the report level for a report with an attached business
view. The default data structure is empty. If you add data items to the data structure, the
structure is maintained by Report Design, as is the report.
The items in the existing data structure appear in the Structure Members list. Two tabs
appear for modifying the data structure. The Available Objects tab lists data items in the
attached business view. If you want to add an item to the data structure that is not in the
104
Available Objects list, then you can select it from the Dictionary Items list. The Dictionary
Items tab accesses items from the Data Dictionary.
1. On Form Design Aid, focus on the form with the data structure that you want to
modify, and then select Data Structures from the Form menu.
The Form Data Structure form appears.
2. To add an object from the attached business view or grid column, click the Available
Objects tab, and then drag the object into Structure Members on the left side of the
form.
3. To add a specific data dictionary item, perform these steps:
• First, click the Dictionary Items tab.
• Second, enter data to search for a data dictionary item in the QBE row, and then
click Find.
• Third, drag the desired data dictionary item into Structure Members on the left of
the form.
4. To remove an object from the data structure, select the item in Structure Members,
and then click Delete.
5. Click OK.
105
Example: Changing Interconnection Data Structures
The following example describes a situation in which you might want to change an
interconnect data structure. Suppose that you create two Fix/Inspect forms that use the same
business view. The second form shows more detail, such as additional columns from the
same record. If you do not want to refetch the record in the second form, you should change
the data structure for the second form.
The data structure for the second form should contain all the information (fields on the form)
and data items in the data structure, in addition to the keys in the business view. In this case,
you should set the Form Options to No fetch on form business view for that form. This also
applies if you are not updating the record with new information on the second form, but you
are passing that information back to the first form and letting the first form update the
database. In this case, you should set the form options for updating the database to No
Update on Form Business View.
Depending on your configuration, you might want to fetch the entire record once in the first
form and pass it to the second form, or let the second form refetch the record. In this case,
you will have two separate business views, with different columns from the same record. If
the second form is a form that will not be accessed often, do not fetch the fields in the
business view of the first form. For the first form, use a business view that has only the
columns needed for the first form. If you fetch all columns needed for both forms, you perform
only one Select from the database and all the data is passed over the network once, instead
of having two separate Select statements generated by two different business views
traversing the network. If hardware or memory for the workstation is not a problem, then fetch
all columns for that record for both forms and let that information reside in the workstation's
memory.
106
Creating a Data Structure
A data structure object is required to create a business function. A data structure is used to
pass data between an application and a business function. OneWorld provides the ability to
create an encapsulated data structure object.
You can create several types of data structures that are maintained independently as objects
in Object Librarian.
Refer to the Development Standards Application Design Guide for J.D. Edwards naming
conventions.
107
grid or form. The media object key must have a unique value for each media object
attachment so that the system will know which attachment to retrieve.
• Object Name
The J.D. Edwards standard format for naming a media object data structure is
GtxxxxyyA, where:
GT = Media object
yy = A next number
A = A letter that differentiates multiple media objects, if the table has multiple media
objects.
• Description
Provide up to a 60-character description that reflects the subject of the media
object.
• Product Code
• Object Use
4. On Data Structure Design, click the Design Tools tab, and then click Data Structure
Design.
108
5. Choose data items from Dictionary Items list.
• Enter a Name, Alias, System Code or combination in the QBE fields and click
Find to more easily locate an item in the list.
6. To change the name, double-click on the name and type a new name.
Use Hungarian notation rules.
109
3. On Add Object, complete the following fields:
• Object Name
The J.D. Edwards naming convention for processing option data structures is
Txxxxyyyy where:
• Description
• Product Code
• Object Use
4. Choose the Processing Option Template option, and then click OK.
110
2. On Add OneWorld Object to the Project, choose the Data Structure option, and then
click OK.
• Object Name
The J.D. Edwards naming convention for business function data structures is
DxxxxyyyyA where:
D = Data structure
• Description
• Product Code
• Object Use
4. Choose the Regular Data Structure option, and then click OK.
111
Defining a Data Structure
After you create a data structure, you must define the data objects to include in the data
structure. You can modify existing data structures by adding new data objects to it or deleting
data objects from it.
See Also
See Processing Options for information about working with processing options and
their data structures and templates.
1. On Object Management Workbench, check out the data structure with which you
want to work.
2. Select the data structure, and then click the design button in the center column.
3. On Data Structure Design, click the Design Tools tab, and then click Data Structure
Design.
4. To add a data dictionary item to the data structure, complete the following steps:
• Enter data to search for a data dictionary item in the QBE row, and then click
find.
• Drag the desired data dictionary item into Structure Members on the left of the
form.
• To change the name, double-click the name, and enter a new name. Use
Hungarian notation rules.
112
If you are unsure about which data dictionary item you want, click Data Dictionary to
search for data dictionary items and then view details about the data items that you
select.
You can view detailed information about a data item in the data structure by selecting
it and then clicking Data Dictionary Detail.
5. You can indicate the required status by leaving the required field blank or choosing
one of the following:
• An X to indicate that the field is optional.
• A checkmark to indicate that the field is required.
6. Choose a direction for the data flow by clicking the arrow until it changes to the
appropriate direction and type.
7. To remove an object from the data structure, select the item in Structure Members
and then click Delete.
8. To define attachments for the data structure, click Data Structure Attachments.
9. To define attachments for a data structure item, click Data Structure Item
Attachments.
10. To launch the Cross Reference utility, click Cross Reference.
11. When you are finished, click OK.
113
Cross Reference Facility
You can use the Cross Reference Facility to determine information about where specific
kinds of objects are used and how they are used. You can also view relationships between
objects and their components. For example, you can:
1. From the Cross Application Development Tools menu (GH902), choose Cross
Reference.
114
2. Click one of the following tabs:
• Data Items
• Interactive Applications
• Batch Applications (the batch application object type in Cross Reference is UBE)
• Business Functions
• Business Views
• Data Structures
• Tables
• Forms
115
• Display rule functions called by a data item
• Search forms used by data items
• Processing options that use a data item
• Generic text data structures that use a data item
• Business function data structures that use a data item
• All data structures that use a data item
• Tables that use a data item
• Indices that use a data item
• Business views that use a data item
• Table event rules that use a data item
116
• Data items for an application
• Processing options for an application
• Business views for an application
• Data items that are used as variables in an application
117
Searching for Business Functions
You can locate information about business functions and how they are used. You can search
for the following:
118
• Data items that call display rule functions
• Search source and header files by string
• Table event rules that use a business function
119
Searching for Data Structures
You can locate information about data structures and how they are used. You can search for
the following:
120
Searching for Tables
You can locate information about tables and how they are used. You can search for the
following:
121
Searching for Forms
You can locate information about forms and how they are used. You can search for the
following:
122
Searching for Event Rules
You search for event rules to help you find an existing event that you can use.
1. On the search form that you have chosen, choose Event Rules from the Form menu.
123
2. Complete the following fields:
• Object Name
• Form Name
In these instances, the Field Relationships form displays the control type for a field, such as
one of the following:
124
• GC for a grid control
• FC for a form control
On the Cross Reference search form that you chose, choose Field Relationships from the
Form menu.
View the date on which a record was built in the far right column of the grid on each cross-
reference form of the Cross Reference utility. If information is out-of-date, use the Rebuild
option from any of the cross-reference forms.
Cross Reference builds use relational database tables, not local specifications.
125
► To rebuild cross reference information
126
Application Design
Application Design is the entry point to several tools for creating, generating, running,
maintaining, and securing applications. Application Design includes Forms Design for
creating forms and Event Rules Design for attaching business logic through event rules. Use
Application Design to do the following:
• Windows client
• Java client
• HTML client
See Also
Forms Design for complete instructions for creating a form
Processing Options for information about creating and attaching a processing options
template to an application
BrowsER for instructions for viewing, enabling, and disabling event rules that are
used within forms
Developing Web Applications for more information about developing Web
applications
Vocabulary Overrides in the System Administration Guide for information about
defining vocabulary overrides for an application
Understanding Applications
An application is a collection of computer programs that perform a specific task. An
application retrieves and updates data within a database table. P01012 (Address Book) and
P4210 (Sales Order Entry) are examples of applications.
• Interactive applications
• Batch applications
• Web applications
127
Understanding Batch Applications
A batch process is an application that processes automatically without user interaction. Table
conversions and reports are examples of batch processes.
In addition to installing the Web server, you might need to install the Java generator on the
OneWorld developer workstation. Install the Java generator if you are planning to develop
new applications or change existing applications. The Java Generator usually is automatically
installed when you do a OneWorld client install.
Refer to Developing Web Applications for more information about developing Web
applications.
After the application exists as an object, you can start building the components of the
application. You can use Forms Design to design the first form in your application.
128
Create an Interactive Application Object
Use the following process to create an interactive application object.
3. On Add Object, complete the following fields, and then click OK:
• Object Name
This field accepts up to 10 characters; however, if you enter more than 8
characters, the entry will be truncated. The J.D. Edwards naming standard for
applications is formatted as Pxxxxyyy.
P = Application
• Description
Provide up to a 60-character description. It should reflect the subject of the forms
within the application, such as Companies and Constants.
129
• Product Code
• Object Use
4. On Version Add, complete the following fields, and then click OK:
• Version
This field accepts up to 10 characters; however, if you enter more than 8
characters, the entry will be truncated. The J.D. Edwards naming standard for
applications is formatted as Pxxxxyyy.
130
P = Application
• Version Title
Provide up to a 60-character description. It should reflect the subject of the forms
within the application, such as Companies and Constants.
• Prompting Options
• Security
Forms Design
What is a Form?
A form is the interface between a user and a table. This interface should perform the
following functions:
131
A single application can contain one or more forms. Usually, a Find/Browse form is the first
form that appears in the application. It enables the user to locate a specific record with which
he or she wants to work. Upon selecting a record, a subsequent form, such as a Fix/Inspect
form, automatically appears, on which the user can view or modify data for that record.
Elements of a Form
Form Type The form type establishes the basic purpose of a form. Each form type has default
controls and processes.
Business Views In an application, business views link forms and tables. You must associate all
forms, except the Message form, with a business view.
Controls All objects on a form are controls. Controls include grids, check boxes, radio
132
buttons, push buttons, and more.
Properties In application design, the following types of properties exist: application, form,
control, and grid. Properties define appearance and function.
Data Structure A data structure defines the data that can be passed between forms within an
application or between applications. After the data structure of a form is defined,
use form interconnections to indicate the direction of the flow of data between
forms.
Event Rules Event Rules can contain processing instructions for specific events. Events are
actions that occur on a form, such as clicking a button or using the Tab key to
move out of a field. Use event rules to attach business logic to any event.
Events are triggered either as a result of user interaction with a control, such as
clicking a button, or as a result of a system-controlled process, such as loading a
grid.
133
Find/Browse Forms
A Find/Browse form displays data from in one table. Therefore, you can attach only one
business view to a Find/Browse form.
Select A standard toolbar button that comes with the form. You must add the
appropriate form interconnections.
134
Add An optional toolbar button that you can add to the toolbar. You must also
provide the function for the button, which typically includes a form interconnect.
Copy An optional toolbar button that you can add to the toolbar. You must also
provide the function for the button.
Delete An optional toolbar button that you can add to the toolbar. You must also
provide the function for the button.
Fix/Inspect Forms
The Fix/Inspect form allows you to add a new record to a table or to update an existing
record. The Fix/Inspect form includes OK and Cancel buttons. When you click OK, the
system writes changes or additions to the table. When you click Cancel, any changes that
you made are lost, and no database changes are made. Because the Fix/Inspect form allows
you to add or update only one record at a time, the form does not contain a grid.
135
Because the Fix/Inspect form contains only one record, you can attach only one business
view to a Fix/Inspect form.
If the user selected a record on a previous form, the Fix/Inspect form displays data for that
record. If the user did not select a record on the previous form, the Fix/Inspect form is empty,
except for any default values.
136
The Header Detail form allows you to work with data from two separate tables. You can use
this form to add or update a single header record. You can also add, update, or delete
multiple detail records from the same form.
The Header Detail form includes an input-capable grid so that you can add or update detail
records. Click OK to perform updates or adds to both tables that are associated with the form.
When you click Cancel, any changes are lost and no database changes are made.
Because the Header Detail form allows you to update or add records from two different
tables, you can attach two business views to a Header Detail form. Attach one business view
to the grid and the other to the form, updating both tables from a single form. You can use the
Header Detail form for one-to-many relationships.
Find A button that you can add to the toolbar. You must also provide the function for the button.
The system performs a standard fetch, just as it does when you enter the form.
Delete A button that you can add to the toolbar. Although the system deletes the record, you might
want to add other logic here, as well.
137
Headerless Detail Forms
The Headerless Detail form displays multiple records from a single table that is not
normalized. Because this form updates only one table, you can attach only one business
view to the form.
The Headerless Detail form contains an input-capable grid, where you can add or update
detail information. The header portion of the form displays data that is common to all of the
detail records in the grid. Both header and detail information comes from the same business
view.
Click OK to perform changes or additions to the table. When you click Cancel, any changes
that you made are lost, and no database changes are made.
Find A button that you can add to the toolbar. You must also provide the function for
the button.
The system performs a standard fetch, as it does when you entered the form.
138
Delete A button that you can add to the toolbar. You must also provide the function for
the button.
Use this form to locate a value and return it to the calling field. The Search and Select form is
called using a visual assist (flashlight) or hyper-control.
This form only displays information; you cannot enter information in the fields. Therefore, the
form contains Select and Close options.
The Search and Select form includes a non-input capable grid in which you can view multiple
records in one table. The grid displays valid values. When a user chooses a value from the
grid and clicks Select, that value automatically returns to the calling field.
Because you use this form to view records from only one table, you can attach only one
business view to a Search and Select form. You use a separate application for this form. This
form improves performance by fetching only necessary fields, and it exists in its own
application.
The data structure for this form should contain only one element.
139
After you create a Search and Select application, you must attach the Search and Select
form to the specific data item for which it was created. You do this using the visual assist
trigger in the data dictionary or the overrides in the property sheet for a particular control. You
use the data dictionary for all instances and the override for just one instance.
The Select action automatically returns to the calling form. You do not need to add form
interconnects.
Message Forms
Use the Message form to display messages or request action from the user. The form is
modal and is also not sizable. You can add only static text and push buttons to this form. This
form is the only form that allows standard push buttons, including OK, Cancel, Yes, and No
buttons. Do not use form interconnections on this form.
A delete confirmation is a good example of how you can use the Message form.
140
Parent/Child Forms
You can use the Parent/Child form to represent parent/child relationships in an application.
The form has a Parent/Child control in the position in which the grid resides in a Find/Browse
form. This control presents a tree view in the left portion of the control, which displays a visual
representation of the Parent/Child relationship. The right portion of the composite control
displays a grid in browse mode. A movable bar separates the tree view and grid. Use it to
resize either view horizontally. The grid displays the detail information for the nodes of the
tree. The Parent/Child form uses one business view.
Two modes are available on the Parent/Child form. You can choose the default mode or
show all details. The default mode displays the detail for all nodes at the same level in the
tree. As you switch levels in the tree, the grid lines change to reflect your level. If you choose
to show all details, no one-to-one correspondence exists between the nodes in the tree and
the grid lines. You can also load pre-expanded trees so that, if you click Find, the tree
displays all levels instead of loading only one level of nodes at a time. If you choose this
option, it appears as an option on the right mouse menu. You can also allow multiple
selections.
141
The following table describes toolbar buttons for this form.
Select A standard toolbar button that comes with the form. You must add the appropriate form
interconnections.
Add A button that you can add to the toolbar. You must also provide the function for the button,
which typically includes a form interconnect.
Copy A button that you can add to the toolbar. You must also provide the function for the button.
Delete A button that you can add to the toolbar.. You must also provide the function for the button.
To display explicit parent/child data, the business view that underlies the Parent/Child form
should have a parent column and a child column. When any node on the tree for the form is
expanded, the system performs a fetch by querying the database for all of the expanded child
records for the node. For example, suppose the following:
To display data in a hierarchy, the business view does not need a parent column and a child
column. You must develop the logic to perform a fetch when a tree node is expanded.
The Delete hyperitem deletes the currently-selected node record from the table. You must
delete child records, if necessary.
The steps involved in creating a Parent/Child form are different from the steps for creating
other form types. To create a Parent/Child form, complete the following steps:
The previous steps are almost identical to the steps for setting up a Find/Browse form. From
this point on, you must complete unique steps to complete the Parent/Child form. See
Working with Controls for information about completing the Parent/Child form design.
142
Creating a Form
You use Forms Design to create one or more forms that appear in an application. These
forms are the visual interface for the end-user of your application and enable that user to
view, add, or modify data that is stored in one or more tables.
See Also
Understanding Form Types for information about the types of forms that are available
in OneWorld
Business View Design for instructions for creating a business view
1. On Interactive Application Design, click the Design Tools tab, and then click Start
Form Design Aid.
2. From the Layout menu, choose Size to Guide to make your forms a standard size.
The form guide appears as a blue box.
3. From the Form menu, choose Create, and select one of the following form types:
• Find/Browse
• Fix/Inspect
• Header Detail
• Headerless Detail
• Search and Select
• Parent/Child
• Message Form
An appropriate properties form appears.
On Form Properties, the business view name appears in the gray area below the title
only after you define your form properties and select a business view for your form.
Forms Design automatically assigns a name using the format WzzzzzzzzA, where:
143
W = Form
A = A letter that indicates that the form is the first form created in the application.
It is usually, but not always, the entry point to the application. Subsequent forms
are assigned sequential letters, such as B for the second form, C for the third and
so on.
For example, the application P0101 has two forms. The first form, Work with
Addresses, is the entry point and is assigned the name W0101A. The second
form, Address Book Revisions, is assigned the name W0101B.
Find/Browse - Work With followed by the subject of the application, such as Work With
Companies, Work With Constants.
Fix/Inspect, Header Detail and Headerless Detail - should reflect the topic covered, such
as Supplier Information, Item Master Revisions, Purchase Order Entry.
For lower level forms, identify the form that called the form by appending the calling
form's title, such as Enter Voucher - G/L Distribution.
When the title of a form includes a verb, use an active verb instead of a
nominalization, such as Work With Vouchers.
144
If you turn on the Wallpaper option, you can designate a bitmap as background
wallpaper for the form.
• None
If you click the None option, the bitmap is no longer used.
• Tile
If you turn on the Tile option, multiple smaller images of the bitmap are used to fill
the background instead of one larger image.
1. On the form with which you are working, from the Form menu, choose Business
View.
145
2. Choose the business view to attach to the form.
1. On Interactive Application Design, click the Design Tools tab, and then click View
Forms.
2. On Work with Forms, choose one of the following options:
• Local Forms
• Checked-in Forms
When you create a form, it is local to your machine until you check in the form. When
you check in the form, the system updates the Form Information File table (F9865).
You can view forms that have been checked in or forms that are local to your
machine.
3. Choose one of the available forms to view or revise more detailed information about
the form.
146
Delete a Form
If you have a form in your application that you no longer need, you can delete it. Ensure that
do not want the form because you cannot recover it after you delete it.
► To delete a form
Alternately, you can delete a form on Work with Forms by choosing the form to delete and
then clicking Delete.
► To move a control
1. In Forms Design, on the form with which you are working, position the mouse pointer
over the control.
The pointer changes to the hollow square design tool.
2. Click and hold the mouse button as you drag the control to where you want it, and
then release the mouse button.
1. On the form with which you are working, place the mouse pointer outside the group
of controls that you want to select.
2. Press and hold the mouse button. The pointer changes to the pencil design tool.
3. Drag the mouse to the opposite corner of the group of controls.
As you drag the mouse, a rectangle is drawn from the point that you first placed the
arrow design tool. Verify that the rectangle completely surrounds all of the controls
that you want to select.
4. Release the mouse button. A box surrounds the selected group of controls.
5. Position the mouse pointer over the selected group.
The pointer changes to the hollow square design tool.
6. Click and hold the mouse button as you drag the group to where you want it, and
then release the mouse button.
147
► To move a control and static text
1. On the form with which you are working, position the mouse pointer over the shaded
area between the static text and the control box.
2. When the pointer becomes the hollow square design tool, press and hold the mouse
button.
When the crosswire appears, you can move both the static text and the control box
together.
3. Drag the controls to where you want them. Release the mouse button.
If the static text and the control box are too close together, the hollow square design tool
does not appear in the shaded area. If this occurs, move the text and the control farther
apart. You can also use the pencil tool to draw a box around just one control and move it
independently.
You can size controls by either using the mouse or by using the Size command. The Size
command allows you to specify placement of the controls on the form. You can specify size
and placement for only one control at a time.
1. On the form with which you are working, choose the control.
Handles appear on the control.
3. To change the width, drag a handle at the left or right of the control.
To change the height, drag a handle at the top or bottom of the control.
To change both the width and the height, drag a handle at the corner of the control.
Note
Resize the form and grid using the same method.
1. On the form with which you are working, choose the control.
148
2. From the Layout menu, choose Size.
3. To specify the exact control size in pixels, complete the following fields:
4. To have the tool automatically calculate the width of a control, type the number of
characters in the Width Calculator field, and click one of the following options:
• Average
• Maximum Characters
Average width is about the size of a lowercase x. Maximum width is about the size of
an uppercase W.
7. To specify the exact position of the control on the form, complete the following fields
in pixels:
• Top
• Left
Pixels are calculated from the top and left margins of the form.
1. On the form with which you are working, choose the control or group of controls.
2. From the Edit menu, choose Copy or Cut.
3. Select the form into which you want to paste the control or group of controls.
149
4. From the Edit menu, choose Paste.
5. Move the outline of the controls to the desired location on the form.
6. Click once to place the controls.
When you copy, cut, or paste the control, the system also copies, cuts, or pastes the event
rules that are attached to the control. You cannot copy or paste complex controls, such as a
tab control, grid control, or grid column.
Aligning Controls
Forms Design simplifies the steps required to accurately line up controls in relation to each
other in your forms. For example, you might want to align controls horizontally or vertically or
verify that a related set of controls has the same width or height.
1. On the form with which you are working, select the group of controls that you want to
align.
2. Click the control within the group to which you want to align the group of controls.
3. From the Layout menu, choose one of the following commands:
• Align Left
• Align Right
• Align Top
• Align Middle
• Align Bottom
• Align Center
1. On the form with which you are working, choose Grid Alignment from the Layout
menu.
150
2. To determine grid spacing, complete the following fields:
• Vertical/Horizontal Placement
• Snap to Grid
151
The following example shows a form that displays the alignment grid.
1. On Form Design, choose Set Undo Depth from the edit menu.
2. Enter a number to indicate how many previous steps that you want to be able to
undo.
1. On Form Design, to undo a change (that is, to move backward in the stack of
changes), choose Undo from the Edit menu.
Each time that you choose Undo, the tool reverts back by one change.
2. To reapply a change (that is, to move forward in the stack of changes), choose Redo
from the Edit menu.
Each time that you choose Redo, the tool reapplies one change.
152
Working with Menu/Toolbar Exits
Menu/Toolbar Exits can be items that are only appear in the menu or items that appear in the
menu and on the toolbar. An item must be placed in the menu in order to appear on the
toolbar. The toolbar is a visual shortcut to menu items. You can display a bitmap next to an
item in a form or row menu or on the toolbar. You can create custom exits, or you can use
any of the standard exits that OneWorld provides for a form. You can also modify these
standard exits.
1. In Form Design, on the form with which you are working, choose Menu/Toolbar Exits
from the Form menu.
Depending on the form type with which you are working, any of the following
standard exits might appear:
OK Accepts the data in the form, clears fields, and remains in the form. However, in update mode, OK
closes the form. In add mode, OK might or might not close the form.
Cancel Closes the form and returns to the previous one. Any additions, revisions, or deletions the user
made in this form are ignored.
153
2. If you do not want one of the listed exits to appear on your form, choose the exit and
click Delete.
3. Choose an exit and click Select to edit its properties.
4. To create a new exit, click Add.
5. On Exit Properties, choose the appropriate class.
The classes that are available depend on the form type. The classes and choices that
are available on the Exit Properties form also vary depending on the type of exit that
you select.
Form, Row, and View are standard exits, and they are the only Begin categories that
you use. All exits that are subordinate to these categories are user defined, and the
last one in the list requires an End category. The exits that you create appear on a
drop-down menu on the toolbar. If you select a Row category, all exits that are
subordinate to it need the Grid option turned on.
Adding Bitmaps
No bitmap strips initially appear for you to choose. Bitmap strips are stored in the \package
name\res directory, such as the b7\appl_pgf\res directory. The name of each
bitmap strip begins with hc_. After you have set that strip on an exit for a Begin category, it
appears for any item in that category. You can also use third-party tools to modify and create
your bitmaps.
154
► To add a bitmap
3. Type the file name of your bitmap strip in the File field.
4. Click Add.
5. Choose the strip that you want to use and click Select to apply it to all of the exits in
that category.
155
6. On the Exit Properties form, click the specific bitmap that you want to use for each
exit.
The bitmap strip you chose contains individual bitmaps that you can select.
156
to Begin Categories. See Event Rules Design for more information about creating event
rules.
1. On the Menu/Toolbar Exits form, select the exit that you want to use and click the
Event Rules button.
157
4. Save your work and exit from Event Rules Design.
1. Choose the Menu/ToolBar exits within Form Design Aid and nest the Begin and End
for that Form exit.
158
Insert Edit Group Before and Insert Edit Group After are further subcategories of the
Insert Edit Group menu item.
• Insert field controls to display data, enter data, calculate data, store data permanently
or temporarily, or pass data between other fields and forms
• Place check boxes to provide for multiple selections, or radio buttons to indicate
mutually exclusive selections
A maximum of 250 controls can exist on a form. You can use Form Properties to review the
number of controls on a form. You also receive a warning if you are near the 250-control limit.
• Push Button
• Check Box
• Radio Button
• Edit
159
• Static Text
• UDC Edit
• Grid
• Parent/Child
• Media Object
• Group Box
• Bitmap
• Tree Control
• Tab Control
• Business View Field
• Data Dictionary Field
You can disable controls at design time and then enable them at runtime using event rules. If
a control is disabled, it appears grayed out. If a control is read-only, you can set focus on it or
use the Tab key to move to it, but you cannot enter values.
1. On the form with which you are working, choose Push Button from the Insert menu.
2. Position the control outline on the form, and then click to set the position.
3. To define the push button properties, do one of the following:
• Double-click the push button control
• Choose the push button and then choose Item Properties from the Edit menu.
160
• Title
• Tab Stop
• Group
• Disabled
• Visible
6. Assign an access key by inserting the ampersand symbol (&) in front of the particular
letter in the push button name (optional).
An access key provides a quick way to execute a push button using a combination of
the Alt key and the specific alphabetic key. An underlined letter within the push
button name identifies an access key. Simultaneously pressing the Alt key and that
letter on your keyboard is the same as clicking the button with your mouse.
See Also
Associating Database Items, Dictionary Items, or Descriptions
1. On the form with which you are working, choose Check Box from the Insert menu.
2. Position the control outline on the form, and then click.
3. To define the check box properties, do one of the following:
• Double-click the check box control
• Choose the check box control and choose Properties from the Settings menu.
161
4. Complete the following field:
• Title
• Value Checked/Unchecked
• Tab Stop
• Group
• Disabled
• Visible
162
• You can associate radio buttons with a user defined code field, where each button
has a value from the User Defined Code table.
• You associate a radio button with a database or dictionary item.
See Also
Associating Database Items, Dictionary Items, or Descriptions
1. On the form with which you are working, choose Radio Button from the Insert menu.
2. Position the control outline on the form and click.
3. Repeat steps 1 and 2 for as many radio buttons as you need, and then select all of
the radio buttons to group them and associate each of them to make them mutually
exclusive.
4. To define the radio button properties, do one of the following:
• Double-click on the radio button control
• Choose the radio button control and choose Properties from the Settings menu
• Title
• Value
• Tab Stop
• Group
163
• Disabled
• Visible
The following illustration compares the use of database items and data dictionary items in an
application.
You can insert any data item from the business view to include on the form as a database
item. When you insert a database item, it always includes both of the following:
• A static text control that displays the row or column description from the data
dictionary
• The associated edit control or UDC edit control
164
► To insert database items on a form
1. On the form with which you are working, choose Business View Field from the Insert
menu.
The database control is marked with blue to distinguish it from a dictionary item,
which is marked with yellow.
4. Continue to choose database items from the list. Click Cancel when you are finished.
See Also
Using Quick Form
You insert a dictionary item when it is not already included in the business view for the form
or when you do not want to update the field in a table. Data dictionary items appear with a
yellow box in the left corner on a form.
Use data dictionary items as display-only fields in a form or as a reference for an event rule.
Data dictionary items do not retrieve or update data in a table.
1. On the form with which you are working, choose Data Dictionary Field from the Insert
menu.
165
2. On Data Dictionary Browse Control, specify search criteria and press Enter.
3. Choose a data dictionary item from the available items and drag it to your form.
4. Position the control outline on the form and click.
If the form has a grid, you can place a data dictionary item either on a blank area of
the form or in the grid. If you put the item in the grid, focus on the grid before you
choose the dictionary menu option.
The data dictionary control has a yellow box in the left corner to distinguish it from a
database item, which has a blue box in the left corner.
1. On the form with which you are working, choose Static Text from the Insert menu.
2. Position the control outline on the form and click.
3. To define the static text control properties, do one of the following:
• Double-click the static text control
• Choose the static text control, and then choose Properties from the Settings
menu
166
4. On Static Text Properties, complete the following field by typing the text you want to
appear on the form:
• Title
• Tab Stop
• Group
• Disabled
• Visible
167
If you associate an edit control with a database item, then the value entered by a user at
runtime updates the table. If you associate an edit control with a dictionary item, then the
value entered at runtime is for display only.
Edit Controls have a type-ahead feature. When a user enters a character in the field, the
system searches a history list for a match. If a match exists, it appears in the field with
highlighted text. This feature is particularly useful for data entry work because it can reduce
the amount of typing required. The history list is stored in alphabetical order in a local file in
the Windows root directory. The user can define the length of the history list in the jde.ini file.
A user can enable or disable type-ahead editing in User Preferences. Type-ahead is disabled
for double-byte languages and multiline edit controls.
1. On the form with which you are working, choose Edit from the Insert menu.
2. Position the control outline on the form and click.
3. To define the edit control properties, do one of the following:
• Double-click on the edit control
• Choose the edit control and choose Properties from the Settings menu
• Event Rules
• Tab Stop
• Group
• Disabled
168
• Visible
• Update Mode
• Lines Single
• Lines Multiple
169
2. On Edit Control, choose one of the edit control filter options.
3. Click the Wildcard Display to turn it on, if desired. This option displays an asterisk.
As you add controls to the form, you can indicate how the runtime engine filters the incoming
records from the database. For example, if your Find/Browse form has two controls on which
you want to filter, the resulting SQL statement that you generate will be an AND condition for
each condition. For example, if you have Search Type and Alpha Description as the controls
on the form, the filter criteria for Search Description should be >= and the Search Type
control should be =. If a user types D and puts a V in the Search Type field, the resulting SQL
statement looks like the following:
SELECT * FROM F0101 WHERE (ABAT1 = "V" AND ABDC LIKE "D%") ORDER BY
ABAN8 ASC
You might also want to use filter fields when records need to fall between two values. In this
case, you use a range filter. For example, in distribution, a status is assigned to each line of
the order. One status is the current status and the other status is the next status. In this
example, you filter records that are greater than or equal to the present status and less than
or equal to the next status. You drop one, filter, and then drop the next one.
The visual assist flashlight automatically appears adjacent to the UDC edit control field. When
you click the visual assist flashlight, the attached Search and Select form displays valid
values for the field.
• Associate the data item with a specific UDC table in the data dictionary
• Create a Search and Select form for displaying valid values from the UDC table
170
Creating a UDC Edit Control
1. On the form with which you are working, choose UDC Edit from the Insert menu.
2. Position the control outline on the form and click.
3. To define the UDC edit control properties do one of the following:
• Double-click the UDC edit control
• Choose the UDC edit control and choose Properties from the Settings menu.
See Also
Associating Database Items, Dictionary Items, or Descriptions
You can disconnect the static text from an edit control or a UDC edit control so that you can
move the static text and edit/UDC control separately or delete either the text or the control.
Disconnecting the static text of the data item for the edit box, and then deleting the static text
from the form has the same effect as associating an edit control with a database item.
171
In some cases, the text or description is not necessary. For example, in Purchase Order
Entry, the order type follows the order number, but the description, Order Type, is not
necessary.
1. On the form with which you are working, choose the item for which you want to
disconnect the static text from the control.
2. From the Edit menu, choose Disconnect.
Now, you can move the static text and edit/UDC box separately. You can use the Cut
or Clear option to delete either one. See Data Dictionary for information about setting
triggers in the data dictionary.
You can use the media object control in a variety of ways. You can add images, shortcuts to
other applications, and text. You can add multiple media objects to a form. You can add
multiple text objects to a single media object. You can also add generic files or URLs.
If you want to display a file that is available on the Internet, you can attach the media object
control to the form and create a link to the Internet.
After you define your media object queue for the Internet and include a valid HTTP address,
you can use the Start Web Browser system function to open the control and display the
Internet file.
172
For example, you might use this control when you need to verify the Web page for a shipping
vendor so that you can track the status of shipments. You can look up the shipment directly
within the media object control.
You can also use the Text feature of the media object control. For example, you can use the
media object control to display instructions that are specific to a particular form.
You can use the Hide Splitter Bar system function if you do not want your employees to have
access to other media object functions.
173
You can also use the media object control to display the employee queues to which
messages are sent. A media object control appears next to the tree control on a Parent/Child
form. Next, event rules establish a relationship between the tree side and the media object
side. For example, if a message is highlighted in the tree, then the corresponding message
text appears in the control.
1. On the form with which you are working, choose Media Object from the Insert menu.
2. Position the control outline on the form and click.
Size the control so it is large enough to show the entire control. If you make the
control too small, it will not show everything that is part of the control. The control
looks like the following example when it is sized.
174
3. To define the media object control properties, complete one of the following:
• Double-click the media object control
• Choose the media object control and choose Properties from the Edit menu
175
4. On Media Objects Control Properties, click one or more of the following attributes:
• Tab Stop
• Group
• Disabled
• Visible
• Read Only
You can also use the bitmap control for an animated gif instead of a bitmap. An animated gif
is particularly useful for Java and HTML applications. The animated gif is animated in Java
and TML applications, however, in Windows applications, it does not appear animated, and
only the first image of the animated gif file appears.
You can use Tree Control system functions to add logic to your control. You can use these
system functions for actions such as contracting and expanding nodes or setting bitmaps for
nodes.
176
► To create a bitmap control
1. On the form with which you are working, choose Bitmap from the Insert menu.
2. Position the control outline on the form and click.
3. On Bitmap Properties, click Find to find the file that you want to use for your bitmap
control.
The Bitmap Properties form displays the bitmap that you chose.
177
4. Complete the following field:
• Tool Tip Text
This text, like Hover Help, appears when the user hovers the mouse pointer over
the bitmap.
• Clickable
If you turn on the Clickable option, the system enables a Button Clicked event for
the bitmap.
1. On the form with which you are working, choose Tree Control from the Insert menu.
2. Position the control outline on the form and click.
3. Size the control if needed.
178
► To create a combo box control
1. On the form with which you are working, choose Combo Box from the Insert menu.
2. Position the control outline on the form and click.
1. On the form with which you are working, choose Text Box from the Insert menu.
2. Position the control outline on the form and click.
179
3. Enter the text that you want to use.
180
Creating Group Boxes
A group box visually categorizes and defines a group of fields by surrounding the controls
and providing an optional title for the group. You can display the group box in different styles.
1. On the form with which you are working, choose the controls to be included in the
group box by drawing a box around the fields.
2. From the Insert menu, choose Group Box.
3. To define the group box properties, do one of the following:
• Double-click the group box
• Choose the group box and choose Properties from the Settings menu
• Tab Stop
• Group
• Disabled
• Visible
181
Static Edge The box has a three-dimensional border.
1. On the form with which you are working, do one of the following to define the grid
control properties:
• Double-click the grid
• Choose the grid control and choose Item Properties from the Edit menu
182
• Hide Column Lines
• Update Mode
• Multiple Select
This option must be turned on in order to make a form multiselect, such as to
allow multiple grid rows to be selected for an operation. The property event rule
for the button (such as Select or Delete) must have the Repeat Event Rule for
Grid option turned on.
• Tab Stop
• Group
• Disabled
• Visible
4. To define properties for a selected column, choose an item from the Grid Columns
list and click Select.
5. Click any of the following to specify additional grid properties:
• Font
• Options
For information about grid options, refer to Defining Options For a Grid.
• Data Sort
If you click Data Sort, the following form appears, and you can choose the way in
which you want to sort the data.
183
Choose an available column and click the right arrow button to sort on that
column. After the column appears in Columns Sorted, choose it and right-click
the A/D (ascending/descending) column to toggle to either an ascending or
descending sort order for that column. The columns are sorted starting with the
top one under Columns Sorted. You can sort on several columns, if necessary.
Use the arrows in the menu to change the order of your sorted columns.
See Also
Foundation for information about how to customize the grid at runtime
1. On Grid Properties, choose the grid column for which you want to define properties.
184
2. Click the Grid Column Properties button.
185
4. Click one or more of the following attributes:
• Visible
• Disable input
• Disable QBE
5. Click one of the following options to indicate the sort order:
6. Click one of the following display styles:
• Default
• Check Box (Check Box is currently unavailable)
7. Click the following to define additional grid properties:
• Overrides
• Options
• Event Rules
186
► To define properties for the parent/child control
1. On the form with which you are working, perform one of the following:
• Double-click the grid portion of the parent/child control
• Right-click the parent/child control and choose Properties
187
• Multiple Select
• Always Hidden
3. Click any of the following attributes:
• Tab Stop
• Disabled
• Group
• Visible
You can select multiple objects; however, they must be at the same node level. Two modes
are available. In the first mode, a one-to-one correspondence exists between the tree and the
grid. The other mode shows all details of the tree. You can also load trees pre-expanded.
This option is on the right mouse menu.
After you complete the above steps, you set up either a parent/child relationship or use event
rules to load child nodes to the tree. The method that you use depends on whether your table
has an inherent parent/child relationship. In the following examples, the first example
describes a situation in which an inherent parent/child relationship exists in a table. The
second example describes a situation in which the data does not have an inherent
parent/child relationship by keys, but can appear in a hierarchical manner for readability.
You can use event rules and system functions to customize the way in which your
parent/child control functions. For example, you can change the top node of a tree or change
the node that appears as the first child on a tree.
188
Example: Inherent Parent/Child Relationship
This example describes a case in which an inherent parent/child relationship exists in a table.
For instance, in the Bill of Material Master File table (F3002), IXKIT is the short item number
for the kit. Kits are composed of multiple items within IXKIT, represented by IXITM, the short
item number for the item.
Kit item 60038 includes items 60062, 60118, 60126, and other items as its children.
Item 60062 includes 60097, 60935, 61137, and other items as its children.
Because this inherent relationship exists within the table, you can develop a parent/child
application over the Bill of Material Master File table (F3002), using the V3002A business
view.
189
This structure represents data from the same table shown in the parent/child format. When
you first inquire on the 60038 item in the filter field, you generate the same SQL statement as
you would on a normal Find/Browse form.
When you click on the + node next to item 60062, the runtime engine takes the value of the
Item Number and moves it into the Parent Item Number, making it the parent for the fetch.
Complete the following steps to set up the parent/child relationship to be used when the
runtime engine loads nodes to the tree:
190
3. Indicate which child item should be used as the parent for loading the next level
nodes.
A Parent/Child form is an extension of the Find/Browse form, where the tool performs fetches
using different keys to access its data. Some things to consider when you create a
Parent/Child form include:
191
The parent/child relationship is not inherent to a particular table because the application is
accessing multiple tables, such as Company Master, Account Master, and Chart of Accounts,
to get information.
Page-at-a-Time Processing
Page-at-a-time processing ensures that each fetch fetches only one page of data. Page-at-a-
time processing is the default mode for all parent/child forms.
During page-at-a-time processing in standard mode, the page size is the number of nodes
that can fit in the current view. When the Find process begins, only one page of the first level
nodes is fetched from the table and inserted in the tree. When the user scrolls down, a new
page of data is fetched.
Page-at-a-time processing for the expand-all style of Parent/Child forms is similar to that for
standard mode. When the Find process starts, one page of first-level nodes is fetched from
the table and inserted into the tree. Then, all of the first-level nodes are expanded. Each
expansion fetches only one page of data. Because the tree expands exponentially in expand-
all mode, a very deep tree might affect performance.
Tree Nodes
When the parent and child nodes come from different tables or are of different data types, the
parent/child relationship is not automatically set up. In this case, the runtime engine does not
automatically fetch the child database records because it does not know the table from which
to retrieve them.
192
Parent Nodes
If possible, use the runtime engine to load the initial set of parent nodes to the tree for you.
You do this by using the based-on view, which is a view over the table for the upper-most
node. You can use a parent filter in the control, and the runtime engine loads the first level
nodes to the tree. If you cannot do this, you must insert the first-level nodes yourself. To do
this, you typically use Table I/O on the Button is Clicked event of the Find button. You use the
same methods as you use to insert child nodes. Use a Suppress Find system function to stop
the runtime engine from attempting to load any nodes.
Child Nodes
Whenever a node is expanded, the system function Suppress Fetch on Node Expand is
called from the event Tree Node Is Expanded. This tells the runtime engine not to do any
fetches because event rules will handle the loading of the child nodes. Tree Node Is
Expanded is the main event of the application. This event occurs when the tree node is
expanding (such as when the plus next to a child node is expanded for the first time). You
place event rules on this event to read the next records to be loaded to the tree as children of
the expanded node. You can use table I/O or business functions to retrieve these records.
Often the children come from different tables, based on the type of parent node that is
expanded. If possible, you should perform a SELECT and then use the FETCH NEXT
command to retrieve records in a DO WHILE loop. The GB runtime data structure is populated
with data from the records read in the loop, and then an INSERT GRID BUFFER ROW
system function is called. This parent child system function is different from the INSERT
GRID BUFFER ROW in the normal GRID section. At this point, you also can set your custom
tree bitmaps using the SET TREE NODE BITMAP system function.
Example
In the following example, event rules are attached to an application on the Tree Node is
Expanding event:
//
// Here are the variables to get out of the account and the business unit loop
// being initialized.
VA frm_OutOfLoop = ”0”
VA frm_ExistAcctLoop = ”0”
//
//
//
F0006.Open
F0006.Select
Else
VA frm_CurCompany = BC Company
F0006.Select
193
End If
//
// While Loop which fetches all the all the business unit for a specific company.
F0006.FetchNext
GB BusinessUnit = GB Companies
GB Co = BC Company
VA frm_PreCompany = BC Company
VA frm_ConcateBuDesc = ” ”
//
// Tells the Level of the Tree Structure.
GB LevelOfTreeInt = ”1”
//
Insert Grid Buffer Row(FC Parent/Child, <After Last Row>, <Yes>, <No>, <No>, <No>,
<No>, <Yes>)
Set Tree Node Bitmap(FC Parent/Child, <Last Grid Row>, BussUnit.bmp, <Yes>)
//
//
End If
Else
VA frm_OutOfLoop = ”1”
End If
End While
F0006.Close
Else
VA frm_CURBU = GC BusinessUnit
F0901.Open
F0901.Select
//
End If
//
194
// While Loop to pick up the accounts till the Fetch Fails.
F0901.FetchNext
GB Sub = VA frm_DBSUB
GB ObjAcct = VA frm_DBOBJ
GB Name = VA frm_AcctDesc
GB BusinessUnit = VA frm_CURBU
GB AccountID = VA frm_AIDF0901
GC AccountID = VA frm_AIDF0901
If SV File_IO_Status is equal to CO ERROR
VA frm_ExistAcctLoop = ”1”
Else
GC Companies = ” ”
GB Companies = ” ”
GC Companies = VA frm_AIDF0901
//
GB LevelOfTreeInt = ”2”
//
Insert Grid Buffer Row(FC Parent/Child, <After Last Row>, <Yes>, <No>, <No>, <No>,
<No>, <No>)
Set Tree Node Bitmap(FC Parent/Child, <Last Grid Row>, accounts.bmp, <Yes>)
End If
End While
End If
FC BUFrom = ” ”
• Begin Drag - If you allow drag-and-drop, then, on the Begin Drag Operation event,
GCs are copied to GBs.
• Drag Over Node - You can attach event rule logic to this event to verify that the node
on which the dragged record is about to be dropped is a valid situation. If it is not,
you can use a system function to change the cursor to a No Drop cursor to indicate
that dropping the record there is not allowed. If the cursor is not the No Drop cursor,
when the record is dropped, the event End Drag runs.
195
• End Drag - You can attach event rules to this event to update or insert information
that has been moved or copied via the drag. Be aware of the effect of using Insert
Grid Buffer Row in the End Drag event, as well as deleting the grid row dragged if the
operation is a Move.
• Drag Mode - You can verify the Drag Mode system value at any time to determine
the type of drag that a user is performing. For example, you can determine whether
the drag is a move or a copy.
If you change any control options, you do not have to regenerate the application. Control
options are interpreted at runtime.
1. Focus on the form and choose Properties from the Form menu. On Form Properties,
click the Options button.
196
► To define grid options
1. Focus on the grid and choose Properties from the Form menu.
2. On Grid Control Properties, click the Options button.
1. Focus on the control and choose Properties from the Form menu.
2. On Edit Control Properties or UDC Edit Control Properties, click the Options button.
197
3. Click any of the following options:
Database Items
If you want the user-entered value for a checkbox or radio button to update the record, then
the control must be associated with a database item.
For example, a check box can be associated with the database field called Taxable. In the
check box properties, the Checked value should be Y and the Unchecked value should be N.
You can use these values in event rules, and they will update the Taxable database field in
the table.
Dictionary Items
Because dictionary items never update the table, you can use them only in event rules. In the
dictionary item, the user can enter values that will be used in event rules, or an event rule can
produce a value that appears in a data dictionary item.
198
Descriptions
When you associate a description with an edit control or UDC edit control, a description of the
value in the control automatically appears next to it. Associating a description is optional but
is useful as a visual aid on the form.
For example, suppose that the address book number 1001 appears in an edit control or in a
UDC edit control. When the user presses the Tab key to move out of the control, the address
book name XYZ Company appears next to the control.
1. On the form with which you are working, click the control.
2. From the Edit menu, click one of the following:
• Associate Database Item
• Dictionary Item
• Description
3. If you are associating a database item or dictionary item, locate and choose the item.
4. If you are working with a description, move the control to the desired position on the
form and click once to place it on the form.
If you associate radio buttons and you want them to be mutually exclusive, select them and
apply a group box.
Each control that is designated as a tab stop is numbered according to the way the cursor
travels. For example, when the user opens the form, the cursor appears on the control
labeled number one. When the user presses the Tab key, the cursor moves sequentially to
the next control (tab stop) on the form.
Only those controls that are designated as tab stops in the control properties are affected by
the tab sequence.
The default tab sequence is the order in which you place the controls on the form.
1. On the form with which you are working, choose Tab Sequence from the Form menu.
199
The controls are already numbered.
2. Click the controls in the order in which you want the cursor to travel.
The first control that you click becomes number one, the second becomes number
two, and so on. To reset the numbers to their original values, right-click anywhere in
the window.
3. To hide the tab sequence, from the Form menu, choose Tab Sequence again.
To set the tab sequence for a group of controls (such as a set of radio buttons), the Tab Stop
and Group properties must be turned on for the first control in the group. All other controls in
the group should have these properties turned off. This ensures that the cursor tabs to the
first control in the group and skips the others. To move within the group, use the arrow keys.
200
The form has a single business view. One commit for the form exists on the OK button. You
can use system functions, such as Set Focus, to add additional functions for the tab controls.
Each tab page has a Tab Page is Selected event and a Tab Page is Initialized event
associated with it. You can attach additional event rule logic to these events. When you use
tab pages in an application, you can focus on the upper-right corner of the tab page and
move it around. This strategy allows you to see several pages at the same time.
1. On the form with which you are working, choose Tab Control from the Insert menu.
Page Properties appears to indicate which page of information you are on.
201
2. On Page Properties, complete the Page Title.
Your form appears with a tab at the top.
4. On Page Properties, change the generic tab name to one that suits your needs.
202
5. After you create the initial tab control, choose Tab Page from the Insert menu to add
additional tab pages as necessary.
The size of each page in the tab control is equal to the size of the entire tab control.
You cannot resize an individual page to be bigger or smaller than the others.
The Windows runtime engine does not recognize control modes; only the HTML runtime
engine recognizes them. Mode 1 is the default mode. You attach an application to a menu to
run. This menu allows you to run an application in different modes. When you run an
application over the Web, the application runs in mode 1 by default and another mode, if you
specify one. If you attach an application to a Windows menu, the Windows runtime engine
ignores any modes that you specified and runs the application in mode 1. Use modes
consistently throughout your applications. To create Web-enabled versions of your forms, you
generate them in Java and HTML using the Java & HTML Generator. The generator allows
you to generate forms simultaneously for one or more modes.
See Also
Developing Web Applications
203
Viewing Forms in a Particular Mode
You can view the forms that you are developing in one of three modes:
• Mode 1
• Mode 2
• Mode 3
You usually develop your applications in Mode 1 and customize them as needed for Mode 2
and Mode 3.
You can set mode properties individually for each control on a form. The default display for all
modes is enabled. The mode properties allow you to enable or hide controls for each of the
following modes:
• Mode 1
• Mode 2
• Mode 3
If you hide a control, it is disabled. This means that the event rules and logic for that control
will not run, so be very careful when you hide controls.
1. On the form with which you are working, right-click the control that you want to
enable or hide.
2. Choose Modes from the menu that appears.
204
3. On Modes Properties, double-click the Enabled box beside one of the following
modes:
• Mode 1
• Mode 2
• Mode 3
4. From the menu that appears, choose one of the following:
• Enabled
• Hidden
Controls are automatically enabled unless you change them to hidden.
Use the disable option to turn off data dictionary triggers for a specific item, or to override
triggers to change to a new value or option.
1. On the Form, Grid, Edit Control, or UDC Edit Control Properties form, click Overrides.
205
2. Click any of the following Disable options:
• Editing
• Formatting
• Default Value
• Next Numbering
• Upper Case
• Visual Assist
3. Click any of the following to override triggers that were previously defined in the data
dictionary:
• CB - Default Value
• CB - Visual Assist
• Formatting
• CB - Edit Rule
206
• CB - UDC
• CB - Next Number
• CB - Styles
• CB - Display Decimals
See Also
Data Dictionary for information about setting triggers in the data dictionary
• None
207
Overriding a Visual Assist Trigger
You can override a visual assist trigger.
• None
• Calculator
• Calendar
• Search Form
• None
• Procedure
• Formatting
208
Overriding an Edit Rule Trigger
You can override an edit rule trigger.
• None
• Procedure
• Edit Rule
209
Overriding a User Defined Codes Trigger
You can override a user defined codes trigger.
• None
• Override
210
Overriding a Styles Trigger
You can override a styles trigger to change the way in which information appears on a form.
• Display Decimals
• To reuse forms. For example, you can reuse message forms and display the
appropriate message depending on specific conditions.
211
• To reuse grid columns instead of hiding and showing them by changing the column
heading text.
1. In Form Design, on the form for which you want to add a text variable, choose Text
Variables from the Form menu.
The system displays the current text variables that are associated with the selected
form.
2. Under Text String, choose the last empty row and enter the text string that you want
to use.
3. Use the Tab key to move to the next row to create another text variable.
If you try to create a text string that is named the same as another variable on the
same form (or on the same section in Report Design), an error occurs. Rename the
variable to clear the error.
If you delete a text variable that is referenced in event rules, you must also delete its
reference in event rules.
212
Attaching or Assigning a Text Variable
You can use system functions to attach text variables. You can use a system function to
change the text for a control, to change the name on the form, or to change the text in a grid
column heading. The following system functions are typically used for text variables:
• SetControlText
• SetGridColumnHeading
• SetFormTitle
The available text variables appear in the Available Object list for System Functions.
Available text variables also appear when you use assignments.
1. To attach text to a control, on the form with which you are working, choose event
rules from the Edit Menu.
2. From the events list, choose the event to which you want to attach the text variable.
3. Click the System Function button.
213
5. Complete the parameters.
See Attaching Functions for more information about attaching system functions.
214
You can also assign a text variable to the edit fields of data dictionary and business view
items. See Creating Assignments.
Depending on the number of selected fields, you might need to resize the form or move and
align fields to achieve the desired layout.
• Vertical/Horizontal Placement
You can use standard processing for media objects to bypass all event rules that are required
to implement media objects. All of the required information is gathered for a form in Forms
215
Design Aid and does not require the entry of any event rules. Standard processing does the
following:
• Allows you to implement media objects at the form level with no event rule coding
required
• Standardizes how you use media objects across forms
• For any grid, places a paper clip icon on the row header if a media object is defined
for that row
• For a form, places an icon in the status bar if a media object is defined for the form
• Allows you to attach documents to the form or to a row in the grid
• Allows you to double-click the paper clip icon in a row to start media objects for that
row
• Allows you to click on the paper clip icon in the status bar to start media objects for
the form
• If you choose not to use standard processing for a form, you can still use event rules
and system functions to make media objects work.
The Media Objects Storage table (F00165) stores link records for media objects and imaging.
You must define your media object data structure using a unique key structure so that the
F00165 table can store data correctly. The layout of the F00165 table is as follows:
GTxxx is the naming convention that you use when you define a media object data structure.
The F4211Keys portion is the information that the system uses to access the unique media
object attachment for that particular record. These keys typically match the unique key for
each detail line in the F4211 table. The media object text portion is the actual text attachment
that would store information that the user typed. The F00165 table chains records for text that
is greater than 30K. A sequence field indicates the order of the text and that the text is stored
in two files.
The Media Object Categories table (F00166) contains a record with characterization values
for each media object that has been characterized. Each record contains the characterization
values for a single media object, such as a text or word document. Multiple F00166 records
can exist for each F00165 record. The key is the same as that of the F00165 plus the Object
ID.
The Media Object Category Constant table (F00167) contains a record that indicates which
categories are used to characterize setup for each GT structure. Only one record exists for
each GT structure.
The Media Object Queues table (F98MOQUE) is used for multiple OLE queues. It includes
the following:
216
Imaging
Imaging allows you to use images from third-party software. For performance reasons,
imaging occurs on a form-by-form basis. When you attach an image to a document, the
media object form includes the vendor's software as a choice.
When you use a third-party vendor, the Media Object Storage table (F00165) stores the
reference to image attachments, but the third-party software controls the search and retrieval
of images.
1. On Form Design, choose Media Objects Setup from the Form menu.
2. On Media Objects Setup, click the Enable Automatic Media Object Functionality
option to turn it on.
This option enables imaging and opens the other fields on the form.
217
3. Click one of the following options:
• Media Objects Only
• Document Handling Only
Use the Document Handling Only option if you are developing a form that is
enabled for media objects via functionality in event rules and you want to bypass
standard processing. If you want to enable standard processing later, you must
delete all of the event rules for media objects and click the Media Objects &
Document Handling option to turn it on.
218
The key structure stores link records in the Media Objects Storage table (F00165).
These links are critical to proper functioning of Imaging.
219
7. Choose the appropriate structure and define it.
1. On the application that you want to use, type a language in the filter field.
220
2. Click Add.
3. Add multiple records if you want the attachment for multiple languages or base.
221
If you create a custom application that you want to enable for media object language
handling, you must include a data item language preference (alias LNGP) in the generic text
data structure that you create.
If language (LNGP) is not a database column, then you define your media object (GT) data
structure to include language as part of the data structure. You place a data dictionary control
(LNGP) on the application as a filter field, which should then be loaded with the system value
for language. When you design your application this way, you attach two separate media
objects, based on the language, to the same record.
If language (LNGP) is a database column, then you include LNGP (database) as a filter field,
but you must add a separate record to the database table along with its media object
attachment. The media object data structure still contains language as part of the key to
retrieve the media object attachment. In both cases, the language filter fields (LNGP) must be
loaded with the system value for language. LNGP must be built into the key and not
associated with the LNGP column in the Media Objects Storage table (F00165).
For example, the following Address Book application includes Address Number and
Language as filter fields. The language control is not from the database; it is a dictionary
control.
For a blank language (English), Address Book record number 4247 has a media object
attachment in English.
222
When a user whose language preference is set to French (F) accesses the same record, the
filter field does not load with F, and the user sees a different Media Object attachment for the
record. The Address Book does not have two separate records based on the language, but
only one record in English. For the French Media Object attachment, a separate record exists
in the F00165 table for the same Address Book record. It can be accessed using the
language filter control field.
In this example, the ABLNGP field and column from the Address Book table is the filter field
on the form. The Language field on the form is from the database, not a data dictionary item.
223
When you search for records using blank or * (English or ALL) as the base language, you see
all records in the Address Book with their corresponding media object attachments. You use
the same media object data structure as you did with the previous case, which contains the
Address Number and Language data items. You still load the user's language preference in
the language filter field, but, when the application fetches records from the database, it uses
the language as part of the key to select records from the Address Book. In this example, if
no records exist in the Address Book with the language preference for French (F), you do not
see any records; therefore, you must then add records using French as the language.
224
Because the Address Book is keyed using only address number, not the language, you
cannot add a record for address book number 4247 in French. Instead, if you want to see
only the French records, you can add new address book records with new address book
numbers that have the language Preference of French.
For any database table that contains language as part of its key, you can attach media object
functionality for records with different languages. For example, you can create one record for
English and a copy of the record for French with unique media object attachments. For tables
that do not include language as part of the key to that table, you can have media object
languages, To see and example, go to the Item Master Print Messages program (P40162)
from menu GH4112.
Testing a Form
You should test a form to verify placement of controls on the form. When you test a form, it
appears exactly as it will appear in the application.
Test mode is for viewing only. You cannot modify a form in test mode. Test mode works for
the default Windows mode.
225
► To test a form
Language Preview
You can preview forms in foreign languages. You must have the base language installed on
your machine to do this.
1. On the form you want to preview, choose Language preview from the Form menu.
2. Choose the language in which to display the form and click OK.
3. To continue designing the form, close the language preview form.
226
Event Rules
Use Event Rules Design to create business logic for an application. For example, create
event rules that do the following:
Understanding Controls
A control is a reusable object that appears on a form. Examples include push buttons, edit
fields, and grids. A form itself is also considered a control.
Controls can be simple or complex. Simple controls have few event points to which logic can
be attached. Complex controls can have many event points to which logic can be attached.
Understanding Events
Events are activities that occur on a form, such as entering a form or exiting a field using the
Tab key. Events can be initiated by the user or the application. A single control can have
multiple events that it might initiate. The system also initiates some events, such as Last Grid
Record Read, when certain actions occur.
227
Understanding Form Processing
Form processing refers to the business logic associated with each form. By default, each type
of OneWorld form automatically includes basic processing for various events. Then, using
Event Rules Design, you can build additional logic. Form processing depends on the
occurrence of specific events, such as initializing a form or changing the value of a field.
228
rules can be in application event rules (interactive or batch) or in table event rules. They can
be compiled or uncompiled.
You can add business logic that is specific to a particular application. Interactive applications
connect event rules via Form Design, while batch event rules use Report Design.
You can create database triggers, or rules that you attach to a table using Table Design
Event Rules. The logic that is attached to a table is executed whenever any application
initiates that database event. For example, to maintain referential integrity, you might attach
rules to a master table that delete all children when a parent is deleted. Any application that
deletes information from that table does not need to have the parent/child logic imbedded in it
because that logic exists in the table.
Refer to the online help Published API section for information about individual events.
Else Inserts an Else clause, which is valid only within the bounds of If and Endif.
Table I/O Allows event rule support for database access. Performs table input and
output, data validations, and record retrieval.
229
Event Rules Based on Form Type
Each form type has specific event rules that you typically use for that form type.
Fix/Inspect
Runtime Processing
Runtime processing refers to how the system evaluates at runtime events (such as initializing
a form, clicking a button, and using the Tab key to move between fields) and their attached
event rule logic. Event rule logic is attached to events, which, in turn, are attached to controls.
Forms Design provides several different form types, each of which includes predefined fields
andfeatures that are specific to the form type. For example, the Find/Browse form
automatically includes a Find menu option or toolbar button with appropriate capabilities
attached to it. When you type search text in a filter field or Query by Example (QBE) field, and
then click the Find button on the toolbar, the runtime engine processes logic to fetch a record
.
To avoid generating unnecessary event rules, you should understand the different field types
and associated capabilities that characterize each form type. You can also customize existing
event rules.
The runtime system dynamically creates runtime data structures. For example, if a form
contains hidden controls, the system allocates memory for those controls even though they
are not visible on the form. When you pass processing option values in a form, the system
allocates memory to store the processing option value.
During runtime processing, the system stores data in memory in an internal data structure. A
data structure enables data to pass to another field on the same form or between forms.
Certain fields of the data structure temporarily store data during runtime. When the data is no
longer needed, the system deletes it so that it can process another record.
230
Available objects include following:
BC A column in the business view. Business view columns for both the form view and the grid view
appear in this list. The system fills these columns with values from the database when it performs
a fetch. The system saves the values to the database during an add or update.
GC A column in the grid. The row that the value references depends on which event is accessing the
GC. During the fetch cycle, the system fetches the row. It is usually the selected row. In some
circumstances, these objects also denote a particular physical column in the grid instead of a
value, as with the Set Grid Line Font system function.
GB The grid buffer. This buffer is one row of data space that is independent of the lines that the
system reads from the database and writes to the grid. The grid buffer allows you to manipulate
column data for a line that you wish to insert or update without affecting the grid's present state.
You access the grid buffer through the available object Grid Buffer Column (GB), which appears
after the Grid Columns (GC) in the list of available objects in event rules. Each grid contains only
one instance of each GB column. The grid buffer is not associated with any particular line.
FC A control on the form. If the control is a database item, this field corresponds to a BC object.
Furthermore, if the control is not a filter, the FC object represents the same value as the BC
object, and changing one of these results in changing both.
FI A value passed through a form interconnection. You access this object to read values that are
passed into the form or to set values to be passed back. These objects correspond to the
elements of the form data structure.
PO A value passed from a processing option. These values are passed into the application when a
user starts it, and any form in that application can access them. Processing options can either be
entered by the user, or they can be set up in a particular version of an application.
QC A column from the Query by Example (QBE) line in the grid. These objects represent the values in
any QBE cell on the grid. They include wildcards, but do not include any comparison operators.
Likewise, assignments to these objects can include wildcards, but not comparison operators. You
can use a system function to set comparisons. QC objects do not affect the data selection on an
update grid.
HC Hypercontrol item. These objects represent hypercontrol items on the form's hypercontrol. They
can be used to enable and disable those items on the form menu and on the toolbar, as well as
invoke them through event rules.
VA Event rules variables. These objects represent any variables that the developer set up in event
rules. The system does not manipulate event rules.
SV System variables. These objects represent some environment variables that are accessible to
event rules.
SL System literals. These objects represent some constant system values that are accessible to
event rules.
TV Text variable.
231
RV Report variable (UBE).
BC and FC share the same internal structure if an FC is associated with a database item;
filter fields are an exception.
To automatically tailor searches to certain situations without adding filter form controls, you
can assign values to QBE Columns using event rules. Unlike filters, event rules allow you to
change comparison operators at runtime instead of during design time.
• The new value is copied to the business view data, grid data, form control data, form-
interconnect data, or processing option data immediately after that ER line is
processed (internal runtime structure).
• Form control data and grid data are copied to the appropriate form control or grid cell
(external screen).
Form control data that is associated with database items share the runtime data structure
with business view data. (Filter fields are an exception to this rule.) This means the following:
232
For Fix/Inspect and Transaction forms, this logic is also performed for each control on the OK
Button.
Grid Processing
You can use system functions to manipulate the selection or sequencing in a grid. These
functions give you direct access to the database APIs and the selection and sequencing
structures that you use when the runtime engine populates the grid. You can use the
following system functions for this purpose:
Set Lower Limit Creates one element in the select structure. This system function is similar to
Set Selection.
If a Headerless Detail form contains at least one equal filter or one nonfilter database form
control, the system updates the grid records for the form only if they change.
You can also use the Get Custom Grid Row event, and system functions, such as Continue
Custom Data Fetch, for page-at-a-time processing for custom grids. This processing allows
you to fetch only a page of data at a time to limit the number of possible records. This is
particularly useful for grids in which you might be fetching thousands of records.
Grid columns have type-ahead capability. When a user enters a character in the field, the
system searches a history list for a match. If a match exists, it appears in the field with
highlighted text. This feature is particularly useful for data entry work because it can reduce
the amount of typing required.
Form Flow
Each form type has its own properties and its own event flow. Processing occurs regardless
of whether you add event rule logic. However, the engine pauses at specific events, such as
Dialog Is Initialized, so that you can add logic or manipulate values. Event rule logic and user
interaction determine how events execute.
Some of these events occur on each form, although the order and number of events varies
depending on the form type. For example, Dialog Is Initialized is a good place to add logic on
all forms. Post Dialog is Initialized is a good place to add logic on a Fix/Inspect form, but not
on a Find/Browse form. For a form with an updateable grid, Dialog is Initialized and Post
Dialog is Initialized mean something different than they do for a form without a grid. For forms
with an updatable grid, the system performs a Find and reads the database between these
two events.
For more information about the process flow for different form types, refer to Form
Processing.
233
Typical Event Flow for a Find/Browse Form
The following example represents how values in the runtime structures are stored in memory
compared to how they appear on the form. This example uses the Find/Browse form when it
is called directly from a menu.
The runtime engine processes events in a certain order. The typical events for the
Find/Browse form and the order in which they are processed follow. This flow can vary
depending on user interaction and event rule logic that you use.
The following steps occur before the Dialog is Initialized event is processed and the form
appears.
234
• Initialize runtime structures (or memory is cleared)
BC = 0
FC = 0
GC = 0
Dialog Is Initialized
The engine pauses for the event to be processed. The system processes all event rule logic
that is attached to the Dialog Is Initialized event. When the engine pauses, the runtime
structures contain the following values:
GC = 0
The following illustration represents the information in the runtime structures just before the
system runs Dialog Is Initialized.
235
The Dialog is Initialized event is commonly used to do the following:
The engine pauses again for the event to be processed. You can add logic to be processed
when the system runs Post Dialog Is Initialized. When the engine pauses, the runtime
structures contain the following values:
At this point, no records have been fetched yet. The engine pauses just before the FETCH to
allow you to add logic or manipulate the runtime structure values. You can also do an assign
from the filter field here.
The following illustration represents the information in the runtime structures just before the
system runs Form Record is Fetched.
236
The Post Dialog is Initialized event is commonly used to do the following:
• Load filter fields that will be used for the WHERE clause in the SQL SELECT statement
• Load processing option values into filter fields
• Perform any one-time logic for the form, such as fetching a system date
This event runs even when a record does not exist.
At this point, the user must click the Find button to populate the grid. (The J.D. Edwards
standard is to disable autofind.) Then, the system builds the SQL SELECT.
SQL SELECT
After the user clicks the Find button, the system builds a SELECT statement with a WHERE
clause. The SQL SELECT statement marks all columns in the business view.
The WHERE clause includes any values in the QBE line or in filter fields. The WHERE clause is
then used to get all records that meet the QBE and filter criteria.
The following illustration represents the information that appears in the runtime structures just
before the system builds the SQL SELECT and the FETCH occurs.
237
Do in While Loop
Records are fetched one at a time in a WHILE loop. The following occurs during the WHILE
loop:
• The system finds WHILE database records, and WHILE grid rows are available on the
form.
• The system performs page-at-a-time processing.
• SQL FETCH gets one record
Page-at-a-Time Processing
Page-at-a-time processing means that the system fetches only the number of records that
can visibly appear in a grid. For example, if the grid displays only three rows, then three
records are fetched one after the other. In order to fetch the next three, the user must click
the down arrow key on the grid scroll bar. You can size the grid when you design the form.
When page-at-a-time processing occurs, the grid display is cached in memory. (This memory
cache is different than the runtime structure in memory.) Because the grid is cached, the user
can load all records into the grid and then use the up arrow to display a previously-fetched
record. The cache does not cause a new FETCH. For example, if records 45 through 47 are
loaded and the user clicks the down arrow, records 48 through 50 are loaded. If the user then
presses the up arrow and highlights record 45, a new FETCH is not necessary to retrieve
record 45 because it is retrieved from the grid cache.
When page-at-a-time processing is turned on, event rule logic that is attached to the Last
Grid Rec Has Been Fetched event will not be executed unless the user clicks the down arrow
key on the grid scroll bar enough times to fetch the last record.
After the system fetches the first record in the WHILE loop, it copies the database values to
the BC runtime structure. Values from each marked column in the table appear in the BC
runtime structure elements.
The following illustration represents the information in the runtime structures when the system
reads the first record in the WHILE loop.
238
Grid Rec Is Fetched
The engine pauses again for the event to be processed. You can add logic to be processed
when the system runs Grid Rec Is Fetched. When the engine pauses, the runtime structures
have the following values:
GC = 0
The following illustration represents the information in the runtime structures just before the
system runs Grid Rec Is Fetched.
239
The Grid Rec Is Fetched event is commonly used to perform the following:
The following illustration represents the information in the runtime structures when the system
reads the first record in a WHILE loop.
The engine pauses again for the event to be processed. You can add logic to be processed
when the system runs Write Grid Line Before. When the engine pauses, the runtime
structures have the following values:
240
GC = Values from the database (from the previous read)
The following illustration represents the information in the runtime structures just before the
system runs Write Grid Line Before.
The Write Grid Line Before event is commonly used to do the following:
The following illustration represents the information that appears in the runtime structures
now.
241
Write Grid Line After
The engine pauses again for the event to be processed. You can add logic to be processed
when the system runs Write Grid Line After. When the engine pauses, the runtime structures
have the following values:
The following illustration represents the information in the runtime structures just before the
system runs Write Grid Line After.
242
You typically use the Write Grid Line After event to add logic after the user sees a row on the
form.
The system reads each record in the database one at a time and passes through the same
processing steps. When the system reads the next record, it performs the following
processing steps:
If the system finds grid records and the user clicks the arrow keys to fetch all records that
meet the selection criteria, the SQL FETCH finally fails. If the grid is full and the user never
clicks the down arrow key, FETCH might not fail because the system might not have read
some of the matching records. When FETCH fails, the system processes Last Grid Rec Has
Been Read.
The engine pauses again for the event to be processed. You can add logic to be processed
when the system runs Last Grid Rec Has Been Read. When the engine pauses, the runtime
structures contain the following values:
243
PO = Values passed from processing options
The following illustration represents the information in the runtime structures just before the
system runs Last Grid Rec Has Been Read.
The Last Grid Rec Has Been Read event is commonly used to do the following:
When a user chooses a grid row and clicks the Select button, the system copies form values
back into the GC structure. The BC structure stays the same, and the system does not
update the database just because the user clicked a row. Therefore, you should select GC as
the value to pass during an interconnection.
The following illustration represents the information in the runtime structures when the user
chooses a grid row. Note that the BC and GC structures do not contain the same values.
244
Button Clicked
The engine pauses for the event to be processed. You can add logic to be processed when
the system runs Button Clicked. When the engine pauses, the runtime structures have the
following values:
The following illustration represents the information in the runtime structures just before the
system runs Button Clicked.
Turn on Repeat Business Rules for Grid if you want to allow a user to select multiple
grid rows.
After the user chooses a grid row, the GC runtime structure is assigned the values that
appear in the grid record on the form. Normally, the user does not choose a row before an
add, but if a row is highlighted, the system copies form values to the GC runtime structure. If
the user does not choose a record, the GC runtime structure contains the values from the last
245
grid record that the system read, if any. The system does not update the database just
because the user clicks the row.
The engine pauses for the Button Clicked event to be processed. You can add logic to be
processed when the system runs Button Clicked. When the engine pauses, the runtime
structures have the following values:
Because this is an add, the content of GC is irrelevant at this point. BC and GC do not
contain the same values.
The following illustration represents the information that is in the runtime structures just
before the system runs Add Button Clicked.
You typically use the Add Button Clicked event to interconnect to another form, such as a
Fix/Inspect or Headerless Detail form on which the system actually performs the add.
Because you are adding a new record, you generally do not pass GC values to the FI
structure of the receiving form here.
When the user chooses a grid row, the GC runtime structure is assigned the values that
appear in the grid record on the form. BC is still the same, and the system does not update
the database.
The engine pauses for the Button Clicked event to be processed. You can add logic to be
processed when the system runs Button Clicked. When the engine pauses, the runtime
structures have the following values:
246
FC = Values from the database (if database field)
The following illustration represents the information in the runtime structures just before the
system runs Button Clicked.
247
Delete Grid Rec Verify After
The engine pauses for the Delete Grid Rec Verify After event to be processed. You can add
logic to be processed when the system runs Delete Grid Rec Verify After.
You might want to perform editing to verify that the delete is valid. For example, other tables
might contain dependant records that that prevent this record from being deleted as long as
they exist.
The engine pauses for the Delete Grid Rec Verify Before event to be processed. You can add
logic to be processed when the system runs Delete Grid Rec Verify Before.
The system processes the logic that is attached to this event after the user clicks OK in the
Verify confirmation window. If the user clicks Cancel in the Verify confirmation window, the
logic attached to this event will not occur.
The system processes the logic that is attached to the Delete Grid Rec From DB Before
event after the user clicks OK to delete a record and after it processes the Verify window, but
before it actually deletes the record.
You can use the Suppress Delete system function with the Delete Grid Rec From DB Before
event to turn off the automatic tool delete and perform the delete yourself. For example, you
can use a business function to perform the delete.
After the system processes the Delete Grid Rec From DB Before event, it builds an SQL
DELETE statement. The engine pauses again so that you can add logic to process. FC is
blank. The SQL DELETE occurs at this point, and the system deletes the current record from
the database. When you choose multiple records, one delete call can delete all of the
records.
The system processes the logic that is attached to the Delete Grid Rec From DB After event
after the user clicks OK to delete the record and after the system processes the Verify
window and actually deletes the record.
You might use this event to call a business function to delete information from related tables
that are not in the business view.
You can also add logic after the system physically deletes the record from the database. The
system processes logic that is attached to the All Grid Recs Deleted from DB event after it
deletes multiple grid lines and the corresponding database records. Rules that are attached
to this event are not apparent on the screen and cannot manipulate the grid lines or records.
248
Working with Event Rules Design
You can use Event Rules Design to create event rule logic for controls on a form.
For example, suppose that you want to pass data for a selected record on a Find/Browse
form to a Fix/Inspect form to make revisions to that record. To accomplish this task, you
would create a form interconnect event rule and attach it to the Select toolbar option for the
Button Clicked event.
Before you create an event rule, consider the control (form, button, field, grid, and so on) and
the event upon which the event rule should process. Answering the following questions will
determine under which of the following conditions should logic occur.
See Also
Understanding the HTML Client for information about turning on and off HTML post
(refresh) for an event
Create event rules by clicking the buttons on the toolbar in Event Rules Design. Depending
on the button that you click, a different work area appears for creating and manipulating the
event rule line by line.
249
3. Choose an event from the Events list box.
4. Click one of the following Event Rules buttons to add logic for the control:
• Business Function
• System Function
• If/While
• Assign
• Forms
• Reports
• Else
• Variables
• Table I/O
5. Click the following buttons to add a note, enable or disable a specific line within the
event rule, or delete a specific line within the event rule:
• Comment
• Enable/Disable
• Delete
The Enable/Disable button affects only a specific line within the event rule. To disable
the entire event, select the Disable Event option from the Options menu.
250
You can disable a specific line within an event rule when you want to test your event
rule logic. When you are confident that a line is no longer needed, you can delete it
from the event rule.
To enable, disable, or delete multiple consecutive lines, hold down the shift key and
select all event rules that you want to enable, disable, or delete. After you select the
desired lines, click the Enable/Disable or Delete button.
1. From Event Rules Design, choose Find from the Edit menu.
2. Indicate the direction in which you want to search.
3. Type the string of text that you want to find and click the Find Next button.
You can also paste event rules into other applications, such as word processing documents.
This feature is useful for documentation purposes.
251
You can use any of the following buttons:
• Cut
• Copy
• Paste
• Paste Options
When you cut event rules, the system deletes the selected lines from the source and stores
them on the clipboard.
252
► To paste event rules
1. On Event Rules Design, select the line after which you wish to insert your lines of
event rules.
2. Click the Paste button.
When you paste event rules, the system resolves objects from the source as you past them.
If an object is partially resolved, the system pastes the closest matching object from the
destination event rules. A comment line appears above the partially-resolved line of event
rules and in the status bar to indicate that the object is partially resolved.
Some objects cannot be resolved in the destination event rules. The system disables these
lines of event rules and displays a comment. For example, an EndIf statement is commented
out if its associated If statement is missing.
For criteria statements, the paste operation adds whatever is necessary to maintain a clean,
logical structure. For example, if you paste an If statement and no EndIf statement exists, the
paste operation adds a matching EndIf statement to make the logic complete.
You can set paste options to display comments before and after a block of pasted event
rules.
253
When you paste information, comments indicate where your paste begins and ends.
254
Adding Comment Lines to Event Rules
You can add a comment line to document event rule code.
1. On Event Rules Design, position the cursor where you want to add a comment.
2. Click the Comment button.
255
Printing Event Rule Logic
You can print the code for event rules. This is especially useful when many lines of code
comprise an event rule. You can print event rule code for the following:
• An entire application
• A form
• A control
• A single event
1. On Form Design, click the control for which you want to print event rule code.
2. From the Edit menu, choose Event Rules.
3. On Event Rules Design, choose an event from the Events list box.
The event rule appears in the work area.
256
Validating Event Rules
You validate event rules to help you find errors, such as a variable or business function that
no longer exists or an incorrect business view column. You can validate event rules either as
you are working or when you save an application.
The system validates event rules either when you select Save or when you select Exit and
save before exiting. You can exit Forms Design Aid or leave it open if the system finds errors
during validation upon exit.
• If you select Validate Event Rules Now, the system immediately validates event
rules.
1. On Forms Design, from the Application menu select the following option:
• Validate Event Rules Now
The Validate Event Rules form displays messages as it processes. When the
validation successfully completes, a Generation Successful message appears.
The following example illustrates the message that appears on the Validate Event
Rules form when the system finds an error.
257
Validate Event Rules checks for errors at two levels. The first level is in Business
Function event rules or Table event rules in which system converts the event rule
code from the event rule scripting language to C code and then to compiled code.
The second level is in the application in which the system reviews the event rules for
errors such as data type mismatches, data structure errors, and missing variables
and controls. The Generator does not check logic errors or syntax.
The error log that the system creates is stored in a file such as
b7\prod\log\p1234.log (where prod is your environment). If no errors exist, the
system does not generate a log.
258
Working with If and While Statements
If and While statements are conditional instructions for an event rule. They evaluate
conditions when the event rule is activated and dictate the flow of logic.
If Statements
An If statement executes conditional event rule logic. That is, the logic executes only if the
condition is true. The system evaluates an If statement only once when it executes the event
rule.
IF condition X is true
Do Y
ELSE
Do Z
ENDIF
The Else clause is optional. When there is no Else clause, the If proceeds to the next
statement and evaluates it.
259
The following is an example of an If statement from Sales Order Entry:
While Statements
A While statement repeats conditional event rule logic. That is, the logic continuously
executes as long as a condition is true. A While statement controls the execution of a loop, or
repetitive test.
Do Y
ENDWHILE
260
You can drag and drop statements on a line-by line basis to change their sequence.
Resequencing event rules can result in improper syntax. When you click the Save button or
the OK button, the system verifies the syntax. If it detects syntax errors, you can either
disable the event rule and continue or edit the event rule to eliminate the errors.
Is Equal To and Is Not Equal To are the only valid logical operators when you use range and
list values. The criteria design tool prevents you from using the range and list literals
incorrectly by ensuring that the comparison is either equal to or not equal to. If you choose
Range or List and your comparison field does not contain an Is Equal To or Is Not Equal To
comparison, then the cell is cleared.
To change a statement, click the cell to select the cell or value that you want to change. You
can then change the value of that cell. The system checks the syntax when you click OK. To
move a line (resequence), select the entire row by clicking the row header. Then, use the up
and down arrows on the toolbar to move that line. You cannot move the If/While line.
To delete a statement, select the line of the statement, and then click Delete. You cannot
delete the top-most clause of the statement (If or While) in If/While design; you can only
delete it from the Event Rules Design window.
1. On Event Rules Design, select an event in the Event Rules Design window.
2. Click the If/While button.
Each cell in the Criteria Design grid represents a component of the criteria. When you
select a cell by clicking on it or using the Tab key to move into it, a list of valid options
appears. To select an option, either double-click it or select it, and press Enter or
Tab. You can select an option by using the mouse or by typing the option that you
want to select.
Criteria Design has a type-ahead feature that allows you to type the first few
characters of an item in a field to automatically display a list of available items that
begin with those letters.
261
4. Choose a left operand from the list of available data items.
You can right-click to sort the available data items by name or object type. If only one
type exists, the sort options are not available.
You can group the available data items by the following object types:
HC A hypercontrol
SV A system variable
SL A system value
VA A variable
5. Choose one of the following comparisons from the list of logical operators:
• Is equal to
• Is not equal to
• Is less than
• Is less than or equal to
• Is greater than
• Is greater than or equal to
6. Choose a right operand from the object list.
7. To assign a literal, select <Literal>.
The Literal dialog depends on the data item.
See Defining Literal Values in Event Rule Logic for detailed instructions for assigning
a literal.
262
8. Click save to save the criterion statement and return to the Event Rules Design
window.
If the criteria are incomplete (for example, if you are missing the right operand), you
must fix the criteria or delete it.
You can select the And or Or option to continue your logic to create complex If statements.
The system automatically initializes the event rule variable at runtime because you define
how the event rule variable is used when you create it.
Use event rule variables instead of hidden fields. Event rule variables use fewer system
resources at runtime.
The scope of an event rule variable determines how you can use it. For example, you can do
the following:
• Form level
• Grid level
• Event level
Form-Level
Form-level variables are available at all events for all controls within the form. They are
initialized when the form is initialized and retain values until the form is closed.
Grid-Level
Grid-level variables are subtypes of form variables, and they are available on any form with a
grid. They are available from all events on the form. They apply to the current row. Every new
row added to the grid has the same set of variables. These variables are reinitialized each
time a new row is added to the grid. You can use these variables as temporary work fields for
the grid. If possible, you should use variables instead of hidden work fields for better
performance. Using variables instead of hidden work fields enhances the performance of
OneWorld forms during initialization and saves time because variables are not formatted.
Although grid variables are available in all event rule line types, you should use them only
with events that are associated with grid rows.
264
Event-Level
An event-level variable is available only within the event for the form control where it was
added. The variable is reinitialized each time the event is processed for the form control.
• Report
• Section
• Event
After you add an event rule variable, you cannot be modify it. However, you can delete it.
The system automatically assigns variables one of the following prefixes, based on the
specified scope:
• frm_ (Form)
• evt_ (Event)
• grd_ (Grid)
• rpt_ (Report)
• sec_ (Section)
265
2. Complete the variable naming field.
Event Rule variables are named similar to C variables and should be formatted as
follows: xxx_yyzzzzzz_AAAA, where:
c - Character
h - handle request
mn - Math Numeric
sz - String
jd - Julian Date
id - Pointer
266
AAAA = A data dictionary alias (all upper case)
3. Click one of the following Scope options, depending on the purpose for which you
created the variable:
• Form
• Event
4. Turn on the Grid option if you select Form Scope and you want to use a grid variable.
5. Click the data dictionary visual assist to browse data dictionary items.
267
6. Click the Show All button to display the variable list.
268
7. Choose the data item to which the variable is associated and click Add.
The system automatically assigns a prefix to the variable, based on the type of scope
that you choose.
8. Click OK to return to the design mode for interactive, batch, or business function
event rules and use the newly-created variable.
269
Using Event Rule Variables for Automatic Line Numbering
You can use event rules to create automatic line numbering.
1. Create a variable to hold the value of the line number. Use the data dictionary item
LNID.
VA frm_LineNumberCounter_LNID
3. On the Grid Record is Fetched event, number the lines as each line is pulled from the
database.
If BCLineNumber > VA frm_LineNUmber_LNID
VA frm_LineNumberCounter_LNID = BC LineNumber
End If
4. On the Add Last Entry Row to Grid event, increment the LineNumber and assign the
new value to the next available line.
VA frm_LineNumberCounter_LNID = VA
frm_LineNumberCounter_LNID + 1
GC LineNumber = VA frm_LineNumberCounter_LNID
270
4. Choose the system function that you want to attach.
5. In the Available Objects list, choose objects to pass to the system function.
271
6. Click OK to add the system function to the event rule.
Following are some available system functions and reasons why you might use them. Refer
to System Functions in the Online APIs for more information about different system functions.
Disable Use this system function to dynamically enable or disable a control; otherwise, use the control
Control property. You can use this system function to disable certain fields that you do not want a
user to change, such as the exchange rate on a transaction.
Enable Use this system function to enable a control. For example, you can use this function when
Control you want only a manager to have the authority to change something.
Hide Use this system function to dynamically hide and show a control. You can hide a field until the
Control user specifically requests the information it holds. For example, when you add a record in
Address Book, you can display the previously-added record.
Set Edit Use this system function to set an error on a specific control and turn the field red.
Control
Error
Set Status Use this system function to display text in the status bar. This text might describe why an
Bar Text error has occurred and to clear the status bar after an error has been corrected You can also
272
error has occurred and to clear the status bar after an error has been corrected. You can also
use this system function when a process is running in the background or takes some time to
complete. In this case, you might want to display a "Please Wait ..." message.
Was Value Use this system function to verify that data has been changed, such as when an error occurs
Entered and the information changes. One of the options for this system function is an All Controls
value that determines whether any of the controls have changed. This function is useful in
transaction-type programs.
Set Edit Control Color and Set Edit Control Error are two control system functions that J.D.
Edwards standards prohibit you from using. Set Edit Control Color makes mandatory fields a
specific color. If you use this system function, be aware that some users might be color blind.
Set Edit Control Font draws attention to a field, such as a negative number, but nonstandard
fonts might confuse the user or detract from the appearance of your form.
Forward Use this function to forward a message. You can choose to leave the original message intact
Message when you forward it.
Press Button Use this function to reuse event rules from event to event without having to write and
maintain the code in all of the places in which you use these event rules. To do this,
create a push button on a form, and put all of the reusable event rules on the button
clicked event. Then, use this system function to press the button and run the ER from all
of the other events in which you want to run the ER.
Set Control Use this function to set focus on a specific spot. For example, you might set focus on the
Focus detail part of the grid when a user enters a form. You can also use this function to
override the default cursor position, particularly if the focus differs for and add and a
change.
Stop Use this function to stop processing, such as when an error occurs.
Processing
Suppress Add Use this function to control the normal flow of the form for I/O purposes. For example, in a
transaction entry programs that use master business functions, the master business
function does all of the I/O, including adds.
Suppress Use this function to control the normal flow of the form for I/O purposes. For example,
Delete many J.D. Edwards transactions, such as Accounts Receivable and Sales Order, use
master business functions to insure referential integrity. You might use this function to
273
prevent a user from deleting a customer's address book record that is used on existing
invoices.
Suppress Find Use this function to suppress a find. For example, on updateable grid forms that can use
filter and find buttons, you would probably suppress the find button if the user has not
finished the current record. For those forms that do inquiries, you can verify that the user
has provided information that matches an index.
Suppress Use this function to suppress an update. This function can control the normal flow of the
Update form for I/O purposes.
Was Form Use this function to ensure that a record was actually fetched.
Record
Fetched
Clear Grid Use this function in the same way that you use Clear Grid Buffer.
Cell Error
Clear QBE This function is similar to Clear Grid Buffer. For example, you might use this function when
Column the QBE column had a value forced into it, such as the current date on a purchase order
Find/Browse form. Then, after the user performs a Find, you could clear the QBE column
in case you need to use another date.
Copy Grid Use this function after Clear Grid Buffer was issued and you needed to manipulate just a
Row to Grid few of the grid columns. You can use this system function to move all of the GC fields to
Buffer GB without copying each individual column.
Delete Grid Use this function if you, not the runtime engine, are manipulating the grid row. For
Row example, use this function when you are using the Delete Doc routine from the master
business function.
Disable Grid Use this function to disable the entire grid from input. Use this function when you need to
complete more information in the header before you can add individual rows, or to use
information in the header as default information in the grid.
Get Grid Row Use this function to specifically read a grid row, such as when you need to reprocess the
grid through a While loop.
Get Max Grid Use this function to determine how many rows must process if you need to reprocess all
Rows of the individual grid rows through a While loop. Use this function immediately before the
While loop.
Get Selected Use this function to get the row number for a selected row. Typically, you use this function
Grid Row only when you need to save the row as a variable for future processing.
Count
Hide Grid Use this function for dynamic processing.
Column
Hide Grid Row Use this function to hide an entire row from appearing on the form. For example, if you
create a form with a grid and you want to summarize rows, add together several rows to
determine a total and show the total row. If you use this system function, you might
274
include a check box for the detail information and then unhide the row instead of
repopulating the grid.
Insert Grid Use this function to manipulate the buffer space. If you use this system function, GC
Buffer Row becomes GB.
Insert Grid Use this function to insert a row in the grid. Usually, these rows are custom
Row (nondatabase), such as a totaling row.
Set Grid Cell Use this function in the same way that you use Set Edit Control Error.
Error
Set Grid Color Use this function in the same way that you use Set Edit Control Color.
Set Grid Font Use this function in the same way that you use Set Edit Control Fonts.
Set Grid Row Use this function to manipulate the bitmap that appears outside of the grid. This function
Bitmap sets a specific bitmap on a specified row header.
Set QBE Use this function for complex assignments to the QBE runtime structure. For example, if
Column you want to assign the date January 1, 2005 to a particular QBE column, you use
Compare QC=010198. Because several valid comparisons exist for the QBE line, to make the date
Style > January 1, you must use this system function.
Show Grid Use this function in the same way that you use Show Edit Control.
Column
Suppress Grid Use this function to prevent a row from becoming part of the grid. For example, use this
Line system function on the Write Grid Line Before event to prevent the line from being written
to the grid.
Update Grid After the grid buffer is assigned, use this system function to make GC=GB.
Buffer Row
• Answer an incoming call either from a direct line, PBX, or Voice Response Unit
(VRU)
To answer an incoming call, you add event rules at the point in which the phone
rings, but before the user picks up the receiver, and again immediately after the user
picks up the receiver.
• Transfer a call
To transfer a call, determine whether the user has requested a transfer, and then add
event rules immediately before the request to transfer the call and immediately after
the application receives notice that the call has been transferred.
275
To put a call on hold, you add event rules immediately after the application has
received notice that the call has been put on hold and immediately after the user has
picked up the call that was on hold. The user must be able to see information about
all calls that are on hold.
• End a call
Calls can end in several ways, including when the service representative or the caller
hangs up, the representative transfers the call, or the system disconnects the call
because of bad phone connections. To properly close the call, you add event rules at
the point in which the application receives a message that the call has ended.
276
You can view a description for a business function by choosing Attachments from the
Row menu.
277
5. To assign a literal to the business function, choose <Literal> in the Available Objects
list.
278
7. Indicate the direction of data flow between Value and Data Items, and click OK.
As you click the direction arrow, it toggles through the following four options:
$ Data flows from the source to the target, and upon exiting the target, data flows
back to the source
No data flow
From the source to the target, and upon exiting the target, data flows back to the
source
No data flow
If the direction of the items is hard-coded in the data structure for a business function
(such as when the parameters are predetermined to be input, output, or
bidirectional), then this predetermined direction appears here. If the direction of items
is not critical, it can be omitted or set by the user. You must complete the required
items that appear in red. The status bar indicates the state of the flow to the target.
8. Turn on the Include in Transaction option to include this business function for
transaction processing.
This option appears only if you are calling from a Fix/Inspect, Header Detail, or
Headerless Detail form. Refer to Transaction Processing for more information about
transaction processing.
10. You can click one of the following buttons to add notes.
• Business Function Notes
• Structure Notes
• Parameter Notes
11. Click OK.
• Identifies when a parameter has been forgotten or needs to be added, such as when
a business view changes or a work field is deleted
• Serves as documentation to other readers of the code
279
• Prevents memory from being reserved when it is not needed
Because they are acceptable internationally, use numeric values for any event rule flags that
are passed back from the business functions. For example, to assign true/false values, use 1
for true and 0 for false, instead of T and F or Y and N.
4. Choose the appropriate form to which you want to connect (the target).
5. Choose the appropriate version of the form to which you want to connect.
The Data Item column displays data items in the data structure of the target form.
The keys in the primary unique index for the primary table of the business view are
automatically set up as the data structure.
6. In the Available Objects column, select the object that you want to pass.
7. Use the > button to move it to the Data Structure-Value Column.
Indicate the direction of data flow between Value and Data Items.
If you do not want data to pass between forms, set all Direction values to null, and
then click OK to save the Form Interconnection and exit.
As you click the direction arrow, it toggles through the following five options:
Data flows from the source to the target, and, upon exiting the target, data flows
back to the source.
280
No data flows either way
• Parameter Notes
• Accept the default placement of primary unique key fields at the top of the data
structure.
• Change the data item name and description to describe the item that is passed
between forms.
Each time the system calls a modeless form interconnection, it passes the values in the form
data structure. When you click Cancel in the calling form, the system destroys the called form
and does not pass any values. When you click OK in the called form, the system passes
values back to the calling form through the form data structure. The called form still appears.
The Dialog is Initialized event occurs only the first time that the system calls it. If you want
event rules to run each time a form appears, attach them to Post Dialog is Initialized.
If a form in update mode fails to fetch a record from the database, the form mode changes to
Add mode. If the Close Form On Add option is turned on, the form closes when you click OK.
When you close a Find/Browse form, it closes all of the modeless interconnect records before
it destroys itself.
Event rules that follow a modeless form interconnection execute immediately instead of
waiting for the called form to return.
Run applications with modeless processing from the menu. If you run an application from
Object Librarian, modeless processing does not work.
281
► To create a modeless form interconnection
1. On Event Rules Design for the Browse form that you want to use (the source),
choose an event.
282
3. On Work with Applications, choose the application to which you are connecting.
Work with Forms displays forms for the selected application.
283
4. Choose the appropriate Fix/Inspect form to which you want to connect (the target).
The Form Interconnect - Values to Pass window displays the data structure for the
target form.
5. Choose the appropriate versions of the Fix/Inspect form to which you want to
connect.
The Data Item column displays data items in the data structure of the target form.
The keys in the primary unique index, for the primary table of the business view, are
automatically set up as the data structure.
284
6. Turn on the Modeless option.
7. In the Available Objects column, choose objects that you want to pass. Use the >
button to move it to the Data Structure-Value Column.
8. Indicate the direction of data flow between Value and Data Items.
If you do not want data to pass between forms, set all values to and click OK to
save the Form Interconnection and exit.
As you click the direction arrow, it toggles through the following four options:
Data flows from the source to the target, and, upon exiting the target, data flows
back to the source
No data flow
286
► To create a report interconnection
3. On Work with Applications, choose the report to which you are connecting.
287
Work with Versions displays versions for the selected report.
4. Choose the appropriate version of the report to which you want to connect.
288
5. In the Available Objects column, choose the object that you want to pass. Use the >
button to move it to the Data Structure-Value Column.
6. Indicate the direction of data flow between Value and Data Items.
If you do not want data to pass between reports, set all Direction values to and click
OK to save the Report Interconnection and exit.
As you click the direction arrow, it toggles through the following four options:
No data flow
8. To include the report interconnect for transaction processing, click the following
option:
• Include in Transaction
9. Click one of the following buttons to add notes:
• Structure Notes
• Parameter Notes
10. After the data structure is defined, click OK.
Event Rules Design displays the Report Interconnection with the following statement:
289
Creating Assignments
Use an assignment to define a field as a fixed value or a mathematical expression. For
example, you can create an assignment that inserts a default value when the user leaves the
field. You can also use an assignment to calculate a value, rather than write a business
function to calculate it.
290
The available objects that appear are based on the data type.
► To assign a value
3. Choose an object on the left that you want to receive your assigned value.
4. Determine the From value using one of the following methods:
291
• Choose a From Object in the right-hand column to create a simple statement:
[left-hand column] = [right-hand column].
• Type a literal expression (number, text, and so on) in the text entry box to assign
a literal statement: [left-hand column] = [literal].
• Press the f(X) button to create a complex expression or advanced mathematical
function using the Expression Manager.
5. Click OK.
The Event Rules Design window displays the assignment in text form.
292
► To create an expression for an assignment
Undo Reverses your previous editing action (other than inserting objects or functions from the lists)
293
Expression Manager
Expression Manager has several different sections with which you can work.
Assignment Display
The first section of the Expression Manager form displays the current status of the
assignment expression. To Object displays the object to which the expression will be
assigned. From Expression displays either a blank entry or the expression being edited.
You can enter text by typing characters from the keyboard, using the editing keypad, or
double-clicking the mouse to point and click to various expression components, including the
following:
• Objects
• Numbers and mathematical symbols
• Advanced functions
The editing field accepts any expression, in any order. If syntax errors occur, the system
highlights the error and displays it in the status bar.
294
Available Information
The Available Information list contains all of the objects that are available for creating and
editing expressions. You can choose an object in the list box to display its data type in the
status bar.
Editing Keypad
You can use the editing keypad to enter data into an expression instead of using the
keyboard. The Undo button is enabled only when it can undo the last editing operation that
you performed. It cannot undo inserts from either the Available Information list or the
Advanced Functions list.
Advanced Functions
The Advanced Functions list contains functions that are available to create or edit an
expression. You can display information about functions in the status bar. The first box
displays a short description of the function, and the second box displays the syntax for the
function. Advanced Functions include:
• Date functions
• General functions
• Trig functions
• Text functions
Date Functions
Function Description
add_days(date, days) Adds a specified number of days to the date
days_between(date1, date2) Returns the number of days between date1 and date2
date_month(date) Returns the month of the year for the specified date (1=January,
2=February,...)
date_year(date) Returns the year for the specified date (in 19xx format)
last_day(date) Returns the last day of the month of the specified date (not day of the
week)
next_day(date, day_of_week) Returns the next date that occurs on the day of the week after a given
date
295
General Functions
Function Description
abs Returns the absolute value of the specified number.
floor Rounds the specified number down to the next whole number.
sign Returns the sign of the specified number. (If the sign is negative, it returns -1, otherwise, it
returns 0.)
Trig Functions
Function Description
acos Calculates the arc cosine of the specified number
296
Text Functions
Function Description
concat Appends string2 to string1
lpad Inserts the character into the front (left side) of the string until the string is length long
lpad("qwerty",' ',12) = "...... qwerty"
rpad Inserts the character into the back (right side) of the string until the string is length long
rpad("qwerty" , '.', 10) = "qwerty...."
substring Extracts a portion of string beginning at position for length number of characters
substring("SUNMONTUEWEDTHUFRIS AT", 9,3) = "WED"
Note: The beginning position of the string is considered position zero; to substring beginning
with the 10th character, use 9 as the beginning position in the command.
Table I/O
Use the Table I/O button in Event Rules Design to create instructions that perform table input
and output (I/O) so that you do not need to manually code a business function in C code.
Table I/O allows you to access a table through event rules. For example, you can use table
I/O to display information in a table that your application does not use. You can use table I/O
to do the following:
• Validate data
• Retrieve records
• Update or delete records across files
• Add records
You can use Log Viewer to view your table I/O SQL statements in the jdedebug.log. (Your
jde.ini file must have debugging set to File.)
297
Available Operations
Table I/O is an event rule that replaces writing low-level business functions that perform I/O
by calling to the JDB API set. Using table I/O, you can perform the following operations:
FetchSingle Combines Select and Fetch in a Basic operation. Indexed columns are used for the Select
and non-indexed columns are used for the Fetch. Opens a table for I/O but does not close it.
All tables that do not use handles automatically close when the form using them closes.
Update Updates an existing row. Only those columns mapped (presently in tables with or without
handles) are updated. You can do partial key updates with tables and handles to tables. If
you do not specify all the keys, then several records might be updated.
FetchNext Fetches rows that you selected. You can fetch multiple records with multiple FetchNext
operations or with a FetchNext operation in a loop.
Open N/A
Close N/A
SelectAll N/A
298
Creating a Table I/O Event Rule
Table I/O event rules allow event rule support for database access. You need event rule
support to perform table input and output, data validations, and record retrieval.
2. Choose the operation you wish to use, and then click Next.
299
3. On Data Source, choose the table or business view or handle for which you want to
perform I/O, and then click Next.
The Mapping form displays available objects that you can map to selected table
columns. The available objects are used to build a WHERE clause on SELECT
statements. On FETCH statements, it maps values into available objects in the
variable column. For example, if you want to FETCH a single record from a table,
map columns to create the WHERE clause of a SELECT statement.
300
4. Choose the column that you want to use and then double-click on the available
objects that you want to map to that column.
5. Click the Operator button until you have the operation that you want.
The following selection operations are available. The default is equal.
• Equal
• Not Equal
• Less Than
• Less Than or Equal To
• Greater Than
• Greater Than or Equal
• Like
6. Click Finish to save the operation and return to Event Rules Design.
Record Change
If you choose the Update option, you can also enable Check for Record Change. The Check
for Record Change option indicates whether the record has been changed between the time
that it was fetched and the time that it is updated.
301
Understanding Buffered Inserts
You can use buffered inserts to improve performance when you insert many (hundreds or
thousands) of records into a single database table, and you do not need immediate user
feedback if an insertion failure occurs. You can use buffered inserts with table conversion,
table I/O, batch processes, and business functions. They are not available for interactive
applications. Buffered inserts are available only with Oracle (V8 and above), DB2/400, and
SQL Server. Buffered inserts are not available with Access, post-insert triggers, or multiple-
table views. The JDEbase database middleware delivers records to the database
management system one bufferload at a time.
When you request buffering, the database records are inserted individually and the buffer is
automatically flushed when it fills; that is, the JDEbase database middleware delivers the
buffer to the database management system. The buffer can also be explicitly flushed. For
example, the buffer flushes automatically when you commit a transaction or when you close a
table or view. The business function, table conversion engine, or table I/O can explicitly
request that the buffer be flushed as well.
Use caution when you decide whether to use buffered inserts. You receive no immediate
feedback if an insertion fails. Instead, the error appears in the JDE log. Consequently,
buffered inserts are used primarily with batch applications.
Unless you are using the Table Conversion application, you must request more detailed
information from the middleware to get detailed error messages. In Table Conversion, the
table conversion engine automatically performs this task. Turn on tracing to receive more
detailed error messages. Otherwise, you get an error message that the insert failed. Clear the
output tables so that you do not receive duplicate error logging.
302
Using Buffered Inserts in Table I/O
When you use buffered inserts in table I/O, you must explicitly open the table with an Open.
Choose the table that you want to use and click Advanced Options.
Special Operations
After you set up buffered inserts, you can use Special Operations to flush the buffers or get
error messages. In Event Rules, at the point at which you want to perform one of these
operations, click either of the following options:
303
When you use the flush insert buffer option for a specific table, you must flush the
buffer before you close the table so that you still have access to error information.
You can use the Get Error Data option for each insert to ensure that you get this
information.
If you need to perform special error handling, you should set it up after each table I/O
insert and each Flush Insert Buffer option. Always retrieve the error information
before you begin your next table operation.
Understanding Handles
In OneWorld, the table I/O term handle refers to a type of file pointer. This file pointer
connects the OneWorld application or UBE with the middleware that communicates with the
database manager. Handles point to a database table, and they are references to an address
within the middleware. Unlike regular file pointers, handles allow you some control over when
and how they are used. Handles allow you to perform the following operations, which you
cannot perform using nonhandle table I/O operations:
• You can use handles to concurrently open multiple instances of a single table or
business view.
• You can use handles to open a table or business view in an environment other than
the environment that you signed on to. This feature is particularly helpful when you
receive an upgrade to OneWorld or when you need to convert data from another
system into OneWorld.
• You can pass handles into a form, named event rule, or business function so that you
do not need to open a table or business view more than once.
You cannot use handles in transaction processing.
If you pass a handle to a form or a named event rule, the data structure for the form or
named event rule must contain a member that is a handle data item. In the form interconnect
or business function call, you must assign a handle value from your event rules to the handle
data structure member. You can use this handle in the form or named event rule that is
receiving the handle in the same way that you use any other handle.
You must explicitly open and close handles, unlike other table I/O operations in which you
can use implicit open and close statements. You must open a handle before you can use it
for any other operations. All of the operations except Open work the same for handles as
they do for tables or business views. When you are finished using a handle, you must
explicitly close it. You close the handle in the same way in which you close a table or
business view, except that you choose a handle instead of a table or business view.
Using a Handle
To use a handle, you must complete the following:
304
• Open the handle explicitly
After you create a handle data item, you must create a handle variable. You create a handle
variables in the same way in which you create other variables. You can use any scope
necessary to create the handle variable. See Working with Event Rule Variables for more
information about creating variables.
After you create a handle variable, you must explicitly open the handle. Then, after
performing the required table I/O, you must explicitly close it.
► To use a handle
Use a Class Type of Handle and a Data Type of 7. You should name the alias for the
handle the same as its table.
1. To complete the handle data item, click the Edit Rule tab, type the table or business
view name for the handle, and then save the data dictionary item.
The data item name can be a maximum of eight characters and should be formatted
as follows: HFxxxxxx
xxxxxx = Represents the system code and group type used in the table name
For example, the table I/O data item name for table F4211 is HF4211.
305
See Data Dictionary for more information about data items. You can also create a
handle data item in a data structure.
306
4. Click Next.
5. On Data Source, click the Handles tab.
6. Choose the handle that you want to open, and then click Next.
7. Choose a variable that contains the name of the environment in which you want to
open the table.
If you want to open the table in the login environment, choose the system value SL
LoginEnvironment. System values also exist for the source and target environment in
Table Conversion if you use Table I/O in Table Conversion.
8. Click Finish.
9. On Data Source, click the Handles tab.
10. Choose the handle that you want to close, and then click Finish.
Table event rules provide embedded logic at the table level. Table event rules have their own
location, events, and system functions. When you use table event rules, neither the calling
application nor the user is notified of changes or events to the table. No form or report
interconnection is available with table event rules.
You can use table event rules for data integrity. For example, when you delete a record in
address book, you might want to delete all associated records, such as phone and category
codes. You can also use table event rules for currency. The Currency Conversion is On event
rule handles currency information in table event rules. Refer to Currency for more
information.
Following are the events to which you can attach event rules on a table-by-table basis:
307
Creating Table Event Rules
To create a table event rule, you must perform the following:
1. On Object Management Workbench, check out the table you want to attach event
rules to.
2. On Table Design, click the Design Tools tab, and then click Start Table Trigger
Design Aid.
This starts Event Rules Design, which you can use to attach event rules to any of the
events for the table.
308
Else Inserts an ELSE clause, which is only valid within the bounds of IF and ENDIF.
Variables Creates a programmer-defined field, which has data dictionary characteristics for
application-specific purposes, but does not reside in the data dictionary.
Table I/O Allows event rule support for database access. Performs table input and output, data
validations, and record retrieval.
You do not need to create and associate data structures to the table event rule (TER)
functions. The table itself is the data structure that is passed to the table event rule
function.
5. On Event Rules Design, click Save to save your event rule specifications, then click
Close to return to Table Design.
6. If you are creating a new table, in Table Design, click the Table Operations tab, and
then click Generate Table.
Caution
Never perform this step on an existing table. This clears all data. Only perform step
this for New Tables.
7. On Generate Table, complete the following fields, and then click OK:
• Data Source
• Password
8. On Table Design, click the Design Tools tab, and then click Build Table Triggers.
The Build Triggers option performs the following steps:
309
• Converts the ER to C source code. This creates the files OBNM.c and
OBNM.hxx (OBNM = Object Name). The source file will contain one function per
table event rule event.
• Creates a make file to compile the generated code.
• Runs the make file to compile the new functions and to add them into
JDBTRIG.DLL. This Consolidated DLL contains table event rule functions.
9. To see a log of the build, click Generate Header File, and then open the file that is
created by the system.
The creation of the table event rule is complete. The newly created or modified table event
rule functions can now be called from the database APIs whenever the corresponding event
occurs against the table.
You can use system functions to override data dictionary properties at runtime. You can use
the Set Data Dictionary Item system function to do the following:
• Override form controls and grid columns that are data dictionary items
• Change the data dictionary item completely so that all data dictionary properties are
changed
310
• Create a new data item that is not the same type as the old item
You can use a data item name that is a string variable or a hard-coded string.
You can use the Set Data Dictionary Overrides system function for the following:
Threads allow you to process selected OneWorld events or business functions in the
background while the user continues to interact with the application.
311
Events processed in the main path of execution and events processed in a thread can
execute at the same time. Unpredictable results can occur when two events try to access the
same data at the same time.
Asynchronous processing does not support form interconnections. You use asynchronous
processes for background processing, and users should not interact with an asynchronous
thread directly. For example, if you have an asynchronous process (such as Row is Exited
and Changed - Asynch), you should not open a form on that worker thread because that
requires the user to interact with a process that should be processing in the background.
Asynchronous Events
The following diagram illustrates how threaded events work.
All asynchronous events must complete their processing before OK or Cancel can be
processed.
312
• Control is Exited and Changed - Asynch
• Row is Exited and Changed - Asynch
• Column is Exited and Changed - Asynch
• Control is Exited
• Control is Exited and Changed - Inline
• Control is Exited and Changed - Asynch
The first two events are processed before the user can continue. The Control is Exited and
Changed - Asynch event runs on a thread. That means that the user can continue entering
data while the event executes.
As a grid row is exited, these three events process in the following sequence:
• Row is Exited
• Row is Exited and Changed - Inline
• Row is Exited and Changed - Asynch
The Row is Exited event is available on all grids. The other two events are available only on
update grids (Header and Headerless Detail forms).
The first two events are processed before the user can continue. The Row is Exited and
Changed - Asynch event runs on a thread. That means that the user can continue entering
data while the event executes. As this event processes for a specific row, an hourglass
appears in the row header.
As a grid column is exited, these three events process in the following sequence:
• Column is Exited
• Column is Exited and Changed - Inline
• Column is Exited and Changed - Asynch
These events are valid for update grids only (Header and Headerless Detail forms).
The first two events are processed before the user can continue. The Column is Exited and
Changed - Async events runs on a thread. That means the user can continue entering data
while the event processes.
313
passed in, or not passed at all. You cannot pass parameters out of the business function
because the form has continued and might not still be open.
Attempts to set errors during asynchronous business functions are ignored. The
asynchronous business function has no connection to the form, so errors cannot be set. The
runtime engine can, however, use the return code from jdeCallObject to determine if an
asynchronous business function fails. A message box appears if a failure occurs. The
message box allows you to quit processing when a failure occurs. You can review the logs for
more information about the failure.
Asynchronous business functions are useful for forms that make many database calls as the
form is closing. For example, a good candidate for threaded business functions is a form that
uses jdeCache calls or workfiles to store records temporarily and then writes the temporary
records to the actual files when OK is clicked.
Only one asynchronous business function processes at a time. The main thread continues
regardless of the presence or absence of asynchronous events in the queue. In the diagram,
Asynchronous business function thread exists determines whether the secondary thread
starts, it does not affect the main thread.
Asynchronous business functions must complete their processing before OneWorld Explorer
can be closed. If asynchronous business functions are still running, a message appears, and
OneWorld Explorer will not close.
314
Example: Asynchronous Event Processing
The following is an example of that functions that are attached to the Row is exited and
Changed - Asynch event.
The Row is exited and Changed - Asynch event behind the grid in the Sales Order Detail
form (P4210) has logic attached to it as follows.
For the first five highlighted lines, the system enters default information in certain table
columns for the database update. For the last highlighted line, the F4211Begin Document
(Master Business Function) is called.
BrowsER
You can use BrowsER to view event rules and design layout for interactive and batch
applications. You can enable or disable one or more event rules without extensive work in the
design tools. You use this feature to debug specific event rules.
BrowsER displays the structure of forms within an interactive application, or sections within a
batch application. The forms or sections appear in a hierarchical structure, with events and
event rules for each section.
315
► To work with BrowsER
1. On Object Librarian Interactive Design, click the Design Tools tab, and then click
Browse Event Rules.
2. On BrowsER, click the plus (+) and minus (-) buttons to expand or collapse the
hierarchical view of events for interactive forms or batch report sections.
316
Each event rule appears beneath the event with which it is associated and also
beside a control that contains event rule logic. If it does not appear beside a control,
then no event rule logic exists on that control.
317
4. Double-click a disabled event rule to enable it.
You cannot print or modify any event rule from any BrowsER forms.
• Expand Tree
• Expand Node
• Show Object IDs
• Hide Objects with no ER
• Filter ER Records
• Search
On the Browsing form, right-click and choose an option from the menu that appears.
Expand Node
Expand Node allows you to expand a highlighted node to show each line of code for the
node.
318
Show Object IDs
You use Show Object IDs for C coding. It displays a unique ID for each object, which is useful
for identifying objects that display errors during the code generation process.
Filter ER Records
Filter ER Records allows you to look for certain types of code, including the following:
319
• Assignments
• Business Functions
• Criterion
• Comments
• Form Interconnects
• Options
• System Functions
Search
Search allows you to search for a particular line of code. You can use it to find occurrences of
particular strings or variables.
Visual ER Compare provides a line-by-line, on-screen comparison. You can change the
target ER (your local version) within the utility by moving lines directly from the source ER.
You can also remove or disable lines. In addition to providing an on-screen comparison, you
can also choose to print a report that lists the changes.
320
Understanding the Visual ER Compare Interface
When you launch Visual ER Compare, the Visual ER Compare form appears. A tree-
structured menu of the ER appears on the left. The rest of the form displays the source ER
(in the middle panel) and the target ER (in the right panel). The target ER is your local ER.
In the ER menu, the system uses fonts of different colors to show the rules that exist in both
source and target but are different, and the rules that exist in one location but not the other.
The system indicates a change in the parent node if one or more of its children changed. In
the ER panes, the system highlights the lines that differ. If lines have been added to or
deleted from one side, blank lines appear on the other side. An exclamation point indicates
that a line is disabled. The system uses fonts of different colors to show the rules that have
changed in content or that have been added or deleted. You can change the display colors
by selecting User Options from the View menu, and then selecting Set Colors.
You can choose a different source by choosing Open Source from the File menu.
321
Working with Visual ER Compare
Use the ER menu to identify and display specific ER components that have changed. If a
parent node is identified as changed, expand it to see which of its children are different.
Double-click an event in the ER menu to display its associated code. You can display more
than one event at a time. Use the Tile option in the Window menu to view different ER events
simultaneously.
You can also move from change to change by right-clicking in either the source or target
pane and choosing Next ER Difference to move forward or Previous ER Difference to move
backwards.
You can change your target ER with Visual ER Compare. You can also print the changes. To
copy all of the changes from the source to the target, use the AutoMerge feature.
Copy selected lines from Select the lines to copy, right-click in the source pane, and then choose
source to target Copy Right.
Delete selected lines from the Select the lines to delete, right-click in the target pane, and then choose
target Delete.
Enable or disable selected lines Select the lines to enable or disable, right-click in the target pane, and
in the target then choose Enable/Disable ER.
Note
Use the shift key to select multiple, contiguous lines and the control key to select multiple,
noncontiguous lines.
After making your changes, right-click and choose Save ER. This action saves your changes
to a buffer. When you open a new source or exit Visual ER Compare, the system prompts
you to save your changes again. If you elect to save your changes at this time, then the
system updates the object on your workstation; otherwise, your changes will be lost.
You can print a report that compares the source and target ER. You can show the
comparison for a particular event or for all of the ER in the object.
To print a report for an event, double-click the event in the ER menu, right-click in either
pane, and then choose Print ER.
To print a report for the entire object, choose Print ER from the File menu.
Using AutoMerge
Use AutoMerge when you want the system to change the target ER to match the source ER.
You can use AutoMerge to change a particular event or to update all of the ER in the object.
322
Caution
Before performing an AutoMerge for an entire object, do a comparison to be certain that you
really want to make all of the changes that the system detects.
To use AutoMerge on an event, double-click the event in the ER menu, right-click in either
pane, and then choose AutoMerge.
To use AutoMerge on an entire object, choose Advanced Operations from the View menu,
and then choose Auto Merge.
323
Business Functions
You can use business functions to enhance OneWorld applications. Business functions group
related business logic. Business functions should perform a specific task. Journal Entry
Transactions, Calculating Depreciation, and Sales Order Transactions are examples of
cohesive business functions.
You can create business functions using one of the following methods:
• C programming code
OneWorld does not generate the business functions that you create using C. You
use C Business Functions mainly for caching. They can also be used for the
following:
After you create business functions, you can attach them to OneWorld applications to provide
additional power, flexibility, and control.
324
.H file Generated in Business Function Design
Modified with the IDE
The DLLs are divided into categories. This distribution provides better separation between
the major functional groups: tools, financials, manufacturing, distribution, and so forth. Most
business functions are organized into a consolidated DLL based on their system code. For
example, a financials business function with system code 01 belongs in CFIN.DLL.
You should follow these guidelines when you add or modify business functions:
• Create a custom parent DLL unless you are adding a J.D. Edwards business
function. Assign a parent DLL to the business functions, based on the system code
defined in UDC table H92/PL. If no DLL is assigned for the system code in which the
business function is created, CCUSTOM is used. You can change the DLL after the
business function is created.
• When you write business function code, ensure that all calls to other business
functions use the jdeCallObject protocol. Linker errors might occur if you do not use
jdeCallObject and you attempt to call a business function in a different DLL. A linker
error prevents your function call from working.
Following are some of the DLLs for which Business Function Builder manages the builds:
CDIST Distribution
CFIN Financials
CINV Inventory
CLOC Localization
325
CMFG Manufacturing
CTRAN Transportation
CWARE Warehouse
• Object Name is controlled through Object Librarian. It is the actual source file.
• Function Name is controlled through Object Librarian. Each function must have a
data structure.
• DLL Name is controlled through Object Librarian. The DLL is a dynamic link library.
326
When a business function is called, the system refers to the Object Configuration Manager
(OCM) to determine where to run the business function. After the system maps a business
function to a server, calls from that business function cannot be mapped back to the
workstation. Refer to the Configurable Network Computing Implementation Guide for more
information about Object Configuration Manager.
Before you design a business function event rule, you must have a data structure. Refer to
Data Structures for more information about creating data structures.
327
3. Choose the parent library in which you want this business function to reside.
4. Choose Parameters from the Row menu.
5. On Business Function Parameters, choose Select from the Form menu.
6. Choose the data structure to which the business function should be attached.
You might need to create a new data structure if an existing one does not meet your
needs.
If the business function already has a data structure, the system identifies the business
structure. You can choose another data structure or edit the one that you want to use.
1. On Business Function Design, choose Edit from the Form menu to create or edit the
event rules that comprise the function.
2. On Business Function Event Rules Design, construct the business function event
rule.
3. Click the Save button or the OK button to save the event rules source code and
return to Business Function Design.
4. On Business Function Design, click OK to save the functions and return to Business
Function Source Librarian.
5. From the Form menu, choose Build to create the .c and .h files, create a make file,
and build the business function.
Because the source language is NER, Business Function Source Librarian creates
an objname.c and objname.h file for the business function event rule. The business
function event rule resides in the parent DLL that is associated with the business
function.
6. To attach the newly created business function event rule to an event, click the f(B)
button on Event Rules Design.
Ensure that the source language is NER when you browse available business
function objects.
Not all chunks of code should be packaged in a business function module. For example,
when code is so specific that it applies only to a particular program, and it is not reused by
any other programs, you should leave it in one place instead of packaging it in a business
function. You can attach all the logic on a hidden control (Button Clicked event) and use a
system function to execute the logic as needed.
A good example of a named event rule is N3201030. This business function creates generic
text and Work Order detail records (F4802) for the configured work order. Based on the
structure of the sales order in F3296, the configured segments for the item on the passed
work order and all lower level segments are included in the generic text.
328
The following example illustrates the function as it appears in Event Rules Design.
329
330
Understanding Header File Sections
The following are the major sections of a business function header file:
Table Header Include statements for header files Table header files include definitions for the
Inclusions associated with tables that are directly fields in a table and the ID of the table itself.
accessed by this business function
External Business Include statements for headers External function calls with jdeCallObject are
Function Header associated with externally defined included to use the predefined data
Inclusions business functions that are directly structures.
accessed by this business function
Global Definitions Global constants used by the business Symbolic names that you enter in uppercase,
function separating words by an underscore. Use
sparingly.
Structure Type Data structure definitions for internal To prevent naming conflicts, define this
Definitions processing structure using structure names that are
prefixed by the source file name.
DS Template Type • Data structure type definitions This structure must be modified through the
Definition generated by Business Function Object Librarian.
Design
• Symbolic constants for the data
structure generated by Business
Function Design
Business Function Prototypes for all business functions in Defines the business functions in the source
Prototype the source file file, the parameters that are passed to them,
and the type of value that they return.
Internal Function Prototypes for all internal functions that Defines the internal functions that are
Prototype are required to support business associated with the business functions in the
functions within this source file source file, the parameters that are passed
to each internal function, and the type of
value that they return.
331
Business Function Header File Example
Business Function Design created the following header file. It contains the minimum
components required in a business function header file.
/*****************************************************************************
* Header File: B98SA001.h
*
* Description: Check for In Add Mode Header File
* History:
* Date Programmer SAR# - Description
* All rights reserved. The methods and techniques described herein are
****************************************************************************/
#ifndef __B98SA001_H
#define __B98SA001_H
/*****************************************************************************
/*****************************************************************************
* External Business Function Header Inclusions
****************************************************************************/
/*****************************************************************************
* Global Definitions
****************************************************************************/
/*****************************************************************************
* Structure Definitions
****************************************************************************/
332
/*****************************************************************************
****************************************************************************/
/*****************************************
*
* DO NOT EDIT THE FOLLOWING TYPEDEF
* the clipboard.
**************************************/
#ifndef DATASTRUCTURE_104438
#define DATASTRUCTURE_104438
{
char cEverestEventPoint01; /* OneWorld Event Point 01
*/
#define IDERRcEverestEventPoint01_1 1L
#endif
/*****************************************************************************
* Source Preprocessor Definitions
****************************************************************************/
#endif
333
#endif
#else
#define JDEBFRTN(r) r
#endif
/*****************************************************************************
****************************************************************************/
/*****************************************************************************
****************************************************************************/
#endif /* __B98SA001_H */
Header File Line Where Input Description
1. Header File Object Librarian Verify the name of the business function header file.
4. #ifndef Business Function Symbolic constant prevents the contents from being
Design included multiple times.
5. Table Header Business Function When business functions access tables, related tables
Inclusion Design are input and Business Function Design generates an
include statement for the table header file.
6. External Business Business Function No external business functions for this application.
Function Header Design
Inclusions
7. Global Definitions IDE Constants and definitions for the business function. J.D.
Edwards does not recommend using this block. Global
variables are not recommended. Global definitions go in
.c not .h.
334
Header File Line Where Input Description
9. TYPEDEF for Data Business Function Data structure type definition. Used to pass information
Structure Design between an application or report and a business
function. The programmer places it on the Clipboard and
pastes it in the header file. Its components include:
Comment Block, which describes the data structure.
Preprocessor Directives, which ensure that the data type
is defined only once.
Typedef, which defines the new data type.
#define, which contains the ID to be used in processing if
the related data structure element is in error.
#endif, which ends the definition of the data structure
type definition and its related information.
10. Source Preprocessor Business Function All business function header files contain this section to
Definitions Design ensure that the business function is prototyped and
declared based on where this header is included.
11. Business Function Business Function Used for prototypes of the business function.
Prototype Design
13. Internal Function Business Function Internal function prototypes required to support the
Prototypes Design business functions in this source file
335
Understanding the Structure of a Business Function Source File
The Object Management Workbench builds a template for the business function source file.
The business function source file consists of several major sections.
Notes Comment Any additional relevant notes Document complex algorithms used, how the
Block concerning the business function business functions in the source relate to each other,
source and so on.
Internal Function • Function name Copy these blocks and place the values in the
Comment Block • Notes specified sections to describe the internal function.
Follow the comment block with internal function
• Returns
source code.
• Parameters
Internal Function Source code for the internal The business function developer inputs this code, as
Source Code function described in the needed. A populated internal function comment block
comment block must precede this code.
#include <jde.h>
#define b98sa001_c
/*****************************************************************************
336
* Description: Check for In Add Mode Source File
* History:
****************************************************************************/
/**************************************************************************
* Notes:
**************************************************************************/
#include <B98SA001.h>
/**************************************************************************
*
* Description: Check for In Add Mode
* Parameters:
* LPBHVRCOM lpBhvrCom Business Function Communications
*************************************************************************/
LPDS104438 lpDS)
{
/************************************************************************
* Variable declarations
************************************************************************/
337
/************************************************************************
* Declare structures
************************************************************************/
/************************************************************************
* Declare pointers
************************************************************************/
/************************************************************************
if ((lpBhvrCom == NULL) ||
(lpVoid == NULL) ||
(lpDS == NULL))
/************************************************************************
* Set pointers
************************************************************************/
/************************************************************************
* Main Processing
************************************************************************/
/************************************************************************
* Function Clean Up
************************************************************************/
return (ER_SUCCESS);
/***************************************************************************
* Notes:
338
* Returns:
* Parameters:
************************************************************************/
Source File Line Where input Description
1. #include <jde.h> Business Function Design Includes all base OneWorld definitions.
2.
#define Business Function Ensures related header file definitions are
b98sa001_c Design properly made for this source file.
3.
Source File Object Librarian Verify the information in the file comment
section. Enter the programmer's name,
SAR number, and description.
4.
#include Object Librarian Includes the header file for this
<B98SA001.h> application.
5.
Business Business Function Verify the name and description in the
Function Design business function comment block.
6.
JDEBFRTN(ID) Business Function Includes the header of a business
JDEBFWINAPI Design function declaration.
CheckForInAdd
Mode
(LPBHVRCOM
lpBhvrCom,
LPVOID lpVoid,
LPDS104438
lpDS)
7.
Variable IDE Declare variables that are local to the
declarations business function.
8.
Declare IDE Declare local data structures to
structures communicate between business
functions, internal functions, and the
database.
9.
Declare pointers IDE Declare pointers.
10.
Check for NULL Business Function Business Function Standard
pointers Design
Verifies that all communication structures
between an application and the business
function are valid.
339
Source File Line Where input Description
11.
jdeErrorSet Business Function jdeErrorSet (lpBhvrCom, lpVoid, ID(0),
(lpBhvrCom, Design "4363",0) Sets the standard error to be
lpVoid, (ID) 0, returned to the calling application when
”4363”, 0); any of the communication data structures
are invalid.
return
ER_ERROR;
12.
Set pointers IDE Declare and assign pointers appropriate
values.
13.
Main Processing IDE Provide main functionality for a business
function.
14.
Function Clean IDE Free any dynamically allocated memory.
Up
15.
Internal function IDE Define internal functions required to
comment block support the business function. They
should follow the same C coding
standards. A comment block is required
for each internal function and should be in
the format shown in the example.
Use the MATH_NUMERIC data type exclusively to represent all numeric values in OneWorld.
The values of all numeric fields on a form or batch process are communicated to business
functions in the form of pointers to MATH_NUMERIC data structures. MATH_NUMERIC is
used as a data dictionary data type.
Programs using the OneWorld APIs are flexible for the following reasons:
340
Using Common Library APIs
The common library APIs consist of APIs that are specific to J.D. Edwards functionality, such
as determining whether foreign currency is enabled, manipulating the date format, retrieving
link list information, or retrieving math numeric and date information. You can use these APIs
to set up data by calling APIs and modifying data after API calls. Some of the more
commonly used categories of APIs include MATH_NUMERIC, JDEDATE, and LINKLIST.
Other miscellaneous Common Library APIs are also available.
OneWorld provides two main data types that you use when you create business functions.
They are:
• MATH_NUMERIC
• JDEDATE
Because these data types might change, you must use the Common Library APIs provided
by OneWorld to manipulate the variables of these data types.
The MATH_NUMERIC data type exclusively represents all numeric values in OneWorld. The
values of all numeric fields on a form or batch process are communicated to business
functions in the form of pointers to MATH_NUMERIC data structures. MATH_NUMERIC is
used as a data dictionary data type.
struct tagMATH_NUMERIC
char EditCode;
short nDecimalPosition;
short nLength;
WORD wFlags;
short nPrecision;
};
Sign A minus sign indicates the number is negative; otherwise the value is 0x00.
EditCode The data dictionary edit code that formats the number for display.
nDecimalPosition The number of digits from the right to place the decimal.
341
nLength The number of digits in the string.
The JDEDATE data type exclusively represents all dates in OneWorld. The values of all date
fields on a form or batch process are communicated to business functions in the form of
pointers to JDEDATE data structures. JDEDATE is used as a data dictionary data type.
struct tagJDEDATE
{
short nYear;;
short nMonth;;
short nDay;
};
342
• They provide an improved method for developing applications in a client/server
environment
• They provide standard return codes from function calls
Standards that affect the development of relational database systems are determined by the
following:
These extensions and upgrades affect portability. Due to the industry impact of software
development, applications need a standard interface to databases that is not affected by
differences between database vendors. When a vendor provides a new release, the impact
on existing applications should be minimal. To solve many of these portability issues, many
organizations use standard database interfaces called open database connectivity (ODBC).
J.D. Edwards ODBC provides a single access method to multiple relational database
management systems. ODBC allows you to use one set of functions to interface with different
types of databases. You can develop and compile applications without knowing the type of
database that the application uses. Database drivers are installed that allow the J.D. Edwards
ODBC interface to communicate with a specific database system.
A driver is an application that processes the API request, communicates with the database,
and returns the result to the API. The driver also handles the input/output (I/O) buffers to the
database. This allows a programmer to write an application to communicate with a generic
data source. The database driver is responsible for processing the API request and
communicating with the proper data source. The application does not have to be recompiled
to work with other databases. If the application needs to perform the same operation with
another database, a new driver is loaded.
A driver manager handles all application requests to the J.D. Edwards database function call.
The driver manager processes the request or passes it to an appropriate driver.
343
OneWorld applications access data from heterogeneous databases. JDB uses the JDB API
to interface between OneWorld applications and multiple databases. OneWorld applications
and business functions use the JDB API to dynamically generate platform-specific SQL
statements. JDB also supports additional features, such as replication and cross-data source
joins.
Request Level Provides functions for performing database transactions. The request level
functions perform the following tasks:
• Connect to and disconnect from tables and business views in the
database
• Perform data manipulation operations of select, insert, update, and
delete
• Retrieve data with fetch commands
Column Level Performs and modifies information for columns and tables.
Global Table/Column Provides the capability to create and manipulate column specifications.
Specifications
You can use control and request level APIs to develop and test business functions.
344
Connecting to a Database
To perform a request, the driver manager and driver must manage the information for the
development environment, each application connection, and SQL statement. The pointers
that return this information to the application are called handles. The APIs must include these
handles in each function call.
HUSER The user handle contains information related to a specific connection. Each user handle has
an associated environment handle with it. A connection handle is required to connect to a
data source. If you are using transaction processing, initializing HUSER indicates the
beginning of a transaction.
HREQUEST The request handle contains information related to a specific request to a data source. An
application must have a request handle before executing a SQL statement. Each request
handle is associated with a user handle.
You can use several APIs to perform the following steps for database communication:
345
Calling an API from an External Business Function
To call an API from an external business function, you must first determine the function
calling convention of the dll that you are going to use. It can be either cdecl or stdcall. The
code might change slightly depending on the calling convention. This information should be
included in the documentation for the dll. If you do not know the calling convention of the .dll,
you can execute the dumpbin command to determine the calling convention. Execute the
following command from the MSDOS prompt window: dumpbin /EXPORTS
ExternalDll.DLL. Dumpbin displays information about the dll. If the output contains
function names preceded by _ and followed by an @ sign with some numbers, the dll uses
the stdcall calling convention; otherwise, it uses cdecl.
The following code example is standard code for windows programs. It is not OneWorld®-
specific.
# ifdef JDENV_PC
HINSTANCE hLibrary = LoadLibrary(_TEXT("YOUR_LIBRARY.DLL")); //
substitute the name of the external dll
if(hLibrary)
{
// create a typedef for the function pointer based on the parameters
and return type of the function to be called. This information can
be obtained
// from the header file of the external dll. The name of the
function to be called in the following code is "StartInstallEngine".
We create a typedef for
// a function pointer named PFNSTARTINSTALLENGINE. Its return type
is BOOL. Its parameters are HUSER, LPCTSTR, LPCTSTR, LPTSTR &
LPTSTR.
// Substitute these with parameter and return types for your
particular API.
typedef BOOL (*PFNSTARTINSTALLENGINE) (HUSER, LPCTSTR, LPCTSTR,
LPTSTR, LPTSTR);
// Now create a variable for your function pointer of the type you
just created. Then make call to GetProcAddress function with the
first
// parameter as the handle to the library you just loaded. The
second parameter should be the name of the function you want to call
prepended
// with an "_", and appende with an "@" followed by the total number
of bytes for your parameters. In this example, the total number of
bytes in the
// parameters for "StartInstallEngine is 20 ( 4 bytes for each
parameter ). The "GetProcAddress" API will return a pointer to the
function that you need to
// call.
346
PFNSTARTINSTALLENGINE lpfnStartInstallEngine =
(PFNSTARTINSTALLENGINE) GetProcAddress(hLibrary,
"_StartInstallEngine@20");
if ( lpfnStartInstallEngine )
{
// Now call the API by passing in the requisite parameters.
lpfnStartInstallEngine(hUser, szObjectName, szVersionName,
pszObjectText, szObjectType);
}
#endif
The process for using the cded calling convention is similar to the process for using the std
calling convention. The main difference is the second parameter for GetProcAddress. Read
the comments preceding that call.
# ifdef JDENV_PC
HINSTANCE hLibrary = LoadLibrary(_TEXT("YOUR_LIBRARY.DLL")); //
substitute the name of the external dll
if(hLibrary)
{
// create a typedef for the function pointer based on the parameters
and return type of the function to be called. This information can
be obtained
// from the header file of the external dll. The name of the
function to be called in the following code is "StartInstallEngine".
We create a typedef for
// a function pointer named PFNSTARTINSTALLENGINE. Its return type
is BOOL. Its parameters are HUSER, LPCTSTR, LPCTSTR, LPTSTR &
LPTSTR.
// Substitute these with parameter and return types for your
particular API.
typedef BOOL (*PFNSTARTINSTALLENGINE) (HUSER, LPCTSTR, LPCTSTR,
LPTSTR, LPTSTR);
// Now create a variable for your function pointer of the type you
just created. Then make call to GetProcAddress function with the
first
// parameter as the handle to the library you just loaded. The
second parameter should be the name of the function you want to
call. In this
// case it will be "StartInstallEngine" only. The "GetProcAddress"
API will return a pointer to the function that you need to call.
PFNSTARTINSTALLENGINE lpfnStartInstallEngine =
(PFNSTARTINSTALLENGINE) GetProcAddress(hLibrary,
"StartInstallEngine");
if ( lpfnStartInstallEngine )
347
{
// Now call the API by passing in the requisite parameters.
lpfnStartInstallEngine(hUser, szObjectName, szVersionName,
pszObjectText, szObjectType);
}
#endif
Note
These calls work only on a Windows client machine. LoadLibrary & GetProcAddress are
Windows APIs. If the business function is compiled on a server, the compile will fail.
• Write the Visual Basic program into a Visual Basic DLL that exports the function
name of the program and returns a parameter to the OneWorld business function.
• Next, write a business function that loads the Visual Basic DLL using the win32
function LoadLibrary.
• In the business function that you create, call the win32 function GetProcAddress to
get the Visual Basic function and call it.
See Also
Creating a Business Function Data Structure
On Object Management Workbench, check out the business function with which you
want to work.
348
1. Ensure that the business function is selected, and then click the Design button in the
center column.
The Business Function Design form appears.
2. Click the Design Tools tab, and then click Start Business Function Design Aid.
1. From Business Function Design, from the Row menu, choose Codes.
• Source Module
• Function Name
• Description
• Function Use
349
Adding Related Tables and Functions
You can attach both tables and functions to a business function. You must add related tables
and functions to the business function object to generate the code for the source and header
files.
1. On Business Function Design, type the new DLL name in Parent DLL, or change the
business function location and click OK.
2. On Object Librarian Business Function Design, click OK.
3. On Object Management Workbench, check in the business function.
You should transfer this business function to all path codes as soon as possible.
350
Creating a Custom DLL
Before you can build a custom business function into a custom DLL, that custom DLL must
exist in the Object Librarian Master Table (F9860). Use this task to create a custom DLL.
• Object Name
• Description
• Product Code
• Object Use
1. Enter your custom DLL name in the Parent DLL field, and click OK. (This form also
allows you to change the business function location, if necessary.)
2. Run the build for the business function.
351
Working with Business Function Builder
You use Business Function Builder to build business function code into a dynamic link library
(DLL). You can build C business functions, named event rules, and table event rules.
The process that occurs when you build business functions includes compiling and linking.
Compiling involves creating a business function object. Linking makes the object part of a
DLL.
• Functions List
• Available Business Functions
• Build Output
In addition to these components, a status window also appears at the bottom of the Business
Function Builder form, and it displays the status of builds as they are in progress. You can
click the Stop button in the status bar to discontinue a build.
The combo box in the Toolbar should be set in the Optimize mode. If you are debugging, the
box should be set to Debug mode.
352
Functions List
Function list displays the consolidated DLLs for OneWorld, including the custom-defined dlls.
It lists the functions that you select to link or compile during a build. Any functions that you
drag to the function list will build when you build your function list.
Available Business Functions displays the functions that you can build. Each Business
Function DLL (for example, CCUSTOM or COBLIB) has its own set of available business
functions.
Build Output
Build Output displays build results. As your business functions compile and link, Business
Function Builder updates Build Output so that you can see the build in progress. This
information is useful for diagnosing any problems that might occur during a build. When the
build is complete, Business Function Builder indicates whether the build was successful. Use
the scroll bars at any time to view the contents of the form. You can also cut and paste, or
print any text that appears in the form.
353
► To build a single business function
1. On Object Management Workbench, choose the business function that you want to
build, and then click the Design button in the center column.
2. On Business Function Design, click the Design Tools tab, and then click Busbuild
Standalone.
The BusBuild form appears and Business Function Builder begins building your
business function.
Build Output displays the results of the build. When the build is finished, the message
***Build Finished*** appears at the bottom of Build Output. The text following this line
indicates whether the build was successful. If the build was successful, you can test your
business function. Otherwise, you must correct any problems and try the build again.
To stop the build, click the Stop button in the lower right corner of the form. The DLL reverts
back to its original form.
Link All does not compile any business functions; it only links each DLL.
354
Setting Build Options
You can use options on the Build menu to control how and when your consolidated business
function is built. The following options are available:
Build Generates a makefile, compiles the selected business functions, and links the functions
into the current consolidated DLL. Rebuilds only out-of-date components.
Compile Generates a makefile and compiles the selected business functions. The application
does not link the functions into the current consolidated DLL.
ANSI Check Reviews the selected business function for ANSI compatibility.
Link Generates a makefile for each consolidated DLL. It then builds each consolidated DLL.
The application does not compile any of the selected business functions.
Link All Generates a makefile for each consolidated DLL. It then builds each consolidated DLL
and links it to all business functions that are called. The application does not compile any
of the selected business functions.
Rebuild Rebuilds the consolidated DLL and static libraries from the .obj files.
Libraries
Build All Links and compiles all objects within each DLL.
Stop Build Stops the build from finishing. The existing consolidated DLL remains intact.
355
Browse Info Generates browse information when compiling business functions. Turn this option off to
expedite the build.
Precompiled Creates a precompiled header when compiling a business function. When compiling
Header multiple business functions, the Business Function Builder generally compiles faster if it
uses a precompiled header.
Debug Info Generates debug information when compiling. The Visual C++ can debug any function
that was built with debug information. Turn this option off to expedite the build.
Full Bind Resolves all of the external runtime references for each OneWorld consolidated DLL.
Synchronize You can run this utility to reorganize OneWorld business functions into new DLL
JDEBLC groupings. This utility synchronizes DLL field for the local JDEBLC parent specification
table with the parent DLL in the Object Librarian Master Table (F9860). Use this option
with caution. You typically use this option only if you have manually dragged business
function DLLs from a recent package build and you are experiencing failures in the
business function load library.
Dumpbin You can run this utility to verify whether a particular business function built successfully.
This utility displays all the business functions that were built into the selected consolidated
DLL.
PDB Scan You receive a CVPACK fatal error when one of the object files that you are trying to link is
incorrectly compiled with PDB information. To resolve this problem, you can use the PDB
scan to identify any object fields that were built with PDB information. Recompile any
business functions that the PDB scan reports.
The following figure is an example of the messages that the system generates during a build.
356
Makefile Section
The makefile section indicates where Business Function Builder generated the makefile for
this build. Business Function Builder generates one makefile for each DLL that it builds. A
Generating Makefile statement should always appears for each DLL that you are building. If
the makefile statement does not appear, then an error occurred. To resolve the error:
Begin DLL indicates that Business Function Builder is building a particular DLL. For example,
the section above begins with *****CDIST*****. A Begin DLL section appears for each
DLL that you are building.
Compile Section
In order to build DLLs, Business Function Builder compiles the business functions in the
DLLs first. The system displays a sequential list of each business function that the Business
Function Builder attempts to compile. During the compilation process, the following might
occur:
• Compiler Warning
When a compiler warning occurs, Business Function Builder displays warning
CXXXX (where XXXX is a number) and a brief description of the warning. To review
information about the warning, search for the CXXXX value in Visual C++ helps.
357
Warnings usually do not prevent the business function from compiling successfully.
You can turn on the Warnings As Errors option in the Global Build form so that the
business function will not build if any warnings occur.
• Compiler Error
When a compiler error occurs, Business Function Builder displays error CXXXX
(where XXXX is a number) and a brief description of the error. To review extended
information about the error, search for the CXXXX value in Visual C++ helps. Errors
prevent the business function from compiling successfully, so you must resolve them.
Link Section
After Business Function Builder has compiled the business functions for a DLL, it links them.
This linking process creates the .lib and .dll files for the DLL. During linking, the following
might occur:
• Linker Warning
When a linker warning occurs, Business Function Builder displays warning
LNKXXXX (where XXXX is a number) and a brief description of the warning. To
review information about the warning, search for the LNKXXXX value in the Visual
C++ helps. Warnings usually do not prevent the business function from linking
successfully. You can turn on the Warnings As Errors option in the Global Build form
so that the DLL will not build if it has any warnings occur.
• Linker Error
When a linker error occurs, Business Function Builder displays error LNKXXXX
(where XXXX is a number) and a brief description of the error. To review extended
information about the error, search for the LNKXXXX value in the Visual C++ helps. If
a nonfatal error occurs, Business Function Builder still creates the DLL. However,
Business Function Builder notes that the DLL was built with errors. If a fatal error
occurs, Business Function Builder does not build the DLL.
Rebase Section
The Rebase Section displays information about rebasing. Rebase fine tunes the performance
of DLLs so that they load faster. It does this by changing the desired load address for the DLL
so that the system loader does not have to relocate the image. It automatically reads the
entire DLL and also updates fixes, debug information, checksum information, and time stamp
values.
Summary Section
The Summary Section contains the most important information about the build. This section
indicates whether the build is successful. The summary section begins with "*****Build
Finished*****". Next Business Function Builder displays a summary report for each DLL that
you attempted to build. This report includes the following:
358
Building All Business Functions
A system administrator usually performs Build All. Build All processes can take a long time.
Build All not only does what the global link does, but it also recompiles all of the objects within
each DLL. To run Build All, you must access BusBuild from the OneWorld Explorer menu.
1. On Object Management Workbench, choose the business function that you want to
build, and then click the Design button in the center column.
2. On Business Function Design, click the Design Tools tab, and then click Busbuild
Standalone.
The BusBuild form appears.
359
4. Choose one of the following options for Build Mode:
Debug A build that includes debug information. After you perform a build, you can debug the built
business function using the Visual C debugger.
Optimize A build that does not include debug information. Optimize builds generally cannot be
debugged using the Visual C debugger.
Performance A build that is the same as an optimize build, except that it includes information that helps
Build J.D. Edwards developers measure the performance of business functions. Only J.D.
Edwards developers should use this option.
Click the button to the right of this field to browse for a directory.
You can choose one of the following locations to indicate where your business
function source resides:
Path Code All business function source is in the path specified by the selected pathcode.
Package All business function source is in the path specified by the selected package. If a package is
360
built correctly, it typically contains all required business function source. Package is the
recommended location.
Pick All business function source is stored in another directory of your choice that exists on your
Directory file server.
For example, suppose that you have a package called PROD_A that physically
resides on the file server location \\SERVER\SHARE1\PROD_A. PROD_A contains
the following subdirectories:
For this configuration on the server for PROD_A, click the button, then Package, then
PROD_A from the detail area. When Business Function Builder builds, it uses the
business function source from this directory.
Click the button to the right of this field to browse for a location.
You can select your foundation from one of the following locations:
Foundation The foundation table lists all registered OneWorld foundations. Choose a foundation from
this table.
Pick The OneWorld foundation exists on your file server in a directory of your choice. This is the
Directory recommended choice for this option.
For example, suppose you have a newly built foundation on the server at location
\\SERVER\SHARE1\System\New\Optimize. This directory contains the following
subdirectories:
Click the button to the right of this field to browse for a location.
361
You can select one of the following locations for your output destination directory:
Path Code All business function output is stored in the path specified by the selected pathcode. The
pathcode contains the latest business function changes that have been checked in.
Package All business function output is stored in the selected package. Package is a more stable
snapshot of business function source. Package is the recommended location.
Pick All business function output is stored in a directory of your choice on your file server.
Directory
For example, suppose that you have a package called PROD_A that is located on
the file server at \\SERVER\SHARE1\PROD_A. When the build finishes, you want
Business Function Builder to place the build output in the following subdirectories
that are subordinate to PROD_A:
With the above configuration on the server for PROD_A, click the button, then
Package, then choose PROD_A from the detail area. When Business Function
Builder builds, it places the build output files in these subdirectories for PROD_A.
Clear Output If you turn on this option, Business Function Builder deletes the contents of the bin32,
Destination lib32 and obj output directories before it builds all business functions.
Before Build
Select Which If you do not turn on this option, Business Function Builder builds all DLLs. If you turn
DLLs to Build on this option, you can click the Select button to choose which business function DLLs
you want to build. Use this option if you want to build one or two DLLs. If you build only
a subset of all DLLs, then verify that the Clear Output Destination Before Build option is
turned off.
Stop Level You can select the error level at which the build stops. You can ignore errors to continue
building despite errors. You can stop if a DLL contains errors. You can stop on the first
compile error.
Generate If you turn on this option, Business Function Builder creates a report in the work
"Missing directory of the destination. This directory is called NoSource.txt. It contains business
Source" Report function source file names that do not have a .c file but do have a record in the Object
Librarian Master Table (F9860). To clean this report, you can produce the correct .c file
for the business function, or you can delete the source file from the F9860 table. This
option is recommended.
Generate ER If you turn on this option, Business Function Builder generates named event rule and
Source table event rule source prior to building business functions.
362
Verify Check-in If you turn on this option, only objects checked in to a specified pathcode will build. A
log file, Notchkdn.txt is written to the same directory as Nosource.txt. Objects not
checked in to the pathcode will be listed in this log and in Buildlog.txt.
You can turn on the From RDB option so that you can generate work from any path code. If
this option is turned off, the business function builder assumes that the event rules source
can be generated from the source directory specification files.
If you are troubleshooting a build initiated by Package Build, then the settings above should
already be set to the correct values. In this case, you simply click Build to rebuild the problem
DLLs.
This directory contains error and information logs. The Buildlog contains the same
information as the Build Output form in Business Function Builder.
363
Resolving Errors
You can use Business Function Builder tools to help you resolve errors. If you notice any
unresolved external errors during a business function build, your consolidated DLL still builds,
and OneWorld should run normally. However, OneWorld cannot execute any unresolved
business function.
Use the dumpbin tool to verify that a particular business function is present in a consolidated
DLL. If a business function is present, its name appears in the dumpbin output, followed by a
nonzero number in parentheses.
Use the PDB scan to resolve the CVPACK fatal error. The CVPACK error occurs when the
Business Function Builder attempts to link an object file that was built with PDB information.
The PDB scan finds the problem object file. You must then recompile the problem object file
on your machine with the Business Function Builder.
If a business function is compiled using Visual C++, it will not work properly. You can use
PDB scan to identify any business functions that have been built outside of Business
Function Builder. Use Business Function Builder to rebuild these functions so that they work
properly.
If one of the DLLs is out of synch, you must rebuild it using the Build option. This generates a
makefile and then relinks all the business functions within it.
The Synchronize JDEBLC option from the Business Function Builder Tools menu corrects
any misplaced or incorrectly-built business functions. This option reviews the server DLLs
and determines whether the local workstation specifications match those of the server. If they
do not, then Business Function Builder will rebuild the business functions in the correct DLL
on the server and relink them.
364
The Build Log contains the following sections:
Build The build header shows the configuration for a specific build, including the source path,
Header foundation path, and destination path.
Build The build messages section displays the compile and link activity. During a compile, a line is
Messages output for each business function that was compiled Any compile errors are reported as error
cxxxx. During the link part, business function builder outputs the text Creating library
.... This text might be followed by linker warnings or errors.
Build The last section of the build summarizes the build for each DLL. This summary is in the form
Summary x error(s), x warnings (y). The summary indicates how the status of the build. If
you have no warnings and no errors, then the build was successful. If the summary reports an
error, search the log for the word error to determine the source of the error. Typical build
errors are syntax errors and missing files.
• The Account Ledger table (F0911) accepts updates across product lines, as well as
external sources.
• The Employee Transaction Detail File table (F06116) accepts updates from batch,
interactive, and external sources.
The Master Business Function source is named Bxxxxxxxx (the same as any other business
function), unless the object already exists on the AS/400 as a functional server. In this case,
the XTXXXXZ1 naming convention is used. Within this source are external business
functions for each of the modules.
The data structure name for each module is DxxxxxxxxA,B,C and so on. (Examples include
B0400047 - D0400047A [Begin Document], D0400047B [Edit Line], D0400047C [Edit
Document], D0400047D [End Document].)
The format for naming individual business functions is file-name module-name. Document is
shortened to Doc. (An example of a business function name is F0411BeginDoc.)
The functional use code of 192 designates business functions as master business functions.
A cache tracks transaction records. It has the naming convention FxxUIyyy, where:
You can use interactive versions to set up different versions of the master business function
processing options. Calling programs then pass the version name to the version parameter of
BeginDoc.
Function names follow the standard naming convention Fxxxxx. If a table has multiple master
business functions, include the program name in the function name.
For example:
• F3112SuperBackFlushBegDoc
• F3112WorkOrderRoutingsBegDoc
366
Components of a Transaction Master Business Function
You typically use the following basic components for a master business function:
Begin Document
Function Name
FxxxxxBeginDocument
Hook-Up Tips
• You must call a function at least once before calling Edit Line.
367
• If errors occur during validation of the header field when the function is called, call the
function again to verify that errors have been cleared before calling Edit Line.
• If this function might be called multiple times from different events, include it on a
hidden button on an application to reduce duplicate code and ensure consistency.
This button might then be called from focus on grid because the user is then adding
or deleting detail records, and is finished adding header information. In case of a
Copy in which the user does not use the grid, this button might also be called on OK
button.
• Calling a button from an asynchronous event breaks the asynchronous flow and
forces the button to be processed in synchronous mode (inline).
Common Parameters
Name Alias I/O Description
Job Number JOBS I/O Pass Job Number created in BeginDocument, if previously called;
otherwise, pass zeros and assign a job number.
Header Field One **** I/O Pass in all the header fields that are common to the entire document.
Begin Document processes all of these fields and validates them, Data
Dictionary edits, UDC editing, default values, and so on. Begin document
might also fetch to the table to validate that records matching these
header fields exist for Delete and Change, or do not exist for Add.
368
Header Field Two **** I/O
. **** I/O
.
.
Work Field / **** I List any work fields that the program needs. These could be flags for
Processing Flag processing, dates to validate, and so on. These fields might or might not
One be used. For example, currency control might be saved in the header
cache so that all detail records would either use currency or not.
. I
.
.
Work Field / I
Processing Flag
One
Application-Specific Parameters
• List the fields needed to process header level information.
• List any work fields needed to perform edits.
• List all processing options needed to process header level information.
Edit Line
Function Name
FxxxxxEditLine
369
• A data dictionary default value
• Edits columns for correct information. This includes interdependent editing between
columns. Also performs UDC and data dictionary edits are performed.
• Writes record to the detail cache if no errors occured. If the record already exists in
the work file, the line in the work file will be retrieved and updated with the changes. If
a record is deleted from the grid in direct mode, and the record does not exist in the
database, the record will be removed from the detail cache. If the record exists in the
database, the action code for the record will be changed to delete, and the record will
be stored in the detail cache until file processing in End Doc.
• Depending on the type of document being processed, different editing and inserting
of default values takes place. An example would be vouchers and invoices
processed through the journal entry MBF. The tax calculator is only called for
vouchers.
• Depending on the event processing required, the process edit flag determines the
editing that occurs. For example, in an interactive program, when the Grid Record is
Fetched event runs, Partial Edits might be performed to retrieve descriptions, default
values, and so on. When the Row is Exited and Changed event runs, Full Edits might
be performed to validate all user input.
Common Parameters
Name Alias I/O Description
Job Number JOBS I Used as key or to create a unique name for the cache or work file.
Retrieved from Begin Document.
Line Number LNID I/O The unique number identifying the transaction line. Can also be used as
the line number in the Detail Cache.
370
Error Conditions ERRC O 0 = No Errors
1 = Warning
2 = Error
Update Or Write to EV02 I 1 = Write and/or Update records to the work file.
Work File
Record Written to EV03 I/O 1 = A record is written to the work file. This reduces I/O calls to the work
Work File file.
Blank = No record was written to the work file.
Detail Field One **** I/O Pass in all the Detail fields that will be edited. Typically, these are the gird
record fields. Edit Line provides validation, Data Dictionary edits, UDC
editing, defaults, and so on.
Work Field / **** I List any work fields that the program needs. These fields could be flags for
Processing Flag processing, dates to validate, and so on.
One
Work Field / I
Processing Flag
One
Edit Document
Hook Up Tips
• Call the function at least once after calling Edit Line and before End Document.
• If errors occur during validation, call the function again to verify that errors have been
cleared before calling End Document.
• Call this function on the OK button clicked event so that, if errors occur, they are
corrected before the user exits the application.
371
Common Parameters
Name Alias I/O Description
Job Number JOBS I Was retrieved from Begin Document
Application-Specific Parameters
Because all records have been added in Begin Document or Edit Line, and because any
information needed to process the entire document is in cache, a minimum number of
parameters are needed in this function.
End Document
Function Name
FxxxxxEndDocument
372
Hook-Up Tips
This function is typically called on OK button Post Button Clicked, and it is hooked up Asynch.
In the C code, after the insert or update to the database is successful, call Clear Cache to
clear the cache.
Common Parameters
Name Alias I/O Description
Job Number JOBS I Was retrieved from Begin Document
Application-Specific Parameters
• List the fields needed to process update or writes, such as Time and Date Stamp
fields.
• List any work fields needed to perform updates or writes.
• List all processing options needed to process updates or writes.
Clear Cache
Function Name
FxxxxxClearCache
Common Parameters
Name Alias I/O Description
Job Number JOBS I Indicates the job number of the transaction that you want to clear. This job
number should have been returned from BeginDoc.
Clear Header EV01 I Indicates whether the header cache should be cleared.
1 = clear cache
Clear Detail EV02 I Indicates whether the detail cache should be cleared
1 = clear cache
Line Number LNID I Indicates where to begin clearing records in the detail cache. If this line is blank,
From the system begins clearing from the first record
373
From the system begins clearing from the first record.
(Optional)
Line Number NLIN I Indicates where to stop clearing records in the detail cache. If this line is blank,
Thru the system deletes to the end of the cache.
(Optional)
Function Name
FxxxxxxCancelDoc
Common Parameters
Name Alias I/O Description
Job JOBS I The job number of the transaction that you want to clear. This job number should
Number have been returned from BeginDoc.
Cache Structure
The cache structure stores all lines of the transaction. Transaction lines are written to the
cache after they have been edited. The EndDoc module then reads the cache to update the
database.
Header
Field Description Field Key Type Size
Job Number JOBS X Num
Processing Options
Work Fields
Job Number A unique job number assigned when the job is started by the BeginDoc module. This
distinguishes transactions in the cache for each job on the workstation that is using the
cache. Use next number 00/4 for the job number. If you are using a unique cache name
(Dxxxxxxxxx [job number]), you do not necessarily need the job number field stored in the
cache for a key because you would only be working with one transaction per cache You
374
can, therefore, use any field as the key to the cache.
Processing Processing option values were read in using AllocatePOVersionData, and are needed in
Options other modules of the MBF.
Currency A system value that indicates whether currency is on and what method of currency
Flag conversion is used (N, Y, or Z).
Business The fields required for processing the transaction and writing it to the database. All fields in
View Fields the record format that are not saved in the header cache will be initialized when the record
is added to the database using the APIs.
Work Fields Fields that are not part of the business view, but are needed for editing and updating the
transaction.
For example, Last Line Number is the last line number written to the detail cache. It will be
stored at the header level, and retrieved and incremented by the MBF. The incremented
line number will be passed to the header cache and stored for the next transaction.
Detail
Field Description Field Key Type Size
Job Number JOBS X Char 8
Work Fields
Job A unique job number assigned when the job is started by the BeginDoc module. This
Number distinguishes transactions in the cache for each job on the client that is using the cache. If
you are using a unique cache name (Dxxxxxxxxx[job number]), you do not necessarily need
to store the job number field in the cache for a key because you work with only one
transaction per cache. You can, therefore, use line number only as the key to the cache.
Line The line number used to uniquely identify lines in the detail cache. This line number can also
Number eventually be assigned to the transaction when it is written to the database. The transaction
lines are written to the detail cache only if they are error-free.
Line Action The action for the transaction line. Valid values are:
A or 1 = Add
C or 2 = Change
D = Delete
Business Fields required for processing the transaction that will be written to the database. All fields in
View Fields the record format that are not saved in the detail cache will be initialized when the record is
375
the record format that are not saved in the detail cache will be initialized when the record is
added to database using the APIs.
Work Fields that are not part of the business view, but are needed for editing and updating the
Fields transaction line.
376
Implementing Transaction Master Business Functions
You can use single record processing or document processing to implement transaction
master business functions.
377
• Update Grid Record to DB - before
• Suppress Update
• Delete Grid Record to DB - before
• Suppress Delete
Document Processing
• Suppress Add/Delete
• Hook up End Document Edit Object module
6. Cancel button is pressed
MBFs are similar to the functional servers in WorldSoftware. You can use MBFs for the
following reasons:
378
• To create reusable, application-specific code
• To reduce duplicated code
• To ensure that hookup is consistent
• To support interoperability models
• To allow processing to be distributed through OCM
• To design event-driven architecture
MBFs are typically used for multiline business transactions, such as Journal Entries or
Purchase Orders. However, certain master files also require MBF support due to their
complexity, importance, or maintenance requirements from external parties. The
requirements for maintaining master files are different from those for multiline business
transactions.
Generally, master file MBFs are much simpler than multi-line business transaction MBFs.
Transaction MBFs are specific to a program, while master file MBFs access a table multiple
times.
For interoperability, master file MBFs can be used instead of table I/O. This allows you to
perform updates to related tables using the business function instead of table event rules.
Multiple records are not used. Instead, all edits and actions are performed with one call.
In their basic form, master file MBFs have the following characteristics:
Single call Generally, you can make one call to an MBF to edit, add, update, or delete a master file
record. An edit-only option is also available.
Single data The fields required to make the request and provide all the necessary values are in one
structure data structure. The data fields should correspond directly with columns in the associated
master file.
No cache Because each master file record is independent of the others, caching is unnecessary.
The information provided with each call and the current condition of the database provide
all of the information that the MBF needs to perform the requested function.
Normal error As with other MBFs, master file MBFs must be capable of executing in both an interactive
handling and batch environment. Therefore, the calling program must determine the delivery
mechanism of the errors.
Inquiry feature To allow external systems to be totally insulated from the J.D. Edwards database, an
inquiry option is included. This allows an external system to use the same interface to
access descriptive information about a master file key as it uses to maintain it.
Affect on For OneWorld applications, the effect of implementing a master file MBF should be
applications minimal. Consider and follow several standards before implementing a master file MBF.
Master file applications use the OneWorld tool to process all I/O for the Find/Browse forms.
This allows you to use all of the search capabilities of OneWorld.
You should design all master file applications so that all Fix/Inspect forms are independent of
each other. Each Fix/Inspect form can use the OneWorld tool to fetch the record, and all edits
and updates occur using the master file MBF. This independent design has the following two
major benefits:
379
• It organizes the application in a manner that simplifies edits that involve dependent
fields across multiple forms.
• It allows consistent implementation of modeless processing for all Master File
applications and all forms within these applications.
Certain circumstances might justify deviation from this simple model. These circumstances
are:
For example, if the customer master file exceeded the data structure limitation, you
would use the following two MBFs to process the file:
• F0301ProcessMasterData
• F0301ProcessBillingData
In this example, the F0301ProcessMasterData function processes the base data, and
the F0301ProcessBillingData updates additional data.
Street addresses and phone numbers within Address Book are a good example.
Customers expect that they can create an address book record by calling a simple
address book API with basic identifying information, the street address, and a phone
number.
Information Structure
380
Process Edits EV02 I Optional 1 = All Edits (Default)
2 = Partial Edits (No Data Dictionary)
Same as except AN8 I Optional Required for S = Action Code The record is the same
except for what the user changes.
Naming Convention
• The functional server source is named Nxxxxxxx for named event rule business
functions or Bxxxxxxx for C business functions, which is the same naming convention
as that for any other business function. Within this source is an external business
function for each of the modules. The data structure name for each module is
DxxxxxxA, B, C and so on (for example, N03000052 - D03000052A
F0301ProcessMasterData, D03000052B F0301ProcessBillingData).
• The individual business function is named file nameProcessMasterData (for
example, F0301ProcessMasterData). If additional master file functions are needed
due to data structure limitations, then the function name is named file
nameProcessxxxxxxxxx, where xxxxxxxxx represents a descriptive name for the
type of data being processed (for example, F0301ProcessBillingData).
381
• The functional use code of 192 in the Object Librarian is used to designate business
functions as a functional server.
Performance Impact
Performance issues might occur regardless of how you handle large-format tables. Two
options for improving performance are:
• Group data in logical groups to allow data structures to be smaller and easier for the
user to implement. However, this configuration forces the user to make multiple calls
to add or update an entire record in a table.
• Use a data structure that allows 300 fields. This is also cumbersome to implement,
and the user can choose not to apply all of the fields.
Through different interfaces, the user can add additional data later. Most processes dictate
that part of the data be added immediately, while other related data can be added later. For
example, the user might define a customer master record, but wait until a later date to define
the customer's billing instructions. Therefore, J.D. Edwards recommends that you choose the
first option of splitting MBFs into one MBF that handles base data and one MBF that handles
additional data.
• Purpose
• Parameters (the data structure used)
• Explanation of each individual parameter that indicates input and output required,
and explanation of return values
• Related tables (the table accessed)
• Related business functions (business functions called from within the functions itself)
• Special handling instructions
You use Business Function Design and Data Structure Design to document your business
functions.
Business Function Notes Shows you the documentation for the specific
business function that you are using.
Data Structure Notes Displays notes about the data structure for the
business function.
Parameter Notes Displays notes about the actual parameters in the data
structure.
382
► To create business function documentation
1. On Object Management Workbench, choose the business function that you want to
document, and then click the Design button in the center column.
2. On Business Functions Design, click the Attachments tab.
3. Right-click in the icon bar on the left side of the form, and then select Templates.
4. On Work With Media Object Templates, click Find.
383
6. Type the appropriate information under each template heading.
Setup Notes and Prerequisites This section includes any special notes to assist in using the
function, including prerequisite functions, special values that
need to be initialized, and events that are recommended to
run the function. It also indicates whether memory must be
cleared separately after the function is used.
Special Logic This section contains additional details about the business
function logic. You typically use it only for complex functions
that require more explanation than the purpose summary.
384
► To create data structure documentation
1. On Object Management Workbench, check out the data structure that you want to
document.
2. Ensure that the data structure is highlighted, and then click the Design button in the
center column.
3. On Data Structure Design, click the Attachments tab.
4. Right-click in the icon bar on the left side of the form, and then select Templates.
5. On Work With Media Object Templates, click Find.
385
which you want to enter notes, click the Data Structure Item Attachments binder clip.
Parameter documentation has no special template.
You can enter specific notes about a data structure item to further clarify the information that
should be passed in or passed out of the item, such as a mode parameter. The notes should
indicate the valid values that the function accepts when you hook it up and how to use these
values. For example, valid values might include 1 for Add and 2 for Delete.
1. From the Cross Application Development Tools menu (GH902), select Generate
BSFN Documentation.
386
3. On Version Prompting, if you do not want to generate all business function
documentation, choose the following option:
• Data Selection
4. Click Submit.
5. On Data Selection, build your criteria for data selection, and then click OK.
Select only those functions for which you are generating documentation.
387
6. Depending on the criteria that you choose, you might also need to set processing
options.
388
7. On Report Output Destination, if you are running your report locally, choose one of
the following output destinations:
• On Screen
• To Printer
The system creates a hypertext markup language (HTML) link for each business function for
which you generated documentation. It also creates an Index HTML file. These HTML files
appear in your output queue directory. Output is in the following format:
Function Name
Function Description from
Parent DLL:
Location:
Language:
Purpose
Special Handling
Data Structure
Parameter Name dataitem data type req/ opt
For example, if you want to generate documentation for a single business function, you can
use the data item BC Object Name (F9860).
If you want to generate documentation for all of the business functions for a specific product
code, such as Payroll, you use the data item BC Product Code (F9860).
389
You can also use the right operand on the Data Selection form to choose ranges or lists of
values to further refine your filter.
You can filter using any value that is associated with a business function. For example, you
can use BC Date - Updated (F9860) if you have already produced the documentation for a
previous release of OneWorld and, after an upgrade or update of OneWorld®, you want to
create documentation for only new or modified business functions.
You use BC Function Type (F9860) to choose Master business function documentation.
You use BC Location Business Function (F9860) to produce documentation for client-run
business functions.
You use BC Object Type (F9860) to generate documentation for NERs only.
You can use many other informational fields to choose the business functions for which you
want to generate documentation.
390
You can then select the function that you want to call. From the row menu, choose Data
Structure Notes or Attachments to view the documentation for the business function.
391
You can click one of the following buttons on Business Function - Values to Pass to view
documentation for a single business function.
Structure Notes Displays the notes for the whole data structure.
Refer to Business Function Event Rules for more information about accessing this form.
You can use Business Function Documentation Viewer to view documentation for all
business functions or selected business functions. After you have generated your report, use
the Business Function Documentation Viewer (P98ABSFN) to display your information. J.D.
Edwards suggests that you use this method to view business function documentation.
The Business Function Documentation form contains the HTML index that you generated.
You can either view the entire index or select just the functions for a specific letter in the
alphabet by clicking on that letter in the index. Double-click a business function to view
documentation that is specific to that function.
392
The media object loads the HTML index of the business functions, based on a media object
queue. In the media object queue table, a queue named Business Function Doc must be set
up.
This queue must point to the directory in which the business function HTMLs are located. The
system administrator usually generates the documentation for all business functions.
Because the generation process places the documentation files in the local directory, the
administrator must then copy the files to a central directory on the deployment server. The
files must be copied to the media object queue for media object business function notes. If
you are using the standalone version of OneWorld, this path is usually the output directory
from the Network Queue Settings section of your jde.ini file. If this entry is not in your jde.ini
file, it is in the print queue directory in your OneWorld directory.
A process failure occurs when a jdenet_k process aborts abnormally. For a process failure,
OneWorld server processing launches a new jdenet_k process and continues processing.
A system failure occurs when all OneWorld server processing fails, the machine itself is
down, or the client cannot reach the server because of network problems. For a system
failure, business function processing must be rerouted either to a secondary server or to the
local client. The system uses the following process to attempt to recover from this state:
When the call to the server fails, the system attempts to reconnect to the server.
393
• If reconnect succeeds and no cache exists, the system reruns the business function
on the server. If a cache does exist, the system forces the user out of the application.
• If reconnect fails and no cache exists, the system switches to a secondary server or
to the local client. If a cache does exist, the system forces the user out of the
application.
After one module switches, all subsequent modules switch to the new location.
394
Caching
Caching is storing a local copy of frequently accessed content of remote objects. You can
use caching to improve performance. OneWorld uses the following two types of caching:
Understanding JDECACHE
JDECACHE is a component of JDEKRNL that can hold any type of indexed data that your
application needs to store in memory, regardless of the platform on which the application is
running on. This means that a whole table can be read from a database and stored in
memory. There is no limitation on the type of data, size of data, or number of data caches
that an application can have, other than the limitations of the computer on which it is running.
Both fixed-length and variable-length records are supported. To use JDECACHE on any
supported platform, you need to know only a simple set of API calls.
Data handled by JDECACHE is in RAM. Therefore, ensure that you really need to use
JDECACHE. If you use JDECACHE, design your records and indices carefully. Minimize the
number of records that you store in JDECACHE because OneWorld and various other
applications need this memory, as well.
JDECACHE supports multiple cursors, multiple indexes, and partial keys processing.
JDECACHE gives you flexibility in terms of positioning within the cache for data manipulation.
This improves performance by reducing searching within the cache.
You use workfiles when an application must store records that a user enters in a detail area
until OK processing on the Button Clicked event. On OK processing, all records must be
updated to the database simultaneously. This is similar to transaction processing. For
example, in the detail area of purchase order detail, if a user enters 30 lines of information
and then decides to cancel the transaction, all records in the work file are deleted and nothing
is written to the database. As the user exits each detail row, editing takes place for each field,
and then that record is written to the work file.
If you implement this situation without using work files, irreversible updates to database
tables occur when the user exits each row. Using work files allows you to limit updates to
tables so that they only occur on OK button processing, and they are included in a
transaction boundary. The work file defines a data boundary for the grid for processing
purposes. This is useful when multiple applications or processes (such as business functions)
must access the data in the work file for updates and calculations.
Although using work files for the example above will function correctly, using cache will
probably increase performance. You can use JDECACHE to store in memory the records that
the user enters in one purchase order. The number of records that you store depends on the
cache buffer size for each record, the local memory size, the location in which the business
function that you use runs (server or workstation), and so on. Typically, you should not store
395
more than 1000 records. For example, do not cache your entire Address Book table in
memory.
Performance Considerations
The following are some guidelines for getting the best performance out of JDECACHE:
You can manage cache using the JDECACHE management APIs for the following:
• HUSER
• HCACHE
These two handles are essential for cache identification and cache management.
• jdeCacheInit
• jdeCacheInitMultipleIndex
• jdeCacheInitUser
• jdeCacheInitMultipleIndexUser
• jdeCacheGetNumRecords
• jdeCacheGetNumCursors
• jdeCacheClear
• jdeCacheTerminate
• jdeCacheTerminateAll
jdeCacheInit/jdeCacheInitMultipleIndex initializes the cache uniquely per user. Therefore, if a
user logs in to OneWorld and then runs two sessions of the same application simultaneously,
the two application sessions will share the same cache. Consequently, if the first application
deletes a record from the cache, the second application cannot access the record.
396
Conversely, if two users log in to OneWorld and then run the same application
simultaneously, the two application sessions have different caches. Consequently, if the first
application deletes a record from its cache, the second application will still be able to access
the record in its own cache.
You can use the JDECACHE manipulation APIs for retrieving and manipulating the data in
the cache. Each API implements a cursor that acts as pointer to a record that is currently
being manipulated. This cursor is essential for navigation within the cache. JDECACHE
manipulation APIs should be passed handles of the following types:
• jdeCacheOpenCursor
• jdeCacheResetCursor
• jdeCacheAdd
• jdeCacheFetch
• jdeCacheFetchPosition
• jdeCacheUpdate
• jdeCacheDelete
• jdeCacheDeleteAll
• jdeCacheCloseCursor
• jdeCacheFetchPositionByRef
• jdeCacheSetIndex
• jdeCacheGetIndex
Before you can use JDECACHE, you must initialize a cache. You must define an index
before you initialize a cache. The index tells the cache which fields in a record to use to
uniquely identify a cache record. You must create a separate cache for each group of data
that an index references.
397
Calling JDECACHE APIs
JDECHACHE APIs must be called in a certain order. The following steps list the order in
which the JDECACHE-related APIs must be called, except for step 6, when the actual
JDECACHE APIs may be called in any order:
1. JDB_InitBhvr
2. Create index or indices
3. jdeCacheInit or jdeCacheInitMultipleIndex
4. jdeCacheAdd
5. jdeCacheOpenCursor
6. JDECACHE Operations
The rest of JDECACHE operations can occur in any order:
jdeCacheFetch
jdeCacheFetchPosition
jdeCacheUpdate
jdeCacheDelete
jdeCacheDeleteAll
jdeCacheResetCursor
7. jdeCacheCloseCursor
8. jdeCacheTerminate
9. JDB_FreeBhvr
Setting Up Indices
To store or retrieve any data in JDECACHE, you must set up one and only one index that
consists of at least one column. The index is limited to a maximum of 25 columns, which are
called segments, in the index structure. Use the data type that is provided to you to tell the
cache manager what your index looks like. You must provide the number of columns
(segments) in the index and the offset and size of each column in your data structure. To
maximize performance, minimize the number of segments.
The following is the definition of the structure that holds index information:
#define JDECM_MAX_UM_SEGMENTS 25
struct _JDECMKeySegment
398
int idDataType; /* EVDT_MATH_NUMERIC or EVDT_STRING*/
} JDECMKEYSEGMENT;
struct _JDECMKeyStruct
JDECMKEYSEGMENT CacheKey[JDECM_MAX_NUM_SEGMENTS];
} JDECMINDEXSTRUCT;
• Always declare the index structure as an array that holds one element for single
indexes. Declare the index structure as an array that holds more than one element
for multiple indexes. You can create an unlimited number of indexes.
• Always use memset() for the index structure. When you use memset() for multiple
indexes, multiply the size of the index structure by the total number of indexes.
• Always assign as elements the number of segments that correspond to the number
of columns you have in the CacheKey array.
• Always use offsetof () to indicate the offset of a column in the structure that contains
the columns.
The following example illustrates a cache that holds the Address Book table (F0101). The
data in the cache is referenced by the index that consists of columns ABAT1, ABAC01,
ABAC02, ABDC.
JDECMINDEXSTRUCT Index[1];
Index.nNumSegments = 4;
Index.CacheKey[0].idDataType =EVDT_STRING;
Index.CacheKey[1].nSize = sizeof(f0101.abac01);
Index.CacheKey[2].nSize = sizeof(f0101.abac02);
Index.CacheKey[3].nSize = sizeof(f0101.abdc);
399
The flag idDataType indicates the data type of the particular key. The following illustration
uses ABAN8, which is a MATH_NUMERIC:
Index.nNumSegments = 1;
Pass a unique cache name so that JDECACHE can identify the cache. Pass the index to this
API so that the JDECACHE knows how to reference the data that will be stored in the cache.
Because each cache must be associated with a user, you must also pass the user handle
obtained from the call to JDB_InitUser. This API returns an HCACHE handle to the cache
that JDECACHE creates. This handle appears in every subsequent JDECACHE API to
identify the cache.
The keys in the index must always be the same for every jdeCacheInit and
jdeCacheInitMultipleIndex call for that cache until it is terminated. The keys in the index must
correspond in number, order, and type for that index each time that it is used.
400
After the cache has been initialized successfully, JDECACHE operations can take place
using the JDECACHE APIs. The cache handle obtained from jdeCacheInit must be passed
for every JDECACHE operation.
JDECACHE makes an internal Index Definition Structure that accesses the cache when it is
populated. The following example illustrates what happens when an index is defined and
passed to jdeCacheInit.
int nlnt1
char cLetter1
char cLetter2
char cLetter3
char szArray(5)
You decide that each of the records in the cache will be indexed uniquely by the values
contained in the following:
• nInt1
• cLetter1
• cLetter3
You pass that information to jdeCacheInit, and JDECACHE creates the following Index
Definition Structure for internal use. The Index Definition Structure is for STRUCT letters.
401
Using an Index to Access the Cache
When you use an index to access the cache, the keys in the index that are sent to the API
must correspond to the keys of the index used in the call to jdeCacheInit for that cache in
number, order, offset positions, and type. Therefore, if a field that was used in the index
passed to jdeCacheInit offsets position 99, it must also offset position 99 in the index
structure that passed to JDECACHE access API.
You should use the same index structure that was used for the call to jdeCacheInit whenever
you call an API that requires an index structure.
The following example illustrates why the index offsets must be specified for the jdeCacheInit
and how they are used when a record is to be retrieved from the cache. It shows how the
passed key is used in conjunction with the JDECACHE internal index definition structure to
access cache records.
• 1
• c
• i
JDECACHE accesses the values that you pass in the structure at the byte offsets that were
defined in the call to jdeCacheInit.
JDECACHE compares the values 1, c, and i that it retrieves from the passed structure to the
corresponding values in each of the cache records at the corresponding byte offset. The
cache records are stored as the structures that were inserted into the cache by jdeCacheAdd,
which is the same structure as the one you pass first. The structure that matches the passed
key is the second structure to which HCUR1 points.
You should never create a smaller structure that contains just the key in order to access the
cache. Unlike most indexing systems, JDECACHE does not store a cache record's index
separately from the actual cache record. This is because JDECACHE deals with memory-
resident data and is designed to be as memory-conservative as possible. Therefore,
JDECACHE does not waste memory by storing an extra structure for the sole purpose of
indexing. Instead, a JDECACHE record has a dual purpose of index storage and data
storage. This means that, when you retrieve a record from JDECACHE using a key, the key
should be contained in a structure that is of the same type as the structure that is used to
store the record in the cache.
Do not use any key structure to access the cache other than the one for which offsets that
were defined in the index passed to jdeCacheInit. The structure that contains the keys when
accessing a cache should be of the same structure that is used to store the cache records.
The following diagram shows what happens when any structure, other than the one that you
used in the index definition, is used to insert into the cache.
402
If jdeCacheInit is called twice with the same cache name and the same user handle without
an intermediate call to jdeCacheTerminate, the cache that was initialized using the first
jdeCacheInit will be retained. Always call jdeCacheInit with the same index each time you call
it with the same cache name. If you call jdeCacheInit for the same cache with a different
index, none of the JDECACHE APIs will work.
The key for searches must always use the same structure type that stores cache records.
403
all unterminated jdeCacheInit or jdeCacheInitMultipleIndex calls must be terminated with a
jdeCacheTerminateAll.
JDECACHE Cursors
JDECACHE Cursors (JDECACHE Cursor Manager) is a component of JDECACHE that
implements a JDECACHE Cursor for record retrieval and update. A JDECACHE Cursor is a
pointer to a record in a user's cache. The record after the record in which the cursor is
currently pointing is the next record that will be retrieved from the cache upon calling a cache
fetch API. Thus, a cursor is very effective for positioning yourself in the cache for data
access.
404
This means that the cache must be initialized by a call to jdeCacheInit and populated by a
call to jdeCacheAdd before a cursor can be opened.
You can obtain multiple cursors to a cache by calling jdeCacheOpenCursor and passing
different HJDECURSOR handles. In a multiple cursor environment, all the cursors are
independent of each other. See JDECACHE Multiple Cursor Support for more information.
When you are finished working with the cursor, you must deactivate it or close it by calling the
jdeCacheCloseCursor API, and passing an HJDECURSOR handle that corresponds to the
HJDECURSOR handle that was passed to the jdeCacheOpenCursor. When a cursor is
closed, it cannot be used again until it is opened by a call to jdeCacheOpenCursor.
HJDECURSOR
HJDECURSOR is the data type for the cursor handle. It must be passed to every API for
JDECACHE Data Manipulation except jdeCacheAdd.
JDECACHE Dataset
The JDECACHE dataset includes all of the records from the current position of the cursor to
the end of the set of sequenced records. Thus, if a cursor is in the middle of the dataset,
none of the records in the cache prior to the current position of the cursor is considered part
of the dataset. The JDECACHE Dataset consists of the cache records sequenced in
ascending order of the given index keys. This, in fact, means that the order in which the
records have been placed in JDECACHE is not necessarily the order in which JDECACHE
Cursors retrieves them. JDECACHE Cursors retrieves records in a sequential ascending
order of the index keys. A forward movement by the cursor reduces the size of the dataset
during sequential retrievals. When the cursor advances past the last record in the dataset, a
failure is returned.
405
The following example illustrates the creation of a JDECACHE cache and a JDECACHE
dataset.
Cursor-Advancing APIs
Cursor-Advancing JDECACHE Fetch APIs implement the fundamental concepts of a cursor.
The cursor-advancing API set consists of APIs that advance the cursor to the next record in
the JDECACHE dataset before fetching a record from JDECACHE. The following are cursor-
advancing fetch APIs:
• jdeCacheFetch
• jdeCacheFetchPosition
A call to jdeCacheFetch first positions the cursor at the next record in the JDECACHE
dataset before retrieving it. JDECACHE Cursors also allow calls to position the cursor at a
specific record within the dataset. To do this, you call the jdeCacheFetchPosition API, which
advances the cursor to the record that matches the given key before retrieving it.
You can use a combination of cursor-advancing fetch APIs if you need a sequential fetch of
records starting from a certain position. Call jdeCacheFetchPosition, passing the key of the
406
record from which you want to start retrieving. This advances the cursor to the desired
location in the dataset and retrieves the record. All subsequent calls to jdeCacheFetch will
fetch records starting from the current cursor position in the data set until the end of the
dataset, or until the program stops for another reason.
Non-Cursor-Advancing APIs
Non-cursor-advancing JDECACHE Cursor APIs do not advance the cursor before retrieving a
record but, instead, keep the cursor pointing to the retrieved record. The following are non-
cursor-advancing fetch APIs:
• jdeCacheUpdate
• jdeCacheDelete
Updating Records
If you want to update a specific record with a key that you know, call jdeCacheFetchPosition,
passing the known key, to position the cursor at the location of the record that matches the
key. Because the cursor is already pointing to the desired location, call jdeCacheUpdate,
passing the same HJDECURSOR that you used in the call to jdeCacheFetchPosition.
If the index key changes, cache resorts the records again, and the cursor points to the
updated location. However, when you call jdeCacheFetch, the system retrieves the next
record in the updated set. Consequently, the system might not retrieve the correct record
because changing the index key caused the order of the records to change.
Deleting Records
If you want to delete a specific record with a known key, first call jdeCacheFetchPosition to
point the cursor to the location of the record that matches the key. Next, call jdeCacheDelete,
to remove the record from cache. Pass jdeCacheDelete the same HJDECURSOR that you
used when you called jdeCacheFetchPosition. After deleting a record, use jdeCacheFetch to
retrieve the record that followed the now deleted record. This process works only when you
call jdeCacheDelete.
You can also delete a specific record by calling jdeCacheDeleteAll and passing it the full key
with the specific record to be deleted. In this case, jdeCacheFetch will not work following
jdeCacheDeleteAll, although you can work around this condition with jdeCacheFetchPosition
or jdeCacheResetCursor.
To delete a sequential set of records, first call jdeCacheFetchPosition to point the cursor to
the first record in the set or call jdeCacheDeleteAll to delete the first record in the set. Then,
call jdeCacheDelete sequentially. In this case, jdeCacheFetch will not work following
jdeCacheDeleteAll, although you can work around this condition with jdeCacheFetchPosition
or jdeCacheReset Cursor.
407
If you want to delete records that match a partial key, call jdeCacheDeleteAll and pass it a
partial key. The system deletes all of the records that match the partial key. After calling this
API, jdeCacheFetch does not work.
See JDECACHE Partial Keys for a detailed explanation of partial keys. If you pass 0 for the
number of keys, the system assumes that you want to perform a full key search.
Another way to reset a cursor to a specific position that is outside of the current dataset is to
call the jdeCacheFetchPosition API. See JDECACHE Dataset for more information.
Closing a Cursor
When you no longer need the cursor, use a call to jdeCacheCloseCursor to close it. This call
closes both the dataset and the cursor. Any subsequent call to any JDECACHE API passing
the closed HJDECURSOR without having called jdeCacheOpenCursor will fail.
Although opening a JDECACHE Cursor for a long period of time requires no overhead, to
release the memory that it requires, you should close the cursor as soon as you no longer
need it.
Some OneWorld applications groups restrict the use of multiple cursors. Some of these
restrictions include:
408
• Do not use two cursors to point to the same record at the same time unless both
cursors are fetching the record.
The following diagram illustrates multiple cursors in JDECACHE.
For example, suppose that an index is defined as a structure containing the fields in the
following order: A, B, C, D, E.
The partial keys that can be synthesized from this index are the following, in order: A, AB,
ABC, ABCD.
The previous set is the only set of partial keys that can be synthesized for the defined index:
A, B, C, D, E.
409
cursor activates and points to the first record in the JDECACHE Dataset that matches the
partial key. If a jdeCacheFetchPosition API was called, subsequent calls to jdeCacheFetch
will fetch all of the records in the dataset that succeed the fetched record to the end of the
dataset. The cursor does not stop on the last record that matches the partial key, but
continues on to fetch the next record using the next call to jdeCacheFetch, even if it does not
match the partial key. When a partial key is sent to jdeCacheFetchPosition, it merely
indicates from where the JDECACHE begins fetching. Because the records in the
JDECACHE dataset are always ordered, the fetch always retrieves all of the records that
satisfy the partial key first.
JDECACHE knows that you are passing a partial key because the fourth parameter to
jdeCacheFetchPosition indicates the number of key fields that are in the key being sent to the
API. If the number of key fields is less than the keys that were indicated when jdeCacheInit
was called, then it is a partial key. Suppose the number of keys is N so that JDECACHE uses
the first N key fields to make comparisons in order to achieve the partial key functionality. If
jdeCacheFetchPosition is called with a number of keys that is greater than the number
specified on the call to jdeCacheInit, an error is returned.
To delete a partial key, you must make a call to jdeCacheDeleteAll. This call deletes all of the
records that match the partial key. To indicate to JDECACHE the partial keys that you are
using, pass the number of key fields to this API.
Verify that the actual number of key fields in the structure corresponds to the numeric value
that describes the number of keys that must be sent to either jdeCacheFetchPosition or
jdeCacheDeleteAll.
JDECACHE Errors
JDECACHE has an effective way of handling errors. All user errors handled by JDECACHE
are communicated to the user though the JDE.LOG. The error statement in the log identifies
the error and the cause.
The following are some of the errors you might find in the JDE.LOG:
JDEDEBUG.LOG indicates each JDECACHE API that was called and when it was called.
410
JDECACHE APIs is called to operate on the cached data. You can cut and paste the
program as necessary. However, it does not print any results. You can place your own input
and output calls where appropriate.
/************************************************************************/
/* */
/* Source : TESTCACHE.C */
/* */
/* Programmer : Chikoore, T */
/* */
/* Date : 12/09/96 */
/* */
/* work files */
/* */
/************************************************************************/
#include <windows.h>
#include <windowsx.h>
#include <jde.h>
#include <F0101.H>
JDE_MEMORY_POOL GPoolCommon;
int
WinMain(
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
/*Environment variables*/
HENV hEnv = NULL;
411
HJDECURSOR hF0101CacheCursor1 = NULL;
JDECMINDEXSTRUCT Index[1];
ID idTable = ID_F0101;
F0101 dsInsertStruct,dsRetrieveStruct,f0101;
/*Just variables*/
KEY1_F0101 dsF0101CacheKey;
/*********************************************************************/
/* */
/* Section 1 */
/* */
/* */
/*********************************************************************/
JDBcode = JDB_InitEnv(&hEnv);
if(JDBcode != JDEDB_PASSED)
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
if(JDBcode != JDEDB_PASSED)
{
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/******************************************************************/
/* */
/* Section 2 */
412
/* */
/* Set up the index key that will be used to access the cache. */
/* */
/* */
/* */
/******************************************************************/
Index->nKeyID = 1;
Index->nNumSegments = 1;
Index->CacheKey[0].nSize = sizeof(f0101.aban8);
Index->CacheKey[0].idDataType = EVDT_MATH_NUMERIC;
/******************************************************************/
/* */
/* Section 3 */
/* */
/* */
/* */
/******************************************************************/
/*Initialize the user cache*/
if(jdeCachecode != JDECM_PASSED)
{
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/**********************************************************************/
413
/* */
/* Section 4 */
/* */
/* in Section 3. */
/* */
/**********************************************************************/
if(JDBcode != JDEDB_PASSED)
jdeCacheTerminate(hUser, hF0101Cache);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/*Select all rows of the address book*/
JDBcode = JDB_SelectAll(hAccessRequest);
if (JDBcode != JDEDB_PASSED)
{
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
sizeof(F0101));
if(jdeCachecode == JDECM_FAILED)
414
break;
} /*END IF*/
memset(&dsInsertStruct,0x00,sizeof(F0101));
} /*END WHILE*/
/**********************************************************************/
/* */
/* Section 5 */
/* */
/* */
/* */
/**********************************************************************/
/*Initialize the first cursor*/
if(jdeCachecode != JDECM_PASSED)
{
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
if(jdeCachecode != JDECM_PASSED)
{
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/**********************************************************************/
/* */
415
/* Section 6 */
/* */
/* */
/* */
/**********************************************************************/
memset(&dsF0101CacheKey,0x00,sizeof(KEY1_F0101));
memset(&dsRetrieveStruct,0x00,sizeof(F0101));
jdeCachecode = jdeCacheFetchPosition(hF0101Cache,
hF0101CacheCursor1,&dsF0101CacheKey,nNumColsInIndex,&dsRetrieveStruct,
sizeof(F0101));
if(jdeCachecode != JDECM_PASSED)
{
/*Initialize the structure*/
memset(&dsInsertStruct,0x00,sizeof(F0101));
strcpy(dsInsertStruct.abtax, ”000011171”);
strcpy(dsInsertStruct.abmcu, ”1001”);
if(jdeCachecode != JDECM_PASSED)
{
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
} /*END IF*/
416
/**********************************************************************/
/* Section 7 */
/* */
/* */
/* */
/**********************************************************************/
ParseNumericString(&dsF0101CacheKey.aban8,”1002”);
/*Find the cache record keyed 1002 using cursor1 and keep the cursor
if(jdeCachecode != JDECM_PASSED)
{
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
}
/*Update the structure we have just retrieved here*/
/*Update the record with the record just retrieved. The cursor is already
pointing to this record so we do not need a key*/
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
417
/**********************************************************************/
/* */
/* Section 8 */
/* */
/* */
/* */
/* */
/**********************************************************************/
/*Set up the key*/
ParseNumericString(&dsF0101CacheKey.aban8,”1001”);
/*Find the cache record keyed 1002 using cursor1 and keep the cursor
pointing to that record because we want to update it*/
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
if(jdeCachecode != JDECM_PASSED)
{
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/**********************************************************************/
/* */
418
/* Section 9 */
/* */
/* */
/* */
/* */
/* */
/**********************************************************************/
/*Initialize the structure to retrieve into*/
memset(&dsRetrieveStruct,0x00,sizeof(F0101));
if(jdeCachecode == JDECM_PASSED)
{
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
/**********************************************************************/
/* */
/* Section 10 */
/* */
/* */
/* */
/**********************************************************************/
419
jdeCachecode = jdeCacheResetCursor(hF0101Cache, hF0101CacheCursor1);
if(jdeCachecode != JDECM_PASSED)
/*reset failed*/
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
if(jdeCachecode != JDECM_PASSED)
{
/*reset failed*/
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor2);
jdeCacheTerminate(hUser, hF0101Cache);
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
nCursor1FetchCounter=0;
/*Fetch the next record using cursor 1*/
while(jdeCacheFetch(hF0101Cache,hF0101CacheCursor1,&dsRetrieveStruct,NULL)
!= JDECM_FAILED)
{
nCursor1FetchCounter++;
/*Check if cursor 1 has reached the max number of fetches*/
if(nCursor1FetchCounter == 2)
420
nCursor2FetchCounter = 0;
while(jdeCacheFetch(hF0101Cache,hF0101CacheCursor2,
&dsRetrieveStruct,NULL) != JDECM_FAILED)
} /*END IF*/
} /*END WHILE*/
/**********************************************************************/
/* */
/* Section 11 */
/* */
/* CODE: END!!! */
/* */
/* */
/**********************************************************************/
jdeCacheCloseCursor(hF0101Cache,hF0101CacheCursor1);
jdeCachecode = jdeCacheTerminate(hUser,hF0101Cache);
if(jdeCachecode != JDECM_PASSED)
{
/*This is just a check for failure otherwise its the same as below*/
JDB_CloseTable(hAccessRequest);
JDB_FreeUser(hUser);
JDB_FreeEnv(hEnv);
jdeMemoryManagementTerminate();
return 0;
} /*END IF*/
JDBcode = JDB_CloseTable(hAccessRequest);
JDBcode = JDB_FreeEnv(hEnv);
/*Terminate the memory management utility*/
jdeMemoryManagementTerminate();
return(0);
421
}
JDECACHE Standards
J.D. Edwards has standards for using cache that you are encouraged to follow.
• The cache business function description follows the business function description
standards.
• The first word must be the noun Cache.
• The second word must be the verb Process.
• For an individual cache function, the words following Process should describe the
cache. For a common cache function, the words following Process should describe
the group to which the individual cache functions belong.
• If the source file contains an individual function, the function name should match the
source name.
• If the source file contains a group of cache functions, the individual function names
should follow the same standards as the Cache Business Function Source
Description standards for individual cache function description.
422
Cache Programming Standards
General Standards
Two types of standard cache functions exist: the individual cache function and the group
cache function. An individual cache function is a single business function that acts as the file
server over a single cache. A group cache function is a single business function that acts as
the file server over several predefined caches. The following general standards apply to
cache programming:
• Use cache APIs only within a standardized cache function. Using the standard cache
function allows you to easily create and maintain code. The standard functions
simplify the use of cache.
• Ensure that the cache function contains the standard cache actions. You can also
include additional actions against cache that are specific to the cache.
• Use a cache function to initialize the cache, load cache, retrieve records from cache,
delete records from cache, modify records, and terminate the cache.
Before terminating the cache, free memory of cache data structures, if necessary. Cache
data structures are different from cache index structures. Terminating the cache frees cache
index structures but does not affect cache data structures.
Cache Name
The following standards apply to the cache name:
423
Data Structure Standard Data Items
The following data items are standard to every Cache Business Function. These data items
should be the first data items in the data structure.
CACHE_GET
• Opens cursor.
• Fetches a single record from the cache using the jdeCacheFetch API.
Fetch can be with either a full or partial key. The number of keys used is passed to
the function through the business function data structure standard data items.
• Cache cursor is not required to perform the fetch, and the cache cursor will not be
returned after the record is fetched.
• Returns success or failure.
CACHE_ADD
• Inserts a record into cache using the jdeCacheAdd API.
• Full key must be defined, and values for all key fields must be passed.
• Duplicate records are not allowed in cache.
• Cache cursor is not required to add a record to cache, and the cache cursor will not
be returned after the record is added.
• Returns success or failure.
CACHE_UPDATE
• Opens cursor.
• Optionally, fetches the record for update from cache using the
jdeCacheFetchPosition API.
• Updates the fetched record using the jdeCacheUpdate API.
• Full key must be defined, and values for all key fields must be passed.
• Cache cursor is not required to update a record in cache, and the cache cursor will
not be returned.
• Returns success or failure.
424
CACHE_ADD_UPDATE
• If a record exists, the record delete it and replace it with the new record. If a record
does not exist, add it.
• First, fetch the record using the jdeCacheFetch API. If a record was found, delete it
using the jdeCacheDelete API. Add the new record with the values passed through
the business function data structure using the jdeCacheAdd API.
• Full key must be defined, and all values for the key fields must be passed.
• The cache cursor is not required, and the cache cursor is not returned.
• Returns success or failure on the new record being added.
CACHE_DELETE
• Deletes one record, a set of records, or all records from cache, depending on the
number of keys passed.
• If the number of keys is equal to the total number of keys in the index, a single record
will be deleted from cache using jdeCacheDelete API.
• A set of records may be deleted from cache by defining a partial key. Records are
deleted using jdeCacheDelete API.
• All records will be deleted from cache if the number of keys is set to zero. Records
are deleted using jdeCacheDeleteAll API.
• Cache cursor is not required to delete a record from cache, and the cache cursor will
not be returned.
• Returns success or failure.
CACHE_GET_NEXT
• If the cache cursor is empty, open the cursor, then fetch the first record using
jdeCacheFetchPosition.
• If the cursor contains a value, fetch the next record.
• Pass a full or partial key. The number of keys must remain constant.
• To determine the end of file, compare the value of the defined number of keys in the
previous record with the next record.
• Matching partial keys for the Group Cache function is more difficult.
• Close the cursor when key match fails and free the data pointer.
CACHE_TERMINATE
Terminates the cache using the jdeCacheTerminate API. The cache is terminated only when
the number of users of the cache equals zero.
CACHE_TERMINATE_ALL
• Terminates the cache using the jdeCacheTerminateAll API.
• Free the data pointer.
• Regardless of the number of users accessing the cache, it will be terminated.
425
CACHE_CLOSE_CURSOR
Closes the cursor using the jdeCacheCloseCusor API.
/*********************************************************
* the clipboard.
*
*********************************************************/
This is the header file for one of the CACHE business functions. The area under structure
definitions contains the data structure for CACHE and its key.
426
Additional Features
Processing Options
Processing options control how an interactive or batch application processes data. You can
use processing options to change the way in which an application or a report appears or
behaves. You can attach unique processing options to different versions of the same
application, which allows you to change the behavior of an application without creating a new
application. You can use processing options to do the following:
• Control the path that a user can use to travel through a system
• Set up default values
• Customize an application for different companies or even different users
• Control the format of forms and reports
• Control page breaks and totaling for reports
• Specify the default version of an application or batch process
You can define processing options for an application that automatically appear at runtime.
In addition, you might need to create a processing option version. The procedures for
creating a processing option version are comparable to those for creating an interactive
version.
Tab Title A title that categorizes processing options. This text appears on the tab for a processing option.
Comment Optional, additional text that appears on the form with the processing options. Each comment
takes the place of a processing option on the page. Adding a comment eliminates space for a
processing option.
Data Item An entry in the data dictionary. Every processing option must be a data item in the data
dictionary. Select data items for which you want to automatically assign default values, such as
cost center ranges and dates.
At runtime, a processing option template displays a set of tabs within an area called a page.
Each tab represents a category of processing options. When you click the tab, the page
changes to show the set of processing options for that category.
Caution
Changes to processing option text can conflict with changes to processing option templates.
Template changes do not take effect until another package is built, but text changes occur
immediately.
427
The following steps describe how to create and implement processing options:
• The processing options appear, and the user can choose processing options and to
supply values.
• A version list appears from which the user can choose a version.
• The application runs with a preselected set of options.
Processing option templates are stored in specification tables. Data values are stored in the
Versions list table (F983051). The processing option template and the processing option text
are stored in the POTEXT TAM file until you check in the processing option template. Then,
the processing option data is stored as a single T object in the Processing Option Text table
(F98306). For batch versions, the F983051 table has an identifier that points to specifications
for overrides (report overrides, data sequencing, data selection, or override location).
Each version of an application can be associated with a list of processing option values. The
processing options that are specified at the time that an interactive or batch application is
launched are those that the application uses when it executes. This sequence prevents users
from changing processing options between the time that a batch application is submitted and
the time it actually executes. Processing options can also be used for a specific execution of
an application. These processing options are not permanently stored in the F983051 table,
and they are used only for that specific execution.
Defining a Template
Use the following process to determine how a processing options data structure looks and
behaves. The structure itself must already exist. See Creating a Processing Options Data
Structure for detailed instructions for creating the template object.
428
► To define a processing options data structure (template)
1. On Object Management Workbench, check out the processing options data structure
with which you want to work.
2. Ensure that the data structure is highlighted, and then click the Design button in the
center column.
3. On Processing Option Design, click the Design Tools tab, and then click Start the
Processing Option Design Aid.
The Processing Options Design tool launches. The area on the left of the form
displays how the processing option will look to the user.
4. Use one of the following methods to choose the data items that you wish to add to
your processing options:
• Double-click on the item in the Data Dictionary Browser, and the item will appear
in the left side of the form under the tab.
• Drag the item from the Data Dictionary Browser to the position where you want it
in the structure members.
5. Click an item to edit it.
• Use the hatching around the control to reposition it.
• Select text, and delete or overwrite it.
Processing Options Design automatically adjusts the size and position of data items
to fit the width of the tab.
429
6. Choose the text button (A) to add comments.
7. Choose an object in the area on the left side of the form, and choose Properties from
the View menu.
430
If you are on a data item, you can view its properties and change the Item Name if
necessary. The Item Name should be unique.
You can click the Help Override Data Item tab to add an alternate szDict from which to get
the help.
8. To view tab properties, click on the tab and choose Properties from the View menu.
You can also right-click on a tab and choose Current Tab Properties from the menu
that appears.
If you are on a tab item, you can can enter a short and long name for the tab.
Use the Help File Name field to add the name of the help file for the tab.
9. To add a new tab, choose New Tab from the File menu.
You can also right-click on an existing tab and choose New Tab from the menu that
appears.
431
J. D. Edwards Processing Option Naming Standards
You should follow J.D. Edwards naming standards wherever possible, unless you have a
strong business case that supports the need to change. Following the naming standards
ensures a consistent approach to programming.
The Object Librarian name for a data structure can be a maximum of 10 or 9 characters
(depending on whether you begin with T) and may be formatted as follows: Txxxxxyyyy
For example, the data structure name for the P0101 application is T0101.
Tab Title
Use the following guidelines when you define a tab title for a processing option:
432
Versions: Versions to Execute contains versions of the application that are called
from this application.
The following are standard application-specific tab titles. Group processing options
under these tab titles when they apply to the type of processing specified in the tab.
Financials
Taxes: Tax Processing contains processing options that are specific to taxes.
Comment
When entering a comment for a processing option, use the following guidelines:
• Number every option on a tab. Use sequential numbering, starting at 1, for each tab.
Note
When several processing options are grouped together, you can choose to number
the processing options or the comments. Choose whatever works best for the
situation.
• Use nouns, such as Customer Master, to describe the processing option. The action
required is defined in the glossary for that processing option.
• Add the text Required to the end of the processing option if a processing option is
required.
• Use a comment block when multiple processing options refer to the same topic. The
comment block is a title for the logical group of processing options.
Data Item
When selecting a data item for a processing option, use the following guidelines:
433
► To change a template for text translation
1. On Work With PO Text Translations, choose the processing option template that you
want to change.
Work with PO Text Translations displays processing option text for the processing
option template and language that you specify in the filter fields.
2. Select the item that you want to change and enter the new text.
You can change a tab.
434
You can change an item.
435
► To add a template with translated text
When you add a new processing option template for an application that is language-enabled,
complete the following tasks:
3. On Select Processing Option Template, choose the processing option template that
you want to use and click OK.
Caution
The versions of an application and the event rules attached to depend on the block of
data passed to the application by way of a specific processing option template. If you
436
disconnect that template from the application or connect a different template to the
application, the application might not run properly.
To change the processing option template, first remove all existing versions of the
application. Then, examine all application objects for event rules to ensure that the
data that they need will still be available after you change or remove the template.
Transaction Processing
A transaction is a logical unit of work (comprised of one or more SQL statements) performed
on the database to complete a common task and maintain data consistency. Transaction
statements are closely related and perform interdependent actions. Each statement performs
part of the task, but all of them are required for the complete task.
Transaction Processing ensures that related data is added to or deleted from the database
simultaneously, thus preserving data integrity in your application. In transaction processing,
data is not written to the database until a commit command is issued. When this happens,
data is permanently written to the database.
For example, if a transaction comprises database operations to update two database tables,
either all updates will be made to both tables, or no updates will be made to either table. This
condition guarantees that the data remains in a consistent state and the integrity of the data
is maintained.
You see a consistent view of the database during a transaction. You do not see changes
from other users during a transaction.
• Atomic - Either all database changes for an entire transaction are completed or none
of the changes are completed.
• Consistent - Database changes transform from one consistent database state to
another.
• Isolated - Transactions from concurrent applications do not interfere with each other.
The updates from a transaction are not visible to other transactions that execute
concurrently until the transaction commits.
• Durable - Complete database operations are permanently written to the database.
437
Commit
A commit is an explicit command to the database to permanently store the results of
operations performed by a statement. This event successfully ends a transaction.
Rollback
A rollback is an explicit command to the database to cancel the results of operations
performed by a statement. This event indicates that a transaction ended unsuccessfully.
Any failure of an insert, update, or delete within a transaction boundary causes all record
activity within that transaction to roll back. If no failures have occurred at the end of the
transaction, a commit is done, and the records become available to other processes.
In the case of a catastrophic failure (such as network problems), the DBMS performs an
automatic rollback. If the user clicks Cancel on a form, a rollback command is issued through
a system function.
You can construct a transaction within a OneWorld application to group multiple database
operations. The application can then request the database management system to buffer the
database operations until the application executes a specific command to perform the
updates requested within the transaction. Database operations that are not part of a
transaction update the database immediately.
If an application has transaction processing turned on, you cannot see updated records until
an update has been committed. Only processes within that transaction can access records in
the transaction until the transaction is complete.
The OneWorld Application Design tool allows you to enable an application for transaction
processing and to define which database operations comprise a transaction. Not all
transactions or applications must be enabled. Enable transaction or applications
appropriately, according to your database configuration.
If transaction processing is turned on for database operations for tables that reside in DB2,
then those tables must be journaled. Journaling can decrease performance because of the
additional processing required. Contact your DB2 administrator if you have problems with this
process.
General messages and errors for transaction processing are written to the jde.log or
jdedebug.log.
Data Interdependence
Data interdependence refers to the data elements that make a transaction complete. For
example, a voucher has records in both the Accounts Payable Ledger table (F0411) and the
Account Ledger table (F0911). Because no data interdependence exists between the two
tables, the transaction is incomplete when data exists in one table and not the other.
438
Transaction Boundaries
Data interdependence is defined by a transaction boundary. A transaction boundary
encompasses all of the data elements that comprise a transaction. A transaction boundary
might include only the data elements on a single form. When a transaction includes data from
another form, the transaction boundary must be extended to include the data on that form.
The following table outlines the relationship between two forms and the boundaries that exist
in each scenario. Transaction boundaries are defined through form interconnections and
business function interconnections. In the example below, the OK button on Form1 invokes
Form2. You can change the transaction boundaries by changing TP On and TP Off. The
table explains what happens when you define your transaction boundary in various ways.
Form2 X
439
Form2 Form1 operates in Auto Commit mode and Form2
X
operates in Manual Commit mode.
Master business functions should not define their own boundaries. You might require two or
more master business functions to create one logical transaction, so the calling application
should define the boundaries.
If your application calls several business functions, and you need to include the business
functions in the transaction boundary, you must enable transaction processing. If you need to
roll back database operations for the business function if a failure occurs, you must designate
Include in Transaction on the business function interconnect.
Note
When you use business functions within a transaction, you must be careful not to cause a
deadlock. If you split the logic for manipulating a table between two functions, you may cause
a deadlock if you include one function in the transaction but not the other. If you have a
business function that selects records for information and also updates or inserts data in
other tables, you might want to split apart the business function.
440
transaction on a server business function, the transactions for the business function roll back.
The servers and client must all commit the transaction, or the transaction rolls back on the
servers and client.
For example, suppose that you have two forms, FormA and FormB, and FormA has
transaction processing enabled and calls FormB with the Include in Parent option on for the
Post OK Button is Clicked event. Because FormB inherits the transaction boundaries for
FormA, if a user cancels on FormB, the following occurs: The entries for FormB will not be
written, control is returned to FormA, and the entries for FormA are written and committed. In
this situation, you can prevent commitment of the entries for FormA by using the Rollback
Transaction system function.
You can use the following system functions to define transaction boundaries in a batch
process:
• Fix/Inspect
• Header Detail
• Headerless Detail
Transaction processing is only available during OK processing for the following events:
• OK Button Clicked
• OK Post Button Clicked
• Add Record to DB - Before
• Add Record to DB - After
• Update Record to DB - Before
• Update Record to DB - After
• Add Grid Rec to DB - Before
• Add Grid Rec to DB - After
• All Grid Recs Added to DB
• Update Grid Rec to DB - Before
• Update Grid Rec to DB - After
• All Grid Recs Updated to DB
441
• Delete Grid Rec from DB - Before
• Delete Grid Rec from DB - After
• All Grid Recs Deleted from DB
If something occurs outside these events, it is not within the transaction boundary.
If a transaction includes a single form, then this is the only action that is required because the
form itself is the transaction boundary.
If the transaction includes data from another form, then you must extend the boundary to the
applicable form through a form interconnection.
You can also extend transaction boundaries using business functions or table I/O. See
Extending a Transaction Boundary.
442
► To extend the transaction boundary between forms
1. On Forms Design, on the parent form with which you are working, choose
Menu/Toolbar Exits from the Form menu.
3. From Event Rules Design, choose the Button Clicked event, and click the Form
Interconnect button.
443
4. On Work with Applications, choose the application that you want to use.
5. On Work with Forms, choose the form that you want to include in the transaction
boundary.
444
6. On Work with Versions, choose the version of the application that you want to use.
7. On Form Interconnect, click the following Transaction Processing option and click
OK:
• Include in Transaction
445
Extending a Transaction Boundary Using Business Functions
You can include a business function in a transaction boundary. If the parent form uses
automatic commit, the business function to which you extend the transaction boundary also
uses automatic commit. Any business function that is not marked as Include in Transaction
uses auto-commit. Business functions that process asynchronously can also be included in a
transaction.
1. On Forms Design, on the parent form with which you are working, choose
Menu/Toolbar Exits from the Form menu.
446
2. Choose the OK row and click the Event Rules button.
3. From Event Rules Design, choose the Button Clicked event, and click the Business
Functions button.
447
4. From Business Function Search, choose the business function that you want to
include in the transaction boundary.
448
Business Functions marked for both Asynchronous and Include in Transaction are included in
the transaction boundary.
1. On Forms Design, on the parent form with which you are working, choose
Menu/Toolbar Exits from the Form menu.
449
2. Choose the OK row and click the Event Rules button.
3. From Event Rules Design, choose the Button Clicked event, and click the Table I/O
button.
4. On Insert TableIO Operation, choose the Open option under Advanced Operations,
and then click Next.
5. On Data Source, click Advanced Options.
450
6. On Advanced Options, choose the Include in Transaction option, and then click OK.
7. On Data Source, click Finish.
• The Open operation appears in your event rules.
Refer to System Functions in the Online APIs for more information about using specific
system functions.
451
Then, use the Transaction Processing system functions to define the beginning and end of
your transactions. You can also extend your transaction boundaries to include business
functions and table I/O. Refer to the Online APIs for more information about these system
functions.
For each OneWorld workstation, you must enable transaction processing by changing
settings in the workstation jde.ini file. You should make these changes on the deployment
server to the resident jde.ini file that is delivered to workstations through package
deployment, and then deploy a package with the changed jde.ini file.
For release B73.3, the [TP MONITOR ENVIRONMENT] section has been removed from the
jde.ini and replaced with the [LOCK MANAGER] section. This new section contains three
settings in both the server and client jde.ini files.
Settings that used to be in the [TP MONITOR ENVIRONMENT] section were removed
because they were either obsolete or assigned an internal default value.
452
The following list provides the reasons that the settings in the [TP MONITOR
ENVIRONMENT] section were eliminated for release B73.3:
During a transition period, both sections will be supported concurrently. The following three
scenarios are possible during this transition period:
• The [LOCK MANAGER] section does not exist. In this scenario, OneWorld checks for
settings in the [TP MONITOR ENVIRONMENT] section.
• Both [LOCK MANAGER] and [TP MONITOR ENVIRONMENT] sections exist. In this
scenario, OneWorld uses the settings in the [LOCK MANAGER] section.
• Neither section exists. In this scenario, transaction processing cannot be started and
a failure occurs.
The first phase ensures that if any of the data sources fail to commit after the others have
committed, all databases can be returned to a consistent state by referring to the contents of
the logs. If all of the logs for each of the data sources are flushed successfully, then the
second phase begins.
In the second phase, the coordinator instructs each of the data sources to commit its
respective transaction. If any of the data sources fails to commit, a commit log report is
generated from the logs that were generated in phase one (this is written to the directory
specified in the LOGPATH in the jde.ini, which contains a list by data source of all the SQL
statements that were part of the transaction). The commit log also contains the details about
which data sources passed and which ones did not.
The log can help the database administrator to manually synchronize the data sources so
that they are all in a consistent state. The commit log report is generated only when at least
one data source fails to commit. If all data sources successfully commit, then no commit log
report is generated, and all the logs from phase one are deleted by the Log Manager.
453
Since B73.3, the log file appears in the directory specified in the jde.ini [INSTALL] section.
If you are using a release of OneWorld prior to B73.3, enter settings for the [TP MONITOR
ENVIRONMENT] section. If you are using release B73.3 or higher, enter settings for the
[LOCK MANAGER] section.
Note
The following settings are applicable to the Lock Manager:
• Server
• RequestedService
• AvailableService
The remainder of the settings relate to transaction processing.
The following tasks describe how to enter settings for the [TP MONITOR ENVIRONMENT]
section of the jde.ini file, both for the server and for the workstation. These settings take
effect only if you are using a OneWorld release prior to B73.3.
Status=status value
LogPath=log path
Server=server name
ServerTimeout=timeout value
AvailableService=service value
RegistryCleanupInterval=cleanup value
RegistryRecordLifeSpan=lifespan value
LogServices=service value
454
See the following table for explanations of the variables in the jde.ini file.
Setting Value
Status This setting indicates whether transaction processing is on or off. The transaction
processing monitor typically should be on unless you are not using transaction
processing in any of your applications, or if you want to temporarily disable
transaction processing, such as for testing. Valid values are ON and OFF. As of
B73.2, transaction processing cannot be turned off, so this value is ignored in
versions B73.2 and higher.
LogPath This setting specifies the directory in which the transaction logs are placed. This path
should correspond to the location of your jde.log and jdedebug.log.
For example, on a UNIX machine, the path might be:
/u10/owdevel/tc283984/b73.2
For more information about logging, see Understanding Transaction Processing
Logging.
LogStatements This setting specifies whether the transaction monitor should keep a log of every
operation performed within a transaction. Valid values are ON and OFF.
LogBufferSize This setting indicates the number of bytes set aside to hold the operations being
logged in memory before they are copied to disk. This value is a OneWorld internal
default value and should not be changed.
RequestedService This setting specifies the service that the client requests from the server. Valid values
are:
• TS: Time stamp service is requested
• NONE: No service is requested
Server This setting specifies the server that is hosting the TMS. For example, a server name
might be intelnta.
ServerTimeout This setting indicates the timeout in seconds for all of the network operations. This
value can be adjusted based on the network traffic. It is necessary for the workstation
jde.ini file. It is also necessary for the server jde.ini file in case a batch job is running
on the server. This value is a OneWorld internal default value and should not be
changed.
AvailableService This setting indicates the service that this Transaction Management Server is offering.
When the Transaction Manager on the workstation is initialized, it queries the TMS for
this value. This is called TM-TMS handshaking. If this value is the same as the one
that the workstation has in its jde.ini file, then that service will be invoked at the
appropriate times when OneWorld is running. Valid values are:
• TS: Record Change Detector (Timestamp Service)
• LM: Lock Management Service
• ALL: Both TS and LM services
• NONE: No service is available
RegistryCleanup This setting specifies the period after which all the expired records are deleted from
Interval the TMS record registry. This interval is specified in minutes. This value is a
OneWorld internal default value and should not be changed.
455
RegistryRecordLife This setting specifies the maximum period during which a record can exist in the TMS
Span record registry. After this period, the record expires and is deleted. This life span is
specified in minutes. This value is a OneWorld internal default value and should not
be changed.
s This setting turns on the Trace Log for TMS, and supplements the Jde.log file. Valid
values are:
1: Tracing for TMS is On
0: Tracing for TMS is OFF
The default value for this setting is 0. You should turn on tracing for TMS only after
you have exhausted all other debugging methods.
2. Locate the jde.ini file that will be sent to the workstation as part of a package
installation. This file is located on the OneWorld deployment server in the following
release share path:
\\Bxxx\CLIENT\MISC\jde.ini
where xxx is the installed release level of OneWorld, such as B732.
3. Using an ASCII editor such as Notepad, view the jde.ini file to ensure accuracy of the
following settings:
LogPath=log path
RequestedService=service value
Server=server name
ServerTimeout=timeout value
See the following table for explanations of the variables in the jde.ini.
Setting Value
Status This setting indicates whether transaction processing is on or off. The transaction
processing monitor typically should be on unless you are not using transaction
processing in any of your applications, or if you want to temporarily disable transaction
processing, such as for testing. Valid values are ON and OFF. As of B73.2, transaction
processing cannot be turned off, so this value is ignored in versions B73.2 and higher.
456
LogPath This setting specifies the directory in which the transaction logs are placed. This path
should correspond to the location of your jde.log and jdedebug.log.
For example, on a UNIX machine, the path might be:
/u10/owdevel/tc283984/b73.2
For more information about logging, see Understanding Transaction Processing
Logging.
LogStatements This setting specifies whether the transaction monitor should keep a log of every
operation performed within a transaction. Valid values are ON and OFF.
LogBufferSize This setting indicates the number of bytes that are reserved for the operations that are
logged in memory before they are copied to disk. This value is a OneWorld internal
default value and should not be changed.
RequestedService This setting specifies the service that the client requests from the server. Valid values
are:
• TS: Time stamp service is requested
• NONE: No service is requested
Server This setting specifies the server that is hosting the TMS. For example, a server name
might be intelnta.
ServerTimeout This setting indicates the timeout in seconds for all of the network operations. This
value can be adjusted based on the network traffic. It is necessary for the workstation
jde.ini file. It is also necessary for the server jde.ini file in case a batch job is running on
the server. This value is a OneWorld internal default value and should not be changed.
The last three lines of the section pertain to record change detection and must be set if you
want the workstation to perform record is changed database locking.
Note
Instead of deploying a package, you can manually copy the jde.ini file to all workstations.
The following tasks describe how to enter settings for the [LOCK MANAGER] section of the
jde.ini file, both for the server and for the workstation. These settings will be used even if you
entered values for the [TP MONITOR ENVIRONMENT] section.
[LOCK MANAGER]
Server=server name
AvailableService=available server service
RequestedService=client service request
457
See the following table for explanations of the variables.
Setting Value
Server This setting specifies the lock manager server to be used to process records. The
value for this setting is the name of the server acting as the lock manager. For
example, a server name might be intelnta.
If the client is used as a server, such as in cases where batch applications are running
on the workstation, this setting must match the same entry in the [LOCK MANAGER]
section of the jde.ini file on the workstation.
AvailableService This setting indicates the available service of the server. Valid values are:
• TS: Time stamp service is available
• NONE: No service is available
This setting applies only to servers.
RequestedService This setting indicates the type of service that the client requests from the server. Valid
values are:
• TS: Time stamp service is requested
• NONE: No service is requested
Caution
Enable transaction processing on the server before you enable it on the workstation. If you try
to set up the workstation jde.ini file before you set up the server jde.ini, you could be
requesting a service on the server that is not yet available, which generates an error.
[LOCK MANAGER]
Server=server name
RequestedService=client service request
See the following table for explanations of the variables.
Setting Value
Server This setting specifies the lock manager server to be used to process records. The
value for this setting is the name of the server acting as the lock manager. For
example, a server name might be intelnta.
If the client is used as a server, such as in cases where batch applications are running
on the workstation, this setting must match the same entry in the [LOCK MANAGER]
section of the jde.ini file on the workstation.
RequestedService This setting indicates the type of service that the client requests from the server. Valid
values are:
• TS: Time stamp service is requested
• NONE: No service is requested
458
Configuring jde.ini Files for Transaction Processing
[JDENET_KERNEL_DEF5]
dispatchDLLName=libtransmon.sl
dispatchDLLFunction=TM_DispatchTransactionManager
maxNumberOfProcesses=1
beginningMsgTypeRange=601
endingMsgTypeRange=650
newProcessThresholdRequests=0
Status=OFF
LogPath=/u10/owdevel/tc283984/b73.1
LogStatements=NO
LogBufferSize=1000
AvailableService=TS
Server=hp9000b
ServerTimeout=60
RegistryCleanupInterval=1
RegistryRecordLifeSpan=1
AvailableService=TS
Server=hp9000b
ServerTimeout=60
RegistryCleanupInterval=1
RegistryRecordLifeSpan=1
Status=OFF
LogPath=\b7\data
LogStatements=NO
LogBufferSize=1000
459
RequestedService=TS
Server=hp9000b
ServerTimeout=60
Record Locking
OneWorld does not implement any data-locking techniques. It relies on the native locking
strategy of the vendor database management system. This process improves performance
by reducing duplication of efforts.
In some specific situations, the vendor database does not automatically lock as needed. In
these situations, you can use explicit instructions to OneWorld to control data-locking. For
example, you can use record locking to ensure the integrity of the Next Numbers facility.
• Optimistic Locking
You can use optimistic locking (sometimes referred to as record change detection) to
prevent a user from updating a record if it has changed between the time the user
inquired on the record and when he or she updates the record.
• Pessimistic Locking
You can use pessimistic locking to prevent attempts to update the same record at the
same time. The record is locked before it is updated.
Optimistic Locking
You can turn on record change detection within the workstation jde.ini file. This type of
database locking prevents a user from updating a record that changes during the time the
user is inquiring about it. If the record has changed, the user must select the record again
and then make the change. This feature is available for business functions, table I/O, and
named event rules.
For example, suppose two users are working within the Address Book application The
following table illustrates record change detection:
Time Action
10:00 User A selects Address Book record 1001 to inspect it.
10:10 User B updates a field in Address Book record 1001 and clicks OK.
OneWorld updates Address Book record 1001 with information that User B entered.
10:15 User A updates a field in Address Book record 1001 and clicks OK.
OneWorld does not update Address Book record 1001, and the system displays a message
460
informing User A that the record has changed during the time that User A was viewing it. For User A
to change the record, User A must reselect it and then perform the update.
When record change detection occurs, OneWorld displays a message that indicates that the
record has been changed since it was retrieved.
Pessimistic Locking
Pessimistic locking is sometimes referred to as simply record locking. You can use record
locking to prevent multiple users or applications from trying to update the same record at the
same time. For example, suppose a user enters a transaction that uses Next Numbers. When
the user clicks OK, the Next Number function selects the appropriate Next Number record,
verifies that this number is not already in the transaction file, and then updates the Next
Number record by incrementing the number. If another process tries to access the same Next
Number record before the first process has successfully updated the record, the Next
Number function waits until the record is unlocked, and then completes the second process.
Record locking in OneWorld is implemented by calling published JDEBase APIs. When you
use record locking, you should consider the time required to select and update a record
because the record is locked until the update is complete. Transaction processing uses a
special set of locking APIs. A locked record might or might not be part of a transaction.
Record locking APIs are independent of the transaction and its boundaries. They always lock,
regardless of whether you are in manual or auto commit mode.
Records that are updated using record locking APIs (such as JDB_FetchForUpdate or
JDB_UpdateCurrent) within a transaction boundary are locked from the time the record is
selected for update until the commit or rollback occurs. Records within the transaction
boundary that are updated without using record locking APIs are locked from the time of the
update until the commit or rollback occurs. This is also true if you use a business function to
define and activate transaction processing.
Currency
Enterprises that do business internationally have additional accounting needs and added
complexity. This complexity arises from doing business in different currencies and having to
follow different reporting and accounting requirements. Some fundamental requirements for
an international enterprise include:
461
• Revaluation of currencies due to changes in exchange rates
• Currency retrieval is done through database triggers and table event rules.
• Currency retrieval logic is handled in Business Functions.
• System APIs assist you in accessing cached tables.
Advantages
OneWorld allows you, the developer, to control currency retrieval. Allowing you, instead of
the system, to control currency, provides greater flexibility and easier maintenance. Some of
the advantages in allowing you to control currency are:
• Additional currency tables do not require changes to system modules. Only new
business functions need to be added.
• Business logic is captured in business functions, rather than in a system module that
assumes knowledge of business logic.
• Table event rules allow you to attach currency retrieval logic at the table object level.
• Table event rules are triggered by table events instead of application events.
• Any applications that use the table that has currency business functions attached to it
receives the same logic, so you do not need to modify each application.
• No hard-coded logic is embedded in the runtime engine.
462
Understanding the Build Triggers Option
The Build Triggers option performs the following steps:
For example, if you are working with table Accounts Payable Ledger table (F0411),
the Build Triggers option creates a C source member called F0411.c. You can
browse through the C code and ensure that all of the parameters are set up correctly.
The system generates an error log if an error occurs during the ER-to-C conversion.
The error table is called eF0411.log.
• Compiles the new functions and adds them to JDBTRIG.DLL. This is the
Consolidated DLL that contains TER functions.
Table triggers for currency run after the record is fetched and before the record is added to
the database.
Currency Conversion
463
On FETCH: On ADD/UPDATE:
1. Application requests data 1. Application sends data
4. Currency Trigger calls TER, The TER 4. Currency Trigger calls TER
When passing Math_Numeric currency fields into a business function, the currency values in
the respective data structure must be populated. Math_Numeric work fields that contain
currency values also need the proper currency information.
You can copy currency information to controls (work fields or others) in event rules by using
the system function Copy Currency Info. You can call the currency triggers from within an
application's event rules or from another business function.
464
2. Click General Accounting Constants.
Y Turn on multicurrency and use multipliers to convert currency. The system multiplies the foreign amount
by the exchange rate to calculate the domestic amount.
Z Turn multicurrency on and use divisors to convert currency. The system divides the foreign amount by
the exchange rate to calculate the domestic amount.
The currency conversion flag is stored in Company Constant table (F0010) in the CRYR field
for Company 00000.
You can set the Multi-Currency Conversion option to N so that currency conversion does not
occur in JDB and the runtime engine.
1. On Forms Design, double-click the control that you want to appear on the form.
2. Click Options.
3. If you want to display currency fields, verify that the No Display if Currency is Off
option is turned off.
When currency is off, currency-sensitive controls do not appear. If this option is
turned off, currency fields are visible.
You must exit your current OneWorld session and re-enter in order to apply currency
conversion changes.
466
a currency conversion trigger, the system has no way to determine where the decimal should
be within a field.
1. From Object Management Workbench, check out the table to which you want to
attach event rules.
2. Ensure that the table is highlighted, and then click the Design button in the center
column.
3. On Table Design, click the Design Tools tab and then click Start Table Trigger
Design Aid.
4. On Event Rules Design, choose the Currency Conversion event and attach the
currency trigger that you want to use.
5. Click the Business Functions button.
The Business Function Search form appears.
467
Use the QBE line to quickly search for selected business functions. You can use
Category CUR or System Code 11 to find existing currency business functions. To
read notes that describe the purpose of the business function, its parameters, and
program requirements, click the Attachments button.
6. Choose the business function with which you want to work, and then click Select.
468
7. On Business Functions, attach the table columns to the business function structure,
and then click OK.
The available objects that appear are for table column only.
9. On Table Design, click the Table Operations tab, and then click Generate Table.
10. Choose the data source for the table, and then click OK.
11. On Table Design, click the Design Tools tab, and then click Build Table Triggers.
The system creates the table event rule. The newly-created or modified table event rule
functions are now called from the database APIs whenever the corresponding event occurs
against the table.
469
Menu Design
Use the Menu Design program (P0082) to create, change, delete, copy, and filter menus and
menu selections. Menu Design assists you in the following:
Understanding Menus
A menu is the entry point for running reports and applications. The Menu Master table
(F0082) stores the following information, which identifies and characterizes the menu:
470
Menu Filtering
OneWorld automatically filters menus based on your user ID so that only menu selections
that apply to your job appear on your workstation. This feature allows you to maintain one set
of menus (one database) with hundreds of menu selections, but you see only those menus
that apply to your job.
• Menu selections that you or other users do not have authority to access - for
example, Employee Information in Workforce Management.
• Menu selections that are country-specific to countries that do not apply to you. If the
country code in your user profile matches the country code for that menu, then the
selection appears. For example, menu selections that pertain only to Canadian users,
such as Canadian tax-related selections, appear only to Canadian users.
• WorldVision menu selections that are not installed on your workstation. For example,
if WorldVision (the J.D. Edwards AS/400 product) is not installed on your workstation,
that selection does not appear on the menu. You can distinguish a WorldVision menu
selection from a OneWorld menu selection by reviewing the job to execute number. A
WorldVision job to execute number begins with J, such as J3413.
Menu Master (F0082) Defines all menus, but not the menu selections.
Menu Selection Contains the type of selection to be executed, selection consequences, and
(F00821) version information.
471
3. On Menu Header Revisions, complete the following fields:
• Menu Identification
• Menu Title
• Product Code
• Menu Classification
• Level of Display
• Setup Menu
472
Printing a Menu Report
You can print a report that lists the menus. You can print menus only or menus and menu
selections. To print a menu report, choose Menu Print from the Form menu.
473
R0082P J.D. Edwards & Company 4/25/00 13:33:23
___Menu______________________Description_________________SY__LOD___Class_
DEMO APPLICATIONS 00
_______________________________________________________Execute__________Name___
_____________________Ovrd__ Message
0 APPLICATIONS 1
474
Working with Menu Selections
Work With Menu Selections displays available selections for the selected menu.
After naming a menu selection, enter a selection type, which specifies the type of program
that is executed for the menu selection. You use OneWorld Application, OneWorld Report,
WorldVision, or Windows Application to execute a specific application, report, or program.
The Subheading selection type does not perform an action. You use it to logically group
menu selections on the menu. Subheading selections appear on the menu only in Web view.
You use the Menu selection type to call another menu.
Note
When you delete a menu, you also delete any menu selections available on that menu. The
applications called by the menu selections are not deleted, and you can access these
applications from other menus.
1. On Work With Menus, find and choose the menu that has a selection that you want to
name.
475
2. On Work With Menu Selections, click Add or choose an existing selection to change.
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
• Jargon
• Country Code
If the base language is a double-byte language, a Search Description field appears
below the Country Code field. Enter the single-byte search description to be used by
Menu Word Search. Menu Word Search uses only single-byte search descriptions.
1. Find and choose the menu for which you want to define a menu selection.
2. On Work With Menu Selections, choose an existing selection to define.
3. On Menu Selection Revisions, choose one of the following selection types:
• OneWorld Application
476
• OneWorld Report
• WorldVision
• Windows Application
• Subheading
• Menu
4. From the Form menu, choose Define.
A form that is specific to the selection type appears.
5. Define options for the selection type and then click OK.
You can use this procedure to add a menu selection for a OneWorld application that you
created in Forms Design.
1. Find and choose the menu for which you want to add a OneWorld application.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, complete the following required fields:
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
4. Click the OneWorld Application option, and choose Define from the Form menu.
477
5. On OneWorld Application, complete the following fields:
• Object Name
• Form Name
You can use this field to define a specific entry point for the OneWorld
application. If you leave this field blank, the first entry point for the program is
used.
• Option Code
• Version
• Application Type
6. From the form menu, choose Application to view and choose from a list of available
applications.
Likewise, from the Form menu, you can choose Versions to search for available
versions.
You can add a menu selection for a report that you created in the OneWorld Report Design
tool.
1. Find and choose the menu for which you want to add a OneWorld report selection.
2. On Work With Menu Selections, click Add.
478
3. On Menu Selection Revisions, complete the following required fields:
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
4. Click the OneWorld Report option, and choose Define from the Form menu.
5. On OneWorld Report, complete the following fields:
• Batch Application
• Versions
6. Select one of the following to specify the type of processing options that you want
users to have:
• Blind Execution
• Values
• Version
• Data Selection
Use Form menu options to view and choose from a list of reports and versions.
1. Find and choose the menu for which you want to add a WorldVision selection.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, complete the following required fields:
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
4. Click the WorldVision option, and choose Define from the Form menu.
479
5. On WorldVision, complete the following fields:
• Fast Path
• Run Minimized
You can add menu selections for any Windows application. For example, you can add
Windows programs such as Calendar, Clock, Note Pad, or Write.
1. Find and choose the menu for which you want to add a Windows application.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, complete the following required fields:
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
4. Click the Windows Application option, and choose Define from the Form menu.
480
5. On Windows Application, complete the following fields, or click the Browse button to
search for the Windows application:
• Command Line
Enter the executable of the Windows application that you want to add to the
OneWorld menu, such as winword.exe.
• Working Directory
Enter the path on your local computer in which the Windows application resides.
• Run Minimized
481
► To add or change Web addresses on OneWorld Explorer Help
1. On Work With Menus, type HELP in the Menu ID query-by-example field, and then
click Find.
The Web Access menu appears.
• Selection Number
• Selection Description
• Selection Consequences
If you chose an existing selection to change, the Selection Number field is disabled.
5. Click the Windows Application option, and choose Define from the Form menu.
6. On Windows Application, complete the following fields:
• Command Line
Enter the Web address that you want to add to the Help menu, such as
http://www.jdedwards.com.
• Working Directory
• Run Minimized
• You do not need to complete the Working Directory field because you are entering a Web
address.
1. Find and choose the menu for which you want to create a subheading.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, complete the following field:
• Selection Number
482
Linking Menus
You can add a menu selection that displays another menu.
1. Find and choose the menu for which you want to add a selection.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, click the Menu option.
4. From the Form menu, choose Define.
5. On Menu Execution, complete the following fields or click the visual assists to search
for menus:
• Menu to Execute
• Client Platform
483
Creating Fast Path Selections
You can quickly move among menus and applications by using fast path commands. A fast
path command is:
• An abbreviation that is either shipped with J.D. Edwards demo data or that you define
to suit your business environment. For example, the fast path OL takes you to the
application Object Librarian so that you can work with OneWorld objects.
• A combination of menu selection and menu number. For example 2/G01 (menu
selection number 2 on menu number G01) takes you to Work With Addresses in
Address Book. As you become more familiar with OneWorld menu abbreviations, you
might find fast path a quicker way to navigate to an application.
You can set up your own a fast path abbreviations to access frequently-used applications.
1. On Work With Menus, find and choose the menu that has a selection for which you
want to create a fast path.
2. On Work With Menu Selections, choose Fast Path Revs from the Form menu.
484
4. On User Defined Codes, click inside the grid, then press the Ctrl and End keys to
display the bottom of the grid.
5. To add a user defined code for a new fast path, complete the following required fields
in the last row of the grid:
• Codes
• Description 1
• Description 2
You enter the abbreviation for the fast path in the Code field. Enter the description of
the abbreviation, such as the name of the menu selection, in the Description 01 field.
Enter the selection number and menu number in the Description 02 field.
To determine the selection number for the fast path that you created (for example, selection
number 2 on menu G01), use Work With Menu Selections. Do not count the menu selections
in OneWorld Explorer because the menu might be filtered.
485
Copying a Menu Selection
You can copy an existing menu selection and attach it to another menu.
1. On Work With Menus, find and choose the menu that has a selection that you want to
copy.
2. On Work With Menu Selections, click Add.
3. On Menu Selection Revisions, enter the new selection number and choose Copy
from the Form menu.
1. On Work With Menus, find and choose the menu for which you want to change menu
text.
486
2. On Work With Menus, choose Header from the Row menu selection.
3. On Menu Header Revisions, from the Form menu, choose Title Overrides.
487
4. On Menu Text Overrides, enter the desired language code (such as S for Spanish)
and text description (such as the Spanish description of the menu selection) in the
following fields and then click OK:
• Language
• Menu Text
1. On Work With Menus, find and choose the menu for which you want to change the
selection text.
2. On Work With Menu Selections, choose the menu selection that you want to change
and click Select.
3. On Menu Selection Revisions, choose Text Overrides from the Form menu.
4. On Menu Text Overrides, complete the following fields and click OK:
• Language
• Menu Text
Changes in menu text do not appear until you close and reopen the changed menu.
You can also choose Refresh from the View menu to update the menu text.
1. On Work With Menus, find and choose the menu for which you want to change the
selection number.
2. On Work With Menu Selections, choose the menu selection that you want to change
and click Select.
3. On Menu Selection Revisions, choose Renumber from the Form menu.
488
4. Complete the following field, and click OK:
Tips of the day are sets of short, informational text that appear in a special form each time
that the user launches an application or accesses a form. Tips of the day appear sequentially,
so the user can browse through the tips. When the user closes the tip form, the system
records where in the tip sequence the user is and displays the next tip when the user
launches the object again.
J.D. Edwards provides tips of the day with many OneWorld applications. You can change
these tip sets or create your own.
You can associate tips with an application, a form, or an application version. The tips appear
in the order that you specify, and you can override a user's option to turn off the tip of the day
feature for the tip set.
After you have associated tips with an object, you can rearrange the tip order, add new tips,
or delete existing ones from the tip set.
489
Before You Begin
Create a data dictionary item with glossary text for each tip of the day. See Creating
a Data Item for detailed instructions about creating data dictionary items.
1. From the System Administration Tools menu (GH9011), double-click Tip of the Day.
2. On Work With Tip of the Day, click Find to see the objects to which tips have been
added.
To limit your search, enter an application name in the Application Name field.
A tree-style file structure appears on the left side of the form. Each object has its own
folder. Tips can be associated with applications, forms, or application versions.
Folder names include the application, form, and application version, in that order. For
example, RDA\\ indicates the RDA application alone. P0911\V0911I\ZJDE0001
indicates form V0911I in the ZJDE0001 version of application P0911.
490
3. To see the specific tips associated with an object, expand the folder for the object.
The data dictionary items associated with the object as tips appear in the file
structure.
491
5. To change the order of the tips or to add or delete tips for an object that already has
tips associated with it, double-click one of the tips under the object.
The Tips of the Day Revisions form appears.
Use this task to add tips to an application, form, or application version that does not already
have tips associated with it. To add tips to an existing tip set, double-click one of the existing
tips on the Work With Tip of the Day form to access the Tips of the Day Revisions form.
• Application Name
• Form Name
• Version
• Description
3. In the detail area, add a data dictionary item for each tip that you want to associate
with the application. Complete the following columns for each row:
• Tip Sequence
492
• Data Item
Note
You cannot add a data dictionary item to the tip set if it does not have glossary text.
4. When you finish adding data dictionary items to the application, click OK.
493
Messaging
Use J.D. Edwards messaging facilities to get pertinent information to the end user in the most
effective and user-friendly manner. When you design an application to use messaging, you
must evaluate what information is necessary for a user to accomplish a task. You can deliver
a message in real time, where the message is displayed on the status bar. The method you
use to provide information to the user depends on the situation:
• Use an interactive error message if there is an error during the entry of a record.
• Use an informational message sent to the Workflow Center if information needs to be
conveyed and action requested.
• Use an alert message if information is urgent and needs immediate attention.
• Use a batch error message if errors are detected while a report is running.
There are three parts to creating system-generated messages:
• The logic.
Has certain criteria been met so that a message should be sent? This will usually be
event rule logic.
Message Types
There are two main types of messages:
Within these message types you can use simple messages or text substitution messages.
Text substitution messages allow you to use variable text substitution. Substitution values are
inserted into the message for the appropriate variable at runtime. This gives the user a
customized message unique to every instance of the message.
494
Error Messages
Error messages are stored in the data dictionary. The data dictionary design tools can be
found on menu GH951.
Workflow Messages
When designing an application to use messaging, you must evaluate what information needs
to be used to decide whether a message needs to be created.
For example, if a voucher is created for $20,000 for capitalized equipment and the accounting
department decides that the controller must be notified of any vouchers entered for greater
than $10,000, the information needed to create a message from voucher entry would be "who
is the controller," and "what are the keys to voucher entry." At this point, you need to
determine what type of J.D. Edwards message would be appropriate and call that type of
message within Event Rules. See Enterprise Workflow Management for more information
about creating complete workflow processes using workflow messages.
Level Messages
Level messages are used to categorize error messages into the proper level break within a
report. They are like a container for messages. Level messages can be thought of as titles,
such as "Here are your batch errors" or "Here are the document errors," and so on. Level
messages are used to separate every logical grouping of error messages. Messages that
begin with "LM" are level messages. Level messages that belong to glossary group "Y,"
indicate that they are workflow messages.
Information Messages
Messages that are not level messages ("LM") but are in glossary group "Y" are considered
informational messages (these may also include action messages). These messages supply
pertinent information to the user and usually require action be taken.
Event-Driven Model
Interactive messages display whenever a specific event occurs. This means that errors clear,
set and display based on certain events. When an error occurs on an event, the event then
runs again to clear the error.
For example, suppose the user types an incorrect value in a field. An error is set when the
Control is Exited event is run (if you have logic on this event or a high level trigger is causing
validation of the field). The user receives notification of the error through a visual cue (the
field in error turns red). In addition, the status bar displays information about the error. To find
out details about why the error occurred and how to correct it, the user can press the F8
function key. You can use the F7 function key to walk through the errors on a form if there are
two or more errors.
495
The only way for the user to correct the error is to go into the field again, type in the correct
value and leave the field. This causes the same Control is Exited event to be run again,
which clears the error and sets it again in case an incorrect value is entered again. If the
value typed in this time is correct, no error is set.
When a user enters data in a form field or grid cell and tabs out, the runtime engine edits the
value that was entered. If the edit fails, (such as a value is not found in the User Defined
Code table, or an invalid date has been entered), an error is issued with the appropriate error
code and the field is highlighted. The error message and message count are displayed on the
status bar.
When an error is issued, the handle is on the field. If the error is within a grid, then the
offending grid cell coordinates (row and column) are identified. OneWorld stores this
information in an Error_Ctrl_Key structure, along with the application form handle. At the time
the error is displayed, the color of the control is changed and the error information is
displayed from the error link list. If you use the system function Set Control Error or Set Grid
Cell Error, you can specify the field or cell to highlight.
Error Setting
Errors are set:
• Automatically
• Manually
• The item is a data dictionary item, for which an edit rule trigger has been defined in
the data dictionary. In this case, the field for the data item is validated across all
OneWorld applications. Data dictionary triggers can also be assigned or redefined
using overrides within the Forms Design tool. However, in this case the trigger for the
data item is specific to the the application where the override was defined.
• Validation is performed when the Control is Exited event, Column is Exited event, or
OK Button Processing occurs. You can use validation to check for things such as
invalid Data or invalid Dates.
You can use either a system function or a business function API to set other error messages.
System Function
You can use the following system functions for setting an error message:
497
Use one of the following business function APIs to set an error message without text
substitution:
jdeSetGBRError(lpBhvrCom,lpVoid,IDERRcRetainedEarningsLedger_3,”4524”);
idReturn = ER_ERROR;
The return code successful message has no influence on what happens next. It is used for
information.
Use one of the following business function APIs to set an error message with text
substitution:
• jdeErrorSet (lpBhvrCom, lpvoid, idItem, lpzError, lpDs) sets errors through business
functions using substitution text. It always gets called
• jdeSetGBRErrorSubText
JdeSetGBRError and jdeSetGBRErrorSubText work the same except that
jdeSetGBRErrorSubText has an additional parameter in which you pass the address of the
data structure that holds the information you want substituted in.
/**************************************************************************
* Declare structures
**************************************************************************/
DSDE0018 dsDE0018;.
.
.
/**************************************************************************
* Main Processing
**************************************************************************/
sizeof(dsDE0018.szAccountID));
if (idReturn != ER_SUCCESS)
jdeSetGBRErrorSubText(lpBhvrCom, lpVoid,
IDERRszAccountID_1, ”044E”, &dsDE0018);
JDB_CloseTable(hRequestF0901);
JDB_FreeBhvr(hUser);
498
return ER_ERROR;
In this example, DSDE0018 is the data structure for the error messages and is declared in
jdeapper.h. Jdeapper.h is where all of the data structures are declared for text substituted
error messages used by J.D. Edwards. Non-J.D. Edwards substituted error messages should
be defined in their own global declaration header file or in the function's header file that is
using the structure. The line IDERRszAccountID_1 in this example contains the values to
substitute.
A business function may call a validation routine (jdeddValidation), which when called may
set an error if the field in question is invalid.
To use text substitution error messages in C business functions, you create an instance of a
data structure in the global header file for every custom business function. If the error data
structure exists, it should exist in jdeapperr.h
Resetting Errors
The system will reset errors on the OK button or on the Find button. This occurs on both
manual and automatic errors.
The system resets errors when the OK button is clicked on a Header Detail form or a
Headerless Detail form. The following actions occur:
1. Setup Error_Event_Key structure with event Button Clicked, the Control Handle
is the OK button
499
5. Perform event rule on Button Clicked
Note
Do not try to validate and set errors on any grid control field for the Button Clicked event on
the OK button. The Button Clicked event will not process all the grid rows.
The system resets errors on the Find button. It performs the following steps:
• Button Clicked
• Last grid record has been read.
• Form Record is Fetched
• Grid Record is Fetched
• Confirm Delete - Before
• Confirm Delete - After
4. Perform event rule on Button Click
When you use jdeCallObject (the standard API for calling other business functions from
within a business function) for the second business function call, the sixth parameter is for
500
error mapping. Each business function has its own header and definition. You need to know
why you are calling the second level business function. For example, suppose you are calling
a second level business function to validate the company number. You must have the
company number ID in the first business function header so you can find out the company
number ID in the second business function.
1. Open the header file for the called business function and determine the maximum
number of possible mapping fields.
Calling Function's Header File Called Function's Header File
#define IDERRszComputerid_1 1L #define IDERRcHeader_1 1L
2. Create an Error map section in the C file for the calling business function.
In the following example of an active error message, you need to map one field
(IDERRCompany_4).
/***************************************************
* Business Function: B1234
*
*
* Parameters:
* LPBHVRCOM
* LPVOID
* LPDS1234
**************************************************/
/***************************************************
* Error Mapping Section
*
* Map to function ”ValidateCompanyNumber”
* #define N1234 1
***************************************************/
The number 1234 is the data structure number of the called business function. The
number 1 is the number of mapped fields.
Before each #define statement, include a comment that refers to the business
function name for which this number will be used.
501
In the variable section, create a cm_xxx map array for each function that needs to
return errors.
For example:
/**************************************************
* Variable declarations
**************************************************/
CALLMAP cm_1234[N1234]={{IDERRCompany_2,IDERRCompany_4}};
The array is mapped from IDERRCompany_2 to IDERRCompany_4.
OneWorld uses the data dictionary glossary to display messages. The message is contained
within the glossary portion of a data item. By leveraging the existing framework of the data
dictionary, you do not have to create a messaging system from scratch.
1. On Work with Data Dictionary Items, choose Glossary Data Item from the Form
menu.
502
2. On Work with Glossary Items, choose the message that you want to use.
503
Creating a Simple Error Message
Simple error messages (static messages) contain literal text, for example, "Enter a valid
date." Simple error messages do not use text substitution.
You can create a new data item or select an existing item to display a message.
Before the error message has functionality, you must connect it to a form control using event
rule logic.
504
2. On Glossary Items, click the Item Specifications tab, and then complete the following
fields:
• Glossary Group
• Product Code
• Description
• Error Level
For example, suppose a user enters an invalid search type in a field. The error message
"Search type xx is not contained in the 00 ST table" appears. The xx in the message will be
replaced by the search type the user entered.
If you want to use text substitution error messages in batch processes, you must create a
business function to pass values to the data dictionary data structure. The event rule engine
(set user error) will not pass values to the text substituted error message.
505
Adding an Interactive Message Data Item
You can create a new data item or select an existing item to display a message. This
example creates an error message in the Data Dictionary for error ID 018A.
Before the error message has functionality, you must connect it using event rule logic.
1. On Work with Data Dictionary Items, choose Glossary Data Item from the Form
menu.
506
2. On Work with Glossary Items, click Add.
507
3. On Glossary Items, click the Item Specifications tab, and then complete the following
fields:
• Glossary Group
• Product Code
• Description
• Error Level
When you type the description, use & followed by a number for each subset variable.
In this example, the short description is &2 not found in User Defined Code
&3 &4.
Now you are ready to define the glossary text to display at runtime.
After you add an interactive message data item, you must add a glossary for that item.
2. Type the text of your message. Use &x to assign variables in the text. These
variables correspond to members in a data structure. Put a period with no blank
spaces at the end of your glossary so that you do not have any repetition problems.
508
The order of the data structure is the index of the &x. If the structure contains four
members, assign &1 to the first member, &2 to the second, and so on. For example:
Description = &1
System = &3
Type = &4
Each text substitution error message requires a corresponding data structure. If the data
structure does not already exist, then you must create it. Make sure the members in your
message match the members in your data structure. See Data Structures.
509
3. On Object Search, locate the data structure and click OK.
510
2. Select the system function that you want to use.
511
4. Choose <Literal> for the Error Code Value in Parameters.
Use the number of the data dictionary item that contains the error message that you
want to appear for the literal value.
512
Working with the Send Message System Function
The Send Message API involves the following tables:
513
The following table lists the parameters and their functions for the Send Message system
function.
Mailbox The Mailbox to which the message The two-character field YES
should be delivered, for example, associated with a Mailbox,
"Personal in Basket" which is found in UDC 02/MB.
*Text The main body of the message. The message that will be sent, NO
or Blank if a message template
will be used. "None" should be
selected if a message
template is used.
Active This indicates whether there When this item is selected the NO
should be a connection between user will be prompted through
the message being sent and the form interconnect process.
another form.
DDMessage The Message Template from the Any valid data dictionary item NO
data dictionary. whose glossary can be used for
a message.
If the Subject and Text fields are used in conjunction with the DDMessage field, then the
DDMessage (MessageTemplate) will be concatenated with the Subject and Text fields.
The following task illustrates how to use the send message system function.
1. On Object Management Workbench, check out the table with which you want to
work.
2. Ensure that the table is highlighted and then click the Design button in the center
column.
3. On Table Design, click the Design Tools tab and then click Start Table Trigger
Design Aid.
514
4. Click System Functions.
515
This field typically uses an address book number. You can also use an e-mail
address here.
516
7. Click the data item called Active, and then choose Define Active Message to begin
the form interconnection process.
The active message portion of the message works like form interconnections from
event rules.
517
Work with Applications appears.
518
3. Choose the form with which you want to work.
519
4. Choose the version with which you want to work.
The Processing Options form might appear if processing options are attached to the
form.
The Form Interconnections form appears, on which you can assign all of the values
to be passed.
520
5. Designate the values that you want to pass.
521
The system prompts you to select a message.
7. Enter the appropriate alias in the Dictionary Item field and click Find.
The substitution points are numbered &1, &2, and so on. The parameter numbers
correspond to the substitution numbers. Substitution variables can appear in both the
description and the glossary of the message.
522
8. Map the appropriate objects to the substitution parameters so that the message is
complete.
The error message system gives end users a consistent interface to review errors when
working with OneWorld batch programs. When a batch program has finished processing all
messages regarding the success or failure of the job, a message is sent to the end user
using the Work Center. To make these messages useable, a tree (or parent/child) structure is
used to group related messages. To provide additional flexibility and functionality, you can
use text substitution, and you can make a message "active," meaning that the user can open
a form by clicking on the message.
523
Level-Break Messages
A level-break message is a message you can create that acts as a container for other error
messages that are produced by the batch process. Level-break messages can be action
messages, which contain a shortcut to an application and require action on the part of the
user, or nonaction messages, which can be messages that instruct the user to review some
information.
Understanding the role of a level-break message requires taking a closer look at how errors
are created in batch jobs. Most errors are created by edits that occur at level breaks in the
entire batch process. It is at these different level breaks that you want to group together any
errors that may have occurred. The mechanism that groups these errors together is the level-
break message. This implies that each reporting program that uses the Work Center
application program interface (API) to manage errors will need to create one level-break
message for each phase of level-break.
The following examples show the how messages might appear when an out-of-balance
journal entry upload has completed.
See Also
Understanding Level Breaks in the Enterprise Report Writing documentation for more
information about level breaks within sections.
First-Level Messages
First-level messages appear when users open their personal in baskets. The plus symbol
next to the message indicates that there are additional levels beneath it. First-level messages
might show the name of the batch job, explain that it completed with errors, and instruct the
user to review the detail of the errors.
524
Second-Level Messages
Second-level messages appear when the user double-clicks the plus sign next to the first-
level message. In this example, the second-level messages informs the user the batch
number that needs to be reviewed.
Third-Level Messages
Third-level messages appear when the user double-clicks the plus sign next to the second-
level message. In this example, the third-level message instructs the user that the batch job
completed with errors because it was out of balance, and then offers several solutions that
will fix the problem.
525
Text Substitution Error Messages
Any error messages that you write need to be as informative to the user as possible. You can
accomplish this through text substitution, which allows the system to embed variable text
(such as dates, amounts, and so on) into a message that will be substituted at run time. You
set up text substitution messages using the data dictionary, which helps ensure consistency
of jargon and terms used. For example, the message "Voucher Batch 2453 contains errors,"
uses the value 2453 as a parameter to the message. This value is substituted at runtime, and
the rest of the information from the message is kept in the data dictionary error glossary. This
message is only the short description in the data dictionary. When you open the message,
the complete data dictionary glossary with text substitution appears.
See Also
Creating a Text Substitution Error Message in the Error Handling section of this guide
for procedures on creating interactive and batch message data items, defining the
glossary text for a run time message, and creating a new data structure for the
message.
Action Messages
After a user reviews errors and decides what needs to be fixed, the user usually need to go to
a revision program to fix the errors. The Work Center allows you to set up level-break
messages that will give the user the ability to fix the errors by calling the corresponding
revision program directly from the Work Center. The term "action message" refers to the
ability to call a OneWorld application and to pass the variables needed to that application. For
example, the user would be able to automatically load the OneWorld Voucher Revision form
526
with the record in error by clicking a shortcut within the error message. It is up to you to call
the appropriate application and pass the correct values to that application. Note that in some
cases it may not make sense to call a particular program for a given level. Action messages
are highlighted in the grid to differentiate them from nonaction messages.
All individual messages are level-break messages except for the final error messages. The
Work Center API creates and manages Job Completed level-break messages, but you create
all other messages. The level-break messages are not error messages. They are packaging
or categorizing messages that you set up to communicate to the user information about in
which batch, document, line, and so on the error occurred. You set these messages using the
jdeSetGBRError or the jdeSetGBRErrorSubText function.
In this example, "Job R89004 ZJDE0001.c" and "Batch 3230 G in Error" are level break
messages. "Job R89004 ZJDE0001.c" is a level one message that is automatically generated
by the system and "Batch 3230 G in Error" is a level two message. "AA 20050606 3031" and
"Intercompany Out of Balance" are actual error messages.
The level-break message consists of two distinct pieces. The first piece of a level-break
message is the text for the message, and the second indicates whether the message will be
an action message.
All level-break messages contain the text piece, but they might not all be enabled as action
messages. The decision to enable the action message piece of the level-break message is
left to the report designer.
527
You use appropriate level breaks within your design to group related messages. It is at these
level breaks that the Work Center API should be called. Usually a level break should be set
up any time a record is no longer processed and a new record is about to be read. This
concept is consistent even if the report has several nested record breaks.
The timing of the calls to the Work Center API is critical. Most likely the reporting program will
start by editing the header-level record, which will lead to a set of detail records. The detail
records are the first to be read and processed. Thus the calls to the Work Center API will
most likely be sending level-break numbers in descending level-break order.
For example, the actual series of level-break calls to the API might look like this:
4,4,4,3,4,4,3,2,4,4,3,2,1.
This series shows that the call structure started four levels down. The first call at level 4
would let the Work Center API find any messages that have occurred at that time and create
child messages using the level 4 message as the parent. Note that if no errors occurred, then
no messages would have been created. This call sequence example shows that the API was
called at a level 3 after three calls to level 4. When the call to level 3 is made, the Work
Center API remembers if any level 4 messages have been written or not. In other words, if no
errors occurred when any of the level 4 calls were made, then the Work Center API will not
create the level 3 message. If there was at least one error at any of the level 4 calls, the level
3 and the level 2 message will be created.
You must call the Work Center API at every level. As explained earlier, the Work Center error
messages are created based on a parent/child structure. Therefore, if a level call is skipped,
the API has no way to group the child messages and child levels already created.
For example, the following level call structure is valid: 6, 6, 5, 4, 3, 4, 4, 3, 2, 1. The call
sequence 6, 6, 4, 3, 4, 4, 3, 2, 1 is invalid because when level 6 is called, there is no call to
level 5.
The Work Center API must be called with a level 1 when the reporting job is about to
complete. Hence, level 1 is the parent to all errors and level-break messages and issues the
"job completed" message. The level 1 call to the Work Center API is essential. A level 1 call
to the API will not only ensure that no orphan Work Center records are created, but will also
clean up all allocated storage used by the Work Center system. The level 1 call to the API
should only occur once in the report. Generally it is done in the End Section event of the
primary section of the report.
528
You create level-break messages by creating data dictionary items, error data structures,
business function error structures, and business functions. For additional information about
these topics, refer to the related sections in this guide.
1. To search through the list of existing level-break messages, use Work with Data
Dictionary Items.
For every level-break message created, there is a data dictionary item and at least
one business function created to reference that item. To find out what level-break
messages already exist, use query in the Object Management Workbench (OMW) to
locate all business functions (BSFN) that start with the first three letters, BLM.
529
The BLM naming convention refers specifically to business functions for level-break
messages that J.D. Edwards creates. J.D. Edwards recommends that you use the
following criteria to name your own business functions for level-break messages:
BLMxxyy, where xx refers to the system code you are using (between 50 and 55) and
yy is a unique number. This unique number should be carried forward to other items.
The maximum number of characters is eight.
Note
Use the Description field to help you decide which existing messages might work in
your report.
If you find several business functions for level-break messages that seem to fit your
report design, write them down and verify the text on the data dictionary item itself,
using the data dictionary to inquire on data items that begin with LM and are followed
by the same numbers that followed the corresponding BLM function name.
530
The LM naming convention refers specifically to level-break messages with text
substitutions that are created by J.D. Edwards. These are glossary group Y. J.D.
Edwards recommends that you name your own level-break message with text
substitutions using the following criteria: Lxxyy, where xx refers to the system code
you are using (between 50 and 55) and the yy is a unique number. The maximum
number of characters is eight.
For example, if business function BLM0025 is a level-break message for which you
want to see the description, inquire on data item LM0025.
2. If the text description meets your criteria, verify any substituted variables that the
level-break message uses.
If the text in the LM message contains substituted variables (such as &1), you need
to verify the data items of the data structure used by the level-break message. When
you verify the data structure, it is important that data items in the structure are the
exact data items that you will be passing in your report.
To verify that the data item is in the data structure, use the OMW and inquire on data
structure DELM followed by the same numbers that you used before.
531
The DELM naming convention refers specifically to level-break message data
structures that J.D. Edwards created. J.D. Edwards recommends that you name your
own level-break messages using the following criteria: DELMxxyy, where xx refers to
the system code you are using (between 50 and 55) and yy is a unique number. This
unique number should be the same number that you used previously. The maximum
number of characters is eight.
For example, DELM0025 would be the data structure created for the text substitution
of level-break message LM0025. You might need to check out the structure to view
individual fields.
To create the data structure, use OMW. The name should use the same unique number that
was used when creating the Lxx data dictionary item. This number is to be appended to
DELxx. For example, level-break message L55025 would use DEL55025 as the name of the
data structure.
You will also need to create a typedef for this data structure. You include this typedef into the
business function you create. The typedef converts the data structure to C so it can be used
in the business function.
532
Refer to Data Structures for more information about data structures.
The DLM naming convention refers specifically to J.D. Edwards-created business function
data structures. J.D. Edwards recommends naming your own level-break messages using
the following criteria: DLxxyy where xx refers to the system code you are using (between 50
and 55) and the yy is a unique number. This unique number should be the same number
used previously. The maximum number of characters is eight.
For example, the J.D. Edwards-created level-break message LM0025 would use DLM0025
as the name of the business function data structure. You must have a business function for
each level break message. This data structure is not to be confused with the data structure
that was created for the data dictionary item in the previous procedure. The difference
between the two is that the data structure for the business function is used to move data
variables to the level-break function. The data structure used for the data dictionary item is
used to store data that is mapped to the glossary for a particular data dictionary item.
533
When you create the data structure for the business function, include the following items:
• All data items used for the level-break text substitution message.
• All data items needed for the message to be active (that is, any variable or variables
needed to load the form data structure for a given OneWorld application). Any data
items that are used for the form interconnection only need to be renamed so that the
letters FI_ appear after the Hungarian prefix. For example, jdFI_GlDate, or
mnFI_Openamount. If you are not making the message active, you do not need to
include these items.
• Add data item ev01 and change the variable name from OneWorldEventPoint01 to
cIncludeInterconnect. This parameter is used as a flag to determine if the message is
action. This parameter should be a common parameter to all level-break messages,
even if the original intention of the level-break message is not to call a OneWorld
application. This allows you to use level break messages in different applications, but
not launch into application. You must have a 1 in the data structure value to launch
an application.
• Add data item genlng and change the variable name from GenericLong to idGenlong.
You use this parameter to control all Work Center messaging. It is not intended to be
used for anything else other than as a work field for the system.
1. Create an object in the Object Management Workbench for the new business
function.
The name of the business function is the unique number preceded by BLxx. For
example, if you named the data dictionary item for the level-break message L55025,
534
you would name the business function BL55025. The J.D. Edwards naming
convention is BLMxx.
2. Enter the name of the actual function on the Business Function Design form within
Object Management Workbench.
When you name the function, the standard specifies that you start the function with
the name SetLevel_xx, where xx refers to the system code. Append the function
with other descriptive words to identify the purpose of the level-break message. For
example, you might name the business function BLM0025 Set Level A/R Receipt
Prepost Error.
The following sample of the shell source code shows which pieces need to be included and
where you will be required to enter your own code.
You need to manually map fields from the business function's data structure to the
dsTextData data structure. This is the data structure for text substitution in the level-break
message. You also need to manually map fields from the business function's data structure to
the dsFormData data structure. This is the data structure that is used for the active message.
In the "Variable declarations" section, you should have the following lines to declare the level-
break message variables:
In the "Declare structures" section, you enter your own code for the appropriate type of level-
break message. The following are examples from an existing business function:
535
In the "Set pointers" section, you should have the following lines to ensure that the level-
break message will work:
if (lpDS->idGenLong == (ID) 0)
{
jdeSetGBRError (lpBhvrCom, lpVoid, (ID) 0, “4363”);
if (hUser)
{
JDB_FreeBhvr (hUser);
}
return ER_ERROR;
}
else
lpDSwork = (LPDS_B0100011A) jdeRetrieveDataPtr (hUser, lpDS->idGenLong);
In the "Main Processing" section, you should have the following lines. Substitute your own
items for the italicized items:
In the "Assign values from lpDS data structure to dsTextData here" section, you enter your
own code for the appropriate level-break message. When you assign values you map the
business function data structure items to the data ditionary data structure items. The following
are examples from an existing business function:
536
In the "Assign values from lpDS data structure to dsTextData here" section, you should have
the following lines to ensure that the level-break message will work:
In the "Form interconnect processing" section, you enter your own code for the appropriate
level-break message. The following is an example from an existing business function. In the
"Form interconnect processing" section, you should have the following lines to ensure that the
level-break message will work.
In the "Assign values from LpDS data structure to dsFormData" section, you enter your own
code for the appropriate level-break message. The following is an example from an existing
business function. This shows how you pass information from the data structure for the
business function to the data structure for the form.
In the "Get the form data structure id from the SVRDTL table" section, you should have the
following lines to ensure that the level-break message will work:
537
{
JDBRS_GetDSTMPLSpecs(hUser, (char*)lpASVRdtl->szFITemplateName,
&lpDswork->lpBlob->lpFINDSMPL);
if (lpDSwork->lpBlob->lpFIDSMPL != (LPDSTMPL)Null)
{
lpDSwork->lpBlob->lpFITEXT=(LPSTR) AllocBuildStrFromDstmplName
((LPSTMPL)
lpDSWork->lpBlob->lpFIDSMPL,
(char*)lpASVRdtl->szFITEmplateName
(LPVOID) &dsFormData);
strngcpy (lpDSwork->lpBlob->szDLLName, (const char *)(szDLLName),
sizeof(lpDSwork->lpBlob->szDLLName));
}
TAMFree(lpASVRdtl);
}
TAMTerminate(lptam);
}
}
In the "Function Clean Up" section, you should have the following lines to ensure that the
level-break message will work:
if(hUser)
{
JDB_FreeBhvr(hUser);
}
return (ER_SUCCESS);
}
1. Within Report Design, create a global work field. When creating the work field, use
the data dictionary item GENLNG.
2. Call the Work Center initialization function. The report finds this business function.
This function is named InitializePPATapi. (The actual name of the source file is
B0100025.C.). F01131 is EditJDEM Error Message.
Generally, this function is called in the primary section of the report using the Initialize
Section API.
538
Parameter Description Allowed Values Typical
Values
szUserid User ID override. If not passed, the user Leave blank or use any Blank value
who ran the UBE receives all messages. If valid user ID.
this field is completed, it supersedes the
following Address Number override If left blank, all
parameter. messages go to the
submitter of the UBE.
mnAddressnumber User ID override. Use this field if you know Leave blank or use any Blank value
the user address, but not the user ID for a address number of a
user. valid user.
If left blank, all
messages go to the
UBE submitter.
cDoNotLogWarnings If this feature is turned on, no warning Leave blank or use the Blank value
messages will be sent to the Work Center. number 1.
If left blank, all
warnings and errors are
processed.
cAllowUserIDToChange If this feature is turned on, you can, at any Leave blank or use the Blank value
time, change the user who receives the number 1.
messages. Some restrictions do apply.
If left blank, all
messages will be sent
to one user.
szMailboxdesignator Mailbox (or queue) override. If this field is Leave blank or use any Blank value
turned on, then messages are sent to the valid mailbox
overridden mailbox. (Work Center use.) designator.
If left blank, all
messages are written to
the default queue.
idPPATworkField The work field used by the Work Center This must be a work The
API. This is where the GENLNG work field field defined in the GENLNG
should be passed. UBE. Use the GENLNG work field
data item for this.
cSendErrorsToReport If this feature is turned on, no messages Leave blank or use the Blank value
(except Job Completed) will be sent to the number 1.
Work Center. The messages will then be
available to read through another Work
Center function.
3. Choose the F01131 Edit JDEM Error Message function within the API.
4. Refer to the Windows Help file of APIs to identify the parameters to send.
cAllowUserIdToChange Parameter
This parameter on the initialize API works in conjunction with the szUserid parameter on the
ProcessErrorsToPPAT API. It allows you to set up the UBE so that when any batch errors are
encountered, errors are sent to the user who created the original records and not to the
person submitting the job (such as the night operator). For example, if a single batch job
contains 1,000 transactions created by 50 users, then only those users who created
transactions with errors will receive error messages. The night operator will still receive a
539
message, but it would be a message such as "Job completed normally" or "Job completed
normally with errors." Other users whose transactions were successful will not receive any
error messages.
To set up this functionality, you need to enter a "1" in the cAllowUserIDToChange parameter
when you initialize the batch error processing system. When you process the level 2 level-
break message and then call the ProcessErrorstoPPAT API, you can still specify who will
receive the messages by using the szUserid parameter. You can determine who should
receive the message by looking at the transaction record.
1. From Report Design, establish all of the appropriate level-breaks for the reporting
batch job.
You need to analyze the events that will logically group all errors at a given event.
This typically happen at events in which all editing has been completed for a group of
records or immediately after all edits for an individual record have taken place.
540
• Call the Work Center error message function immediately after the call to the
level-break message. This function is called ProcessErrorsToPPAT. B0100011.c
processes batch errors to JDEM and makes repeated calls.
• Refer to the Windows Help file of APIs to identify the parameters to send.
Use the following table to identify which parameters to send. This is where you designate a
level for the data dictionary level break message. Start your message with a level 2. The
system automatically generates a level 1.
idDataBaseWorkField Work field used by the Work Center API. This This must be a work The
is where the GENLNG work field should be field defined in the GENLNG
passed. UBE. Use the GENLNG work field
data item for this.
cErrorPreProcessFlag This parameter allows the UBE to call the Leave blank or use the Blank
Work Center API at some event to flush the letter P. value or
error space and to group any errors that are Default
541
error space and to group any errors that are If left blank, errors that Default
there by a level break message, which has are in the error space
yet to be sent. are grouped by the
level message being
sent in the first
parameter.
szUserid When the cAllowUserIDToChange option has Leave blank or use any Blank
been set in the initialization function, this valid user ID. value or
parameter accepts the new user ID. Default
If left blank, all
messages are written to
the last user ID used.
When the batch program is about to terminate, call the Work Center error message function,
ProcessErrorsToPPAT, one last time, sending it to level 1. The level 1 indicates the level of
totaling is equal to 1 and that it is completed. This creates the job completed message and
frees any work space that the Work Center API created.
Every report design that uses the Work Center API to process errors must use a level 1 to
call the API at the end of processing. This should also be done by reporting jobs that are
monitoring for any critical errors and that need to terminate early.
When the report has finished processing, it creates Work Center messages, which can then
be read using the OneWorld Work Center application. Batch errors are processed to JDEM
system. Messages created are sent to the user who ran the report unless you specify that the
message be sent to another user or administrator.
If no errors are encountered, the API sends a message to the Work Center that indicates that
the job completed successfully.
542
Debugging
Debugging is the method you use to determine the state of your program at any point of
execution. You can use debugging to help you solve problems and to test and confirm
program execution.
You can use a debugger to stop program execution so you can see the state of the program
at a specific point. This allows you to view the values of input parameters, output parameters,
and variables at the specified point. When program execution has been stopped, you can
step through the code line by line to check such issues as flow of execution and data
integrity.
• Interactive applications
• Reports
• Table Conversions
If you make a change in your program while you are debugging with the Event Rules
Debugger, you must:
Go Visual C++ and Event Rules Debugger - Restarts program after a breakpoint has been
reached.
Visual C++ - Once you start an application, it will run until the breakpoint is reached.
Event Rules Debugger - The application must initially be started from OneWorld Explorer.
Breakpoints Visual C++ and Event Rules Debugger - Breakpoints tell the debugger to stop when a
particular line is reached. You can set breakpoints on lines of code where you want to start
debugging.
Step Visual C++ and Event Rules Debugger - The Step command will execute the current line of
code. It lets you run the program one line at a time. You can use this feature to determine
the results of every line of code as that line is executed.
543
Step Into Visual C++ an Event Rules Debugger - This is used when the current line of code contains a
function call. The debugger will step into the function so that it can be debugged line by line.
When the function is complete, the debugger returns to the next line of code after the
function call in the calling routine. In OneWorld, the Step Into command can be used to
debug a second application that is called from within a OneWorld calling application.
Skip Visual C++ and Event Rules Debugger - Skip is used to skip execution of a line of code. The
line of code which is not executed will turn red.
Step Over Executes a single line of code. If the line of code is a function call, report interconnection, or
form interconnection then that call will not be stepped into.
Watch Visual C++ and Event Rules Debugger - This lets you display the value of variables while the
program is running. It also lets you inspect expressions, so you can see how a particular
expression changes when variables change.
Interpretive code refers to code that is compiled as it runs. The translation from program
instruction to machine instruction happens at runtime. Interpretive code lies within the
application. Event rules scripting code used within Form Design and Report Design is
interpretive. Interpretive code allows you to customize without going through a compile
process every time you change something.
Compiled code is compiled and stored in an object file that may be called independently. The
translation from program instruction to machine instruction happens at compile time. For
example, table event rules, named event rules, and business functions are compiled. They
are outside the application. They are also less subject to change. You can use Visual C++ to
debug compiled code. The event rules scripting language can be translated into C, Java, or
your current language of choice. The logic only needs to be interpreted one time. Interpretive
code is more flexible.
There are two main steps to set up and use the Event Rules Debugger:
544
Understanding the Event Rules Debugger
The Event Rules Debugger is a standalone tools program that consists of five main controls:
The Object Browse window lists applications that have debug information built and that are
available for debugging. You can drill down through the tree to a specific event and open an
Event Rules window for that event.
The Event Rules window displays the event rules for one event. The event name and path
are displayed in the title bar for each Event Rule window. You can right-click to toggle the title
between its long and short versions. The Event Rules windows show which line in the event
rules is currently being executed.
545
The left hand side of an Event Rule window displays icons that describe the state of a line in
the event rules, including the following states:
• Breakpoint
• Disabled
• Current line of execution
Through the Event Rules window you can set and remove breakpoints, using any of the
following methods:
The Variable Selection and Display window consists of two views. The left view contains a
tree control that lists the variable types as parent nodes and the current variables of that type
as child nodes. The variables displayed are relative to the current Event Rule window. The
right view is the variable display view. This view displays user selected variables and their
current values. You can add a variable to the Variable Display view by double-clicking the
desired variable in the Variables Tree.
You can change the value of variables while you are debugging an application. To change
the value of a variable, double-click the variable in the Variable Display window. Change the
value of the variable. The new value appears in the Variable Display window. If you enter an
inappropriate value, for example if you change a numeric value to an alpha value, the new
value is not set and the value is not changed.
There are three special values that are displayed for variables:
blank The value for the variable contains only blanks. This applies to string and character types only.
unknown The value for the variable could not be obtained from the engine. This happens when the
applications are not running or the variables are out of scope.
Note
Variable inspection and modification is not available for debugging named event rules and
table event rules.
Breakpoint Manager
Breakpoints tell the debugger where or when to break execution of a program. When the
program is halted at a breakpoint, you can examine the state of your runtime structures, step
through your event rules, and evaluate expressions using the Variable Watch window.
The Breakpoint Manager tracks which breakpoints are set and where they are located in an
application. When you set a new breakpoint, an entry is made in the Breakpoint Manager.
That entry contains the application name, form name, event name, and event rule line.
546
Right-click in Breakpoint Manager to perform the following operations:
• Delete breakpoints
• Delete all breakpoints
• Go to a breakpoint
You can also double-click on an entry in Breakpoint Manager to open the Event Rule window
where the breakpoint is set.
You can use the Search combo box on the toolbar to search for event rule text. Enter the text
you wish to search for in the Search combo box and either press Enter or F3. If the search
text is found in your event rules text, the text is highlighted. If you press Enter or F3 again, the
next occurrence of your search text is highlighted.
The search control allows for regular expression searches. A regular expression search uses
special characters to match text, for example, ^If: will find every line that starts with "If" and
If$: will find every line that ends with "If".
Following are the special characters you can use to perform more advanced searches.
^ The caret (^) indicates the beginning of the string. For example, the expression "^" matches an
"A" only at the beginning of the string.
^ The caret (^) immediately following the left bracket ( [ ) is used to exclude any remaining
characters within brackets from matching the target string. For example, the expression "[^0-9]"
indicates that the target character should not be a digit.
$ The dollar sign ($) matches the end of the string. For example, the expression "abc$" will match
the substring "abc" only if it is at the end of the string.
| The alternation character (|) allows the expression on either side of it to match the target string.
For example, the expression "a|b" will match "a" as well as "b".
* The asterisk (*) indicates that the character to the left of the asterisk in the expression should
match 0 or more times.
+ The plus (+) is similar to the asterisk, except that there should be at least one match of the
character to the left of the + sign in the expression.
? The question mark (?) matches the character to its left 0 or 1 times.
() The parenthesis affects the order of pattern evaluation and serves as a tagged expression that
you can use to replace a matched substring with another expression.
[] Brackets ([ and ]) enclosing a set of characters indicate that any of the enclosed characters may
match the target character.
Debugging an Application
The Event Rules Debugger allows you to debug interactive or batch applications.
547
► To debug an application
From the Cross Application Development Tools menu (GH902), choose Debug
Application.
You can remove the breakpoint by choosing Breakpoint from the Debug menu. The
options on the Debug menu toggle on and off.
When execution stops, you can use the variables view to inspect and modify the
values of runtime structures.
548
• Stop
• Step Over
• Step Into
As you debug an application and encounter a point at which the interactive or batch
application fails, modify the appropriate variable to correct it. Save your modifications and
rerun the application to see if further debugging is required.
► To modify a variable
The Event Rules Debugger also uses "Just in Time Debugging." Just in Time Debugging
occurs after you build the debug information, run the Event Rules Debugger, and then run the
application.
If the runtime engine has a problem resolving an event rule object or calling a business
function, a message box appears that allows you to activate the Debugger. If you choose to
549
activate the Debugger, then the Debugger is brought to the top and the event rule line that
could not be processed is displayed with a yellow arrow to the left of it.
Setting Breakpoints
You should set at least one breakpoint on a starting event, such as Dialog is Initialized. Any
event that you want the Debugger to stop on must have at least one line of event rule code.
1. Close OneWorld.
It must be closed to debug in this manner.
2. Open Visual C++ and verify that all workspaces have been closed.
3. From the File menu, choose Open.
4. Choose List Files of Type to accept executables (.exe).
5. Select your OEXPLORE.EXE on path \b7\System\bin32 and click OK.
550
7. From the Project menu, choose Settings.
551
11. Click OK.
12. Choose your .h and .c files for the source you want to debug from file open.
13. From the Edit menu, choose Breakpoints to set breakpoints in your code.
If a message appears notifying you that breakpoints have been moved to the next
valid lines, a source code and object mismatch might exist, and you might need to
rebuild your business function.
If you are debugging event rules for business functions and C business functions, you can
use the OneWorld debugger and the Visual C++ debugger together. Follow the steps above
until you log into OneWorld. At that point, follow the steps for the OneWorld debugger.
Program execution stops if C code is accessed. You can then use Visual C++ to continue
debugging. This is useful if you are trying to locate a problem and you are not sure whether
the problem is in a C business function or in the application that calls the business function.
552
► To debug a business function attached to a batch application
1. Close OneWorld.
It must be closed to debug in this manner.
2. Open Visual C++ and verify that all workspaces are closed.
3. From the File menu, choose Open.
4. Choose List Files of Type to accept executables (.exe).
5. Select LaunchUBE.exe
6. On LaunchUBE, browse for the report and version that you want to use.
7. Complete the Server Name field by selecting the location in which the report will run.
553
You can choose Local or specify a server.
You can use the debugger to debug a C program and interactively stop and start it as
needed. During debugging, you can check specific values of variables and parameters to
ensure a program is running correctly. You can also step through the code to see what code
is actually being executed.
The debug commands are listed in the Debug menu. You can customize the toolbar to
contain debug buttons, which you can use instead of the menu.
The Go Command
You can run a program using the Go command from the Debug menu. The program will run
until completion unless you set up breakpoints.
The Step command is available on the Debug menu and executes the current line of code.
When the line of code has been executed, the yellow arrow cursor appears on the next line of
code to be executed.
You can access the Step Into command from the Debug menu. Use this command when the
current line of code contains a function call. The debugger steps into the function so that it
can be debugged line by line. When the function is complete, the debugger returns to the
next line of code after the function call in the calling routine. If the source code of the function
to be stepped into does not exist on the workstation, the debugger skips over the line of code
as though the Step command was used.
Stepping into a standard C function takes you into the function, which you may not want to
do. If so, use the Step Over command to skip those functions.
554
Setting Breakpoints
You use breakpoints to run the program until it reaches a certain line of code. If a breakpoint
is set, the Go command executes until that line of code.
You set a breakpoint by placing the cursor anywhere on the line of code to stop before.
Select Breakpoints from the Debug menu. A red octagon, similar to a stop sign, appears to
the left of the line of code where the breakpoint is set. When the program is run, all lines of
code up to the breakpoint are executed. To continue execution after the breakpoint, you can
use Step, Step Into, or Go.
Using Watch
You can use Watch to inspect what values variables are set to. To use Watch, double-click
on the item to watch and drag it to the Watch window.
Locals Window
All local variables and parameters to a function are listed with their data types and values in
the Locals window. You can modify the values of all items in the Locals window during
debugging. This is useful when debugging infinite loops.
555
• A breakpoint has been set on the line of code with the call to printf. The red
"stopsign" is to the left of the code. The call to printf has been executed with the Step
command.
• The current line to execute has a yellow arrow to the left of it. It contains a call to the
getchar function. That line of code has not yet been executed.
• szGreeting can be seen in the Locals window and in the Watch window. You can
scroll these windows horizontally so you can see the entire line. You can see the
beginning of the value of szGreeting in the Watch window in the example.
• A plus sign next to a variable in the Locals and Watch windows indicates the data
may be expanded. This is useful for inspecting the values of complex data structures.
Debugging Strategies
You can use several strategies to make debugging faster and easier. Begin by observing the
nature of the problem.
556
Is the Program Ending Unexpectedly?
The cause of an unhandled exception is a failure to handle memory correctly. It is an easy
problem to track down if it is happening in the same place. Simply set breakpoints at strategic
points throughout the code and run the program until you find the problem.
If the problem resides in C code, you can find the problem by tracing into the code.
If the problem exists in the OneWorld-generated code, finding the problem may be more
difficult. The debugger provides error messages that are helpful. The most common problem
has to do with missing objects. If there is a business function that is being called that does
not exist, the tool issues an error message that identifies the missing function. For example,
"Business function load failed - CALLBSFN.DLL." In this case, you can either rebuild the
business function or check it out and build it using BusBuild to correct this error.
Remember that ALL business functions are built into larger DLLs. The most generic of these
is CALLBSFN.DLL. Most application specific DLLs are not in CALLBSFN. For example, J.D.
Edwards financial business functions use CFIN.DLL.
The object (BSN func) may need to be checked out to the workstation again and built through
BusBuild again in CALLBSFN.DLL (or the specific DLL).
If other objects are missing, termination will be more abrupt. Remember to transfer all Media
Object (also called Generic Text) objects correctly. If an application has a row exit to an
application that does not exist, it immediately causes an unhandled exception in the program.
Termination of the program is more abrupt and less helpful when there are other kinds of
objects missing. You must review all of the pieces of your application to make sure that they
are all present and correctly built. A common error is to forget about media objects. If you
cannot enter your program at all, a missing object is most likely the problem.
Make sure that the program is terminating in the same place. If the program is failing to free
memory after its use, the program may eventually have insufficient memory to run. If so, you
must reboot the workstation to free memory.
• It is a benefit because it should not be a concern to the user how the function works,
only that it does work.
• The disadvantage is that it is not uncommon to call a function with more than 50
parameters, any one of which might cause errors.
There are two solutions to this sort of issue:
• Review the function specifications to make sure that you have hooked it up correctly.
• Step into the code to see what is going wrong.
557
Where Could the Problem Be Coming From?
Spend some time thinking about where the source of the problem might be.
For example, consider the "Null pointer error." Somewhere in the code memory is a memory
leak. To help you determine where the leak is, you can toggle between the grid rows in order
to force the execution of the Row is Exited event. If the problem occurs, you have narrowed
your search for the leak, because you know that it is in the grid processing.
Set the break point at the beginning of the business function or at the beginning of an event
like Grid Row is Fetched.
For example, step through an If branch and input bad data to see if errors occur as
expected.
Debug Logs
There are several sections of the jde.ini file that relate to debugging. The first statement that
must be checked is in the [JDE_CG] section. The line Target = Release should be modified to
read Target = Debug. An application install of OneWorld will deliver the jde.ini file with Target
= Release. To debug business functions, the jde.ini files must be changed to Target = Debug,
and the business functions that you wish to debug must be rebuilt.
[JDE_CG]
STDLIBDIR=c:\MSDEV\LIB
TPLNAME=EXEFORM2
ERRNAME=CGERR
TARGET=Debug
INCLUDES=c:\MSDEV\INCLUDE;$(SYSTEM)\INCLUDE;$(SYSTEM)\INCLUDEV;
$(SYSTEM)\CG;$(APP)\INCLUDE;
LIBS=c:\MSDEV\LIB;$(SYSTEM)\LIB32;$(SYSTEM)\LIBV32;$(APP)\LIB32;
MAKEDIR=c:\MSDEV\BIN
USER=DEMO
You can output to a file a log of SQL statements and events by changing the line in your
jde.ini file under [DEBUG] from Output = NONE to Output = FILE. This is a very useful
558
debugging tool when you have narrowed a problem down to a specific issue involving the
JDEDB APIs.
[DEBUG]
TAMMULTIUSERON=0
Output=FILE
ServerLog=0
LEVEL=BSFN,EVENTS
DebugFile=c:\jdedebug.log
JobFile=c:\jde.log
Frequency=10000
RepTrace=0
The memory frequency setting allows you to validate the memory heap at a particular 1000th
location. You can set breakpoints and go into the code.
To view logs right-click anywhere in the window and choose Log Viewer to view log files. For
more information about other logs you can view for troubleshooting, refer to the Server and
Workstation Administration Guide.
1. From the Control Panel on your workstation, choose the 32 bit ODBC driver.
2. Click the Tracing tab.
3. Click one of the following options:
• All the Time
• One Time Only
4. Specify the log output path in the Log file Path.
559
Debug Tracing
Use debug tracing to trace database and runtime events, business functions, and system
functions. You can turn on debug tracing and output the results in a log file. This debug log is
also useful for checking to see how the tool constructs a SQL statement.
1. In the jde.ini file under [DEBUG], change Output=NONE to one of the following
values:
Output=FILE This prints both database tracing and runtime tracing.
BSFN This prints when business functions are entered and when they return.
560
SF_? This prints when system functions execute. In place of the ?, you can
designate a specific type of system function, such as control or messaging.
The following example shows the jdedebug.log output running Journal Entry with the
following jde.ini options
Output=EXCFILE
Level=EVENTS,BSFN,SF_GRID,SF_CONTROL
561
562
Web Applications
The OneWorld Development Tools make it easy for you to develop and maintain applications
for use on both Windows clients and Web clients, even if the clients require slight differences
in the design of the forms. You can create Windows, Java, or HTML applications. As you
design a form, Form Design Aid allows you to view it in one of three modes. Your design
team should decide which modes to use for which client types. For example, you might use
Mode 1 for forms to be generated in Windows, Mode 2 for forms you want to generate in
Java, and Mode 3 for forms you want to generate in HTML.
Most of the controls you put on a form are appropriate for any of the modes, but you can
choose to show or hide (enable/disable) any control on the form for each of these three
modes. In this way, you can develop one set of forms from which you generate three versions
of the application (one for each mode). If you customize any of the OneWorld Web
applications, or if you develop new ones, you must use the Web Generation Facility to
generate them into Java or HTML applications. See Working with Controls for more
information about using different modes and customizing the controls on forms for different
modes.
You typically create an application in Mode 1, the default mode. This application is
automatically enabled for Windows. You can then use Mode 2 or Mode 3 to modify your
Mode 1 application for Java or HTML.
Although you can develop or change Web-based applications (Java or HTML), on your
workstation, you need a workstation that is web enabled to test the application. All OneWorld
clients are web enabled. The following components are required for your client:
In the examples below, you can see the kinds of changes you might want to make in a
windows application to make it easier for use on the Web. Typically you use fewer fields in a
Web application to make it easier for an end user to view and use.
Note
Changing the font size in your style sheets can alter the appearance of the form, including
displacing controls, and wrapping or hiding control text.
563
You can modify your Mode 1 application and use another mode, for example Mode 2, to
create an application for Java:
564
You can use another mode, for example Mode 3, to further modify your Mode 1 application
for an HTML application:
After you create an application in form design you can use Menu Design to attach the
application to a menu and designate which mode the application should run in. You should
specify the mode on the menu so that the user can tell which application to use. See Menu
Design for more information about designing menus.
If you use OneWorld Development Tools to create your own applications, and these
applications are designed for use as web applications, you should consider the following in
order to ensure optimal performance:
• Each data and business function request executes on a data or enterprise server, not
the web server. As a result, your web client performance is limited by the speed of
your network or modem connection as well as network traffic bottlenecks. If possible,
you should limit or bundle data and business function requests in a manner most
565
efficient for WAN and Internet connections. If you have several table I/O calls serially
linked (for example, each one is dependent on the previous call), consider using
named event rules to combine all calls, which are compiled and executed on the
enterprise server.
• Whenever possible, design the web-ready application to perform logic using event
rules. This provides better performance than if you use C language business
functions or event rules business functions (named event rules). Remember,
whenever you call a business function the logic is performed on the remote
OneWorld enterprise server. However, as mentioned above, if the event rules contain
several table I/O or business function calls serially linked, these will perform better as
a business function (named event rule) on the enterprise server.
• Design the web-ready application to get data in manageable chunks. If your
application performs a business function request before and after each grid line, your
performance will suffer. Also, you should try to avoid using business functions as a
means to request data; use business views or table I/O instead.
• Educate users in the importance of using search criteria in query by example
columns. This is important given the constraints of transferring data at modem
speeds across typical Internet connections. For example, users should routinely try to
narrow their searches, because data retrievals are configured to only obtain 10
records at a time. If you develop custom applications for web use, consider defining
query by example fields as required entries.
Application P98305W is a version list application created specifically for the web client. You
can use this application to look up web versions of applications.
See Also
Designing Forms Using Multiple Modes
• Form startup
• Set focus on grid (only when ER exists)
• Checkbox (only when ER exists)
• Radio button (only when ER exists)
• Bitmap clicked
• URL clicked
• Tab is selected
• Node expanded in tree control
• Drag-and-drop action occurs in tree control
In addition to the critical events listed above, the client also refreshes the page when non-
critical events occur that contain hide/show or enable/disable grid functions. The following is
a list of these non-critical events:
566
For Grid controls Column is exited
Column is exited and changed-inline
Column is exited and changed-asynchronous
These post rules for critical and non-critical events form the default post model used by the
HTML client. The HTML post model can cause usability issues for high volume data entry
applications and inquiry applications used frequently on the web. The issue occurs when an
application does hide/show or enable/disable grid on non-critical events forcing the HTML
page to refresh. The refresh makes the screen flash. The duration of the flash depends on
network traffic, hardware, configuration, and so forth. Consequently, you might want to
override the HTML post model in some situations.
Use the HTML Auto Refresh option in a form's property settings to turn off the automatic post
on all non-critical events for that form (the default is to have the attribute turned on). Use the
HTMLPOST option in an event rule to turn on the post for a single non-critical event (the
default is to have the attribute turned off). Enabling posting overrides a disable. For example,
if you turn off posting for a form, but turn it on in the ER for a single event, posting is
suppressed for all events on the form except for the one with the HTMLPOST option turned
on in its ER.
The Windows and Java clients ignore both the form and event attributes.
After you generate a OneWorld form or application in Java or HTML, the tool stores the
output in an appropriate database on the Web server. You select the database by specifying
the environment. The output of the generation is a Java or HTML object, which is stored as
persistent data in the database. The system retrieves the objects at runtime from the
database. You can use the Web Generation tool to generate menus, data dictionary items,
forms, tables, business views, named event rules, and reports.
567
Note
Users without administrative rights are restricted to generating forms and reports privately.
Administrators can generate all objects publicly.
See Also
Understanding Workstation jde.ini Settings in the OneWorld System Administration
documentation guide for information on gaining administrative rights to the Java &
HTML Generator
Logging in
Before you can use the generation tool, you must log in to the web server to which you want
to generate objects.
► To log in
2. On Java & HTML Generator, click the Admin tab, and then enter the web server you
want to use in the Server Name field.
3. Click OK.
Note
Some options are available only to users with administrative privileges.
The following table describes the parameters you can configure for the Java & HTML
Generator.
Function Description
Define remote TAM Enter a TAM path in the Remote TAM Path field on the Admin tab to use a remote
path TAM for generation.
Define protocol Click the HTTP or the HTTPS option on the Admin tab to generate web applications
with one protocol or the other.
Generate error log To generate an error log when the Java & HTML Generator runs, click Error Log on
the Admin tab, and then indicate where you want the file to be output.
568
Generate ER log To generate an ER log when the Java & HTML Generator runs, click ER Log on the
Admin tab, and then indicate where you want the file to be output.
Generate objects A user with administrative rights may choose to generate objects privately or publicly.
publicly or privately Click the Personal or Private option on the Admin tab to generate web applications
one way or the other.
Choose output To generate objects in multiple languages, click the languages you want on the
language Language tab. For each non-default language you choose, you must indicate a TAM
path.
See Also
Understanding Workstation jde.ini Settings in the OneWorld System Administration
guide for information on gaining administrative rights to the Java & HTML Generator
Generating Forms
If you changed or added an existing Windows mode application, if you added a new form, or
if you enabled or disabled modes, you must generate the form before you can use the web
version of the form. You can generate all the forms at once, or you can generate the forms for
an application or system code. The Java & HTML Generator always generates Java for the
modes you select. Additionally, you can choose to generate HTML for the selected modes as
well.
• Form
To generate a specific form only, enter the system name of the form. If you leave
this field blank, the system generates all the forms in the application.
• Version
To generate a specific version of a form, enter the system name of the version. If
you leave this field blank, the system generates all versions of the form or forms.
Go to step 4.
3. To generate the forms in a system code, click System Code, and then complete the
following field:
• Object Name
Enter the system code.
Go to step 4.
4. Click Generate Business Views to generate the business views associated with the
object you specified in step 2 or 3.
569
5. Click the modes (1, 2, or 3) for which you want to generate forms.
You can generate forms in one or more modes.
7. If you are generating HTML versions of the forms, you can put a footer on the forms
by entering a task ID in the Footer Menu field.
If you enter a task ID, the ID will be generated as a hyperlink, allowing a user to
launch a OneWorld task. For example, if you entered the task ID for the Journal Entry
application (2/G0911), a user could launch Journal Entry by clicking on the form's
footer.
Leave this field blank if you do not want footers to appear on the forms.
8. Click OK.
5. If you are generating HTML versions of the forms, you can put a footer on the forms
by entering text in the Footer Menu field.
If you enter a task ID, the ID will be generated as a hyperlink, allowing a user to
launch a OneWorld task. For example, if you entered the task ID for the Journal Entry
application (2/G0911), a user could launch Journal Entry by clicking on the form's
footer.
Generating Reports
If you added or changed reports (batch applications or batch versions), you must generate
the report to make the report available on the web. Batch applications are available in Java
format only.
You can generate all of the reports and their versions in the system, or you can generate
selected reports based on report name or system code.
570
► To generate selected reports
• Version
To generate a specific version of a report, enter the system name of the version.
If you leave this field blank, the system generates all versions of the report.
3. To generate the reports and their versions in a system code, click System Code,
complete the following field, and then click OK:
• Object Name
Enter the system code.
See Also
Understanding Workstation jde.ini Settings in the OneWorld System Administration
documentation for information on gaining administrative rights to the Java & HTML
Generator
571
► To generate menus
3. Enter the name of the object you want to generate in Object Name.
Leave this field blank if you want to generate all data dictionary items.
4. Click OK to generate a single object. Click Generate All to generate all data
dictionary items and their related table ID and business view references.
1. On Java & HTML Generator, click the BSVW & Table tab.
2. Click one of the following options, depending on the type of object you want to
generate:
• Business View
• Table
Skip this step if you want to generate all business views and tables.
3. Enter the name of the object you want to generate in Object Name.
Leave this field blank if you want to generate all business views and tables.
4. Click Generate Data Dictionary to generate the data dictionary items associated with
the object or objects to be generated.
5. Click OK to generate a single object. Click Generate All to generate all business
views and tables.
1. On Java & HTML Generator, click the BSFN & Data Structure tab.
2. Click one of the following options, depending on the type of object you want to
generate:
• BSFN's data structure
• UBE's data structure
• BSFN view for storefront
3. Enter the name of the object you want to generate in Object Name.
572
4. Click OK.
573
Performance
This section includes tips and tools to help you enhance the performance of your
applications.
Performance Tips
This section describes some things you can look for to improve performance. In particular it
provides information about analyzing and improving the performance of:
• Data Dictionary
• Table Design
• Business Views
• Data Structures
• Data Selection and Sequencing
• Form Design
• Batch Applications
• Event Rules
• Business Functions
• Error Messaging
• Transaction Processing
Does the application seem slow on a specific platform, but not all platforms? If yes, then there
may be a logical issue or index issue for the given platform.
There are several tools to perform this analysis. Use jdedebug.log first to determine at what
event the application seems slow and what is happening on that event.
Analyze database and business function use. In analyzing the tables, consider the following:
• Records should be read in only once unless all secondary fetches for a given record
were cached.
• The total of all JDB_OpenTable and JDB_OpenTableFromCache should match the
total number of JDB_CloseTable calls for each table.
• The total number of actual JDB_OpenTable calls (the amount of opens that are not
cached) should be as close to one as possible. Values larger than one indicate that
multiple database cursors are being retained for the table.
Next turn on table logging for the jdedebug.log. Review the database I/O. If the table I/O is
still a concern, start the SQL log and analyze the information in the log.
If you have justified all table I/O, and the application is still slow on certain events, then
review the business functions running on those events. Make sure the business functions are
running efficiently.
574
Look for business functions accessing a table a large number of times for the number of
records being processed. Can caching be used?
Look for values that can be saved in global event rule variables instead of performing
redundant I/O calls.
Look for multiple calls to multiple business functions running over the same table that can be
consolidated into one table I/O call.
Look for business function or table I/O calls that can be moved to different events in order to
reduce the number of times that they are called.
Triggers
Data dictionary triggers can be used for both formatting and validation. Triggers are the most
costly way to format or edit data values. Most of the formatting that occurs in OneWorld
involves date and math fields. These fields require the most overhead for editing and
formatting. Make sure that all triggers are coded as efficiently as possible.
Overrides
You can use data dictionary overrides to override the data dictionary characteristics of a form
control, grid column, or report field at design time. This causes additional overhead at
application startup because of the extra processing required to evaluate and apply the
overrides. The overrides that are applied can have either a positive or negative affect on
performance during runtime processing. For example if you use the override feature to
disable some of the validation functionality, then performance will be increased, because
disabling features causes some runtime overhead to be removed. Adding overrides such as
edit/format triggers or next numbering will increase runtime overhead.
Validation
Validation is based on the data dictionary item that is attached to a control, column, or field.
The overrides can also play a part in validation. Validation is the most costly for data items
that have triggers. Validation of user defined codes also requires I/O to validate data values.
General validation can be more costly for certain data types such as Math and Date. These
data types require special logic to manipulate the OneWorld-specific data types.
Use a partial key only for sequential and fetch next or just to look at a few more records.
If you open a table and then a fetch key, it destroys the pointer so do a fetch single instead.
Almost any other database API will destroy the pointer also.
575
The fetch matching key uses a greater than or equal key so it selects more than you may
need. Use the correct JDB API for what you need.
Index Considerations
Adding a suitable index will almost always improve performance when selecting and fetching
data from the database. However, each additional index adds maintenance overhead when
records are added, updated or deleted in the database. The decision about adding a new
database index over a table should balance these two factors.
SQL Server 6.5 can have as many as 2 billion tables per database and 250 columns per
table. The maximum number of bytes per row is 1962. If you create tables with varchar or
varbinary columns whose total defined width exceeds 1962 bytes, the table is created but a
warning message appears.
Inserting more than 1962 bytes into such a row or updating a row so that its total row size
exceeds 1962 produces an error message and the statement fails.
If you plan custom modifications in a coexistence environment, the World RPG programs
must be able to read the structure of any tables to be read by WorldSoftware. This means
that the tables WorldSoftware must access should be initially created in World database
structure, not from OneWorld using AS/400 foreign databases (Access, Oracle, SQL Server).
The World environment must be set up first before OneWorld is set up on top of it.
Make date and time conversions on AS400 and OneWorld the same.
Access32
576
SQLSERVER
Oracle
• The maximum length for an index is 254 bytes, less the number of keys that allow
NULL values.
• The maximum number of columns per index is 16 or a maximum key length of 900.
{
MATH_NUMERIC ktkit; /* 0 to 48 */
char ktmc01[251]; /* 49 to 299 */
char ktmc02[[252]; /* 300 to 550 */
char ktmc03[251]; /* 551 to 801 */
char ktmc04[251]; /* 802 to 1052 */
MATH_NUMERIC ktseqn; /* 1053 TO 1101 */
} KEY1_F32944, FAR *LPKEY1_F32944;
#define ID_F32944_KIT_CONFIGURED_STRING_ID_B 2L
When you define indexes on various columns, ensure that no two indices, one of which may
be a primary unique index, are defined on the same column.
577
This is not permitted, because two indexes are defined on the same columns.
If you encounter specification file corruption, recreate the tables in the source database.
Maximum number of table I/O mapped items size to fit in 32K is (32768-206)/181 for about
180 items.
In order to leave space for literal values, use a mapping size not greater than 130 elements.
The 130 elements relate to the number of mappings on any table I/O statement. A table may
have more than 180 columns, but you can still map fewer than 180 of them without problems.
If you need to use table I/O with more than 180 mappings, you should probably create
several table I/O statements for specific requirements.
• Use a multiple-table business view to access all the related data fields
• Use a single-table business view to access the data fields from the primary table, and
use a business function or table I/O to access the data fields from secondary tables
578
The best choice is not always obvious, but you can usually decide by looking at the resulting
number of database I/O operations that will be performed. A joined business view that uses
cross data source joins causes slower performance.
If the secondary tables are "master" files, the second option is usually preferable because it
makes best use of database caching. For example, suppose the primary table contains a
company number and the related company name is stored in a secondary Company Master
file. If, in practice, it is likely that the same Company Master record will be retrieved for
several records in the primary table, then it is usually preferable to fetch the company name
explicitly using a business function or table I/O.
OneWorld is particularly optimized to fetch user defined codes. User defined code tables
should never be included in a multiple-table business view.
Minimizing the number of fields in a data structure is far more productive in improving runtime
performance than minimizing the number of fields in a business view. You can create new
business views that meet your specific needs that do not affect performance.
Unions
Unions are the most expensive database operation out of all the SQL SELECT statement
types. In general you should avoid using them. An example of when you might want to use
unions is if you are using the same part of tables at different times. For example, an
application uses the same part of 10 different tables, and you only need that part one part at
a time. Post Processes is an example of this.
Consider writing applications with the minimum number of grid columns required for the
application's basic functionality. You can add columns to the associated business view to
supplement the basic application with minimal effort. Therefore, it is better to add columns to
a business view than to add columns to a grid.
In order to leave space for literal values you should limit your structure size to 350 elements
or less. Any data structure approaching a size of 100 elements or more should be considered
carefully.
For example, Bill of Material Inquiry calls the Bill of Material report passing the Parent Item,
Parent Branch, Type of Bill, and Batch Quantity. In the Initialize Section Event of the first
level-one section of the Bill of Material report, the report data structure values are checked. If
they are not equal to blank, the Set User Selection system function is used to add these
selections.
Form Design
This list contains standards for increased performance across all form types.
• Limit the number of columns in the grid to the minimum required by the application.
• Keep the number of columns in the business view to the minimum required by the
application.
• Limit the number of form controls, whether hidden or visible, to the minimum required
by the application.
• Event rule variables should be used as work fields in place of hidden form controls.
• Disable data dictionary functions on form and grid controls that are not required, such
as edits and default values, whether hidden or visible.
• Keep the amount of input and output performed for each grid row to the minimum
required for the application. For example, avoid associated descriptions wherever
possible.
• Use the Stop Processing system function whenever feasible to skip the processing of
unnecessary event rules.
• Consider the design for the most efficient method of temporary data storage available
at the time, such as cache versus linked list versus work files.
Find/Browse
580
additional fields in the index or logical that are not included in the grid sort. For
example, in a partial match, the grid sort can be KIT, MMCU and the logical and
index can include KIT, MMCU, TBM, BQTY.
This list contains standards for increased performance on Header Detail and Headerless
Detail forms.
• For maximum performance, the grid sort should match an index of the table in the
business view. The index should exist on the AS/400 and OneWorld tables.
• The sort order on the grid should match both an index defined in OneWorld and a
logical file defined on the AS/400, either partially or completely. The logical and index
must contain at least all fields that are in the grid sort, and the fields selected for the
grid sort must be in the same sequence as the logical/index fields. There may be
additional fields in the index or logical that are not included in the grid sort. For
example, in a partial match, the grid sort can be KIT, MMCU7 and the logical and
index can include KIT, MMCU, TBM, BQTY.
Slow Performance
If the server side performance for your batch process is extremely and you cannot determine
the cause, you may want to check with your system administrator to ensure that the
RequestedService setting in the JDE.INI file has the appropriate settings.
Put master business function end docs on the Post Button Clicked event.
On asynchronous processing, put the Post Button Clicked event only on OK and Cancel. This
ensures that your form does not terminate while the business function is still running. If the
form terminates while the business function is still running, the business function cannot
return values or handle errors.
You can also use system functions to get to information that you cannot access, for example
to write grid lines.
FetchKeyed is made up of Clear Selection, Select Keyed, and Fetch. Avoid using
FetchKeyed unless the keys are changing.
If keys are not changing use Select, and then in a loop use Fetch Next for better
performance, only if you do need to read records sequentially.
581
You should hide and show fields on the Dialog is Initialized event. You should put logic on the
Post Dialog is Initialized event.
Use explicit comparisons instead of implied. It takes more code, but it runs faster.
You should make sure that the lines in a loop really need to be in there. If something does not
really need to be done each time, then do not put it in a loop.
Reduce the number of returns inside code so you have only one exit point.
Use named variables to store temporary values. Do not use hidden controls or grid columns
to store temporary values.
When multiple business functions access the same cache, locate the related functions in the
same source member.
Should I use JDB API calls in a business function or table I/O commands in event rule
code to manage the database?
From a performance standpoint, there is little difference between the two methods. Make the
choice based on the context. For example, if event rule code needs to access the database,
use event rule table I/O instead of writing and calling a business function.
If you have validation in your code and this validation is also part of a master business
function, the tool will know that you have already validated and will return and say it is already
done, instead of performing the validation twice.
If you go into a grid and do a custom select it is a big performance hit. You might want to
restrict people from resequencing the grid. If there is a business need to resequence a grid,
make sure there is an index over that table that matches the sort sequence.
582
Make sure variables are used only if needed.
Do not use static variables. You should probably use a single record cache instead. An
instance where you might want a static variable would be if you were getting parts of
something repeatedly and totalling them.
Because jdeAlloc actually allocates space, you should not generally use it. You can,
however, use jdeAlloc if you want to keep a storage area for multiple calls.
For example, suppose you have a function that is split into server and workstation
components and you have parent/child information. The client makes a request for what the
parent/child looks like. The server needs to know where to go back to. You can use jdeAlloc
to keep the information in sequence.
jdeCallObject - When functions are built there is one .c in source. If you have more functions
in here, then all functions run on the server if the main one does. You may, however, want
some functions to run on the workstation and some on the server. Make sure that if you use
more than one function that they are all completely dependent and you want them to run on
the same place. jdeCallObject goes across DLLs and platforms.
Memory Allocation
A memory leak is when allocated memory is not freed when it is no longer needed. This can
cause the performance of an application to degrade continuously as it runs. You should be
aware that jdeCache allocates memory. A cache that is created in a BeginDoc master
business function must be destroyed in the corresponding EndDoc function.
One frequent source of unexpected memory leaks comes from failing to free allocated
memory when processing errors or other conditions which may traverse an alternate
execution path in a business function.
Look at JDEDEBUG.LOG to identify possible memory leaks in business functions. You can
also use a third-party tool for detecting memory leaks.
You must code an If statement in event rules so that if an error is already shown you do not
show it again. If the error is only in the data dictionary, the error will show every time.
583
584
Additional Information for OneWorld Development Tools
Because the OneWorld Tools are comprehensive and flexible, you can customize certain
aspects of business solutions and applications without making custom modifications. J.D.
Edwards refers to this concept as "modless mods," which are modifications that you can
perform easily without the help of a developer. You can perform modless mods on the
following:
• User overrides
• User defined codes
• Menu revisions
• All text
• Processing options values
• Data dictionary attributes
• Workflow processes
This kind of flexibility improves efficiency and provides distinct advantages, such as the ability
to do the following:
You should prepare for the upgrade before making any custom modifications to ensure a
smooth upgrade. If you plan modifications properly, you will have minimal work to do
following an upgrade. This should result in the least amount of disruption to your business
and a reduction in the overhead cost involved during an upgrade because the upgrade time is
reduced.
OneWorld keeps track of all custom modifications as you check them into the server. Using
this feature, you can run the Object Librarian Modifications (R9840D) report prior to a merge
to see a list of the changed objects.
OneWorld consists of control tables (such as menus, user defined codes, versions, and the
data dictionary) and transaction tables (such as Address Book and the Sales Order File). J.D.
Edwards ships the control tables with data that you can modify, while transaction files contain
your business data.
Both of these kinds of tables go through an automatic merge process during an upgrade
where control tables are merged with new J.D. Edwards data, while transaction files are
converted to the new specifications, keeping your existing data. For the object specification
merges (such as business view, tables, data structures, processing options, event rules, and
585
applications), there are processes in place that merge the specifications or overlay them
depending upon the rules defined under What an Upgrade Preserves and Replaces.
• When adding new objects, use system codes 55-59. OneWorld uses reserved
system codes that enable it to categorize different applications and vertical groups.
By using system codes 55-59 for your custom usage, OneWorld does not overlay
your modifications with J.D. Edwards applications.
• Do not create custom or new version names that begin with ZJDE or XJDE. These
are reserved prefixes for standard version templates that J.D. Edwards sends out for
you to copy, to create new templates or versions. Using these prefixes does not
preserve your custom versions in case of a naming conflict.
• For upgrades, you should build a package from the last modified central objects set
and perform backups of your development server, central objects, and Object
Librarian data sources so you can access those specifications for comparison or for
troubleshooting purposes. See the OneWorld Upgrade Guide for information.
Interactive Applications
Do not delete controls, grid columns, or hyperitems on existing OneWorld applications.
Instead, hide or disable them. OneWorld might use these items for calculations or as
variables, and deleting them might disable major functionality.
586
and row exits that call your custom forms within your custom applications. From a
performance standpoint there is no difference if an external application is called from
a row exit or a form within the application.
New hyperitems X
added to
existing forms
New controls X
added to
existing forms
New grid X
columns added
to existing forms
Style changes X Style changes include fonts and colors. New J.D. Edwards
controls have the standard base definitions, so if you adjust the
style you need to do the same for any new controls added to an
application.
Code-generator X
overrides
Data dictionary X
overrides
Location & size X If J.D. Edwards decides to place a new control in the new release
changes of the software in the same place you have placed a custom
control, the controls display on top of each other. This does not
affect the event rules or the functionality of the application. After
the upgrade, you can rearrange those controls using Application
Design Aid.
Sequence X The upgrade process adds new J.D. Edwards controls to the end
changes for tabs of your custom tab sequence. You can review the tab sequence
or columns after an upgrade.
587
What an Upgrade Preserves
The following interactive application elements are preserved during an upgrade.
• New applications
There are two ways to create an application: create it from scratch, or copy an
existing application using the Application Design Aid's "Copy" feature. This allows
you to copy all of the application specifications, including event rules.
If you use the Copy feature to copy an existing application for some modifications,
during an upgrade your new application does not receive any changes J.D. Edwards
might have made to the original application you copied.
• Code-generator overrides
• Data dictionary overrides
• Location & size changes
If J.D. Edwards decides to place a new control in the new release of the software in
the same place you have placed a custom control, the controls display on top of each
other. This does not affect the event rules or the functionality of the application. After
the upgrade, you can rearrange those controls using Application Design Aid.
Reports
The following rule applies to Report Design Aid specifications:
Do not delete objects on existing OneWorld reports. Instead, hide them. OneWorld might use
these for calculations or as variables, and deleting them might disable major functionality.
• New reports
There are two ways to create a report: create it from scratch, or copy an existing
report using Report Design Aid's "Copy" feature. This feature enables you to copy all
the report specifications, including event rules.
588
If you use it to copy an existing report for some modifications, during an upgrade your
new report does not receive any J.D. Edwards' updates made to the original report
you copied.
• New reports
• New constants added to existing reports
• New alpha variables added to existing reports
• New numeric variables added to existing reports
• New data variables added to existing reports
• New runtime variables added to existing reports
• New database variables added to existing reports
• New data dictionary variables added to existing reports
• Style changes
Style changes include fonts and colors. New J.D. Edwards controls have the
standard base definitions, so if you have adjusted the style, you need to do the same
for any new controls added to a report.
New reports X
New constants X
added to
existing reports
New alpha X
variables added
to existing
reports
New numeric X
variables added
to existing
reports
589
New data X
variables added
to existing
reports
New runtime X
variables added
to existing
reports
New database X
variables added
to existing
reports
New data X
dictionary
variables added
to existing
reports
Style changes X Style changes include fonts and colors. New J.D. Edwards
controls have the standard base definitions, so if you have
adjusted the style, you need to do the same for any new controls
added to a report.
Location and X If J.D. Edwards decides to place a new object, such as a control,
size changes for in the new release of the software in the same place you have
objects placed a custom object, the objects display right next to each
other. This does not affect the event rules or the functionality of
the report in any way. After the upgrade, you can rearrange
objects using Report Design Aid.
Data dictionary X
overrides
Custom sections X Instead of adding custom sections to existing reports, use Report
on existing Interconnect and connect to a new custom report that uses
OneWorld system codes 55 - 59. There is no difference in the performance
reports of a report being called through report interconnections.
590
• Overrides done in Application Design Aid
• Overrides done in Report Design Aid
• Overrides done in Interactive Vocabulary Override
• Overrides done in Batch Vocabulary Override
Object Preserved Replaced Comments
Overrides done in Application X
Design Aid
Table Specifications
An upgrade merges your table specifications from one release level to the next.
Instead of adding a new column to an existing J.D. Edwards table, use a tag file with
system codes 55 - 59.
Columns added to or removed X This includes changing field length, field type, and
from existing J.D. Edwards decimal position.
tables
Instead of adding a new column to an existing J.D.
Edwards table, use a tag file with system codes 55
- 59.
For custom tag files, be aware of data item changes in the J.D. Edwards data dictionary.
From one release to the next, J.D. Edwards might change certain data item attributes such as
data item size, which can affect data integrity and how data is stored in the database. For this
reason, you might need to use the Table Conversion tool to convert the tag file data to the
new release level. For base J.D. Edwards files, the upgrade process takes care of the data
dictionary changes by upgrading the OneWorld database to the new release level. An
upgrade preserves custom indices over the custom tag files.
591
Control Tables
Control tables contain user defined codes (UDCs), menus, and data dictionary items. An
upgrade merges your control tables from one release level to the next using the Change
Table process, which uses your control tables, not J.D. Edwards tables, as the basis to do
the data merge.
User defined codes X The upgrade process merges any new hard-coded J.D.
Edwards values. (Values owned by J.D. Edwards are system
90 and above, and H90 and above.) The process also reports
any J.D. Edwards hard-coded values that conflict with your
custom values.
Columns added or X
removed from
existing J.D. Edwards
control tables
Business Views
Do not remove columns from existing business views. Changing business views that
applications use can cause unpredictable results when you run the application. If you need to
hide columns, do so at the application design level using either Application Design Aid or
Report Design Aid. There is not much of a performance gain by deleting a few columns from
a business view.
592
Event Rules
Events for J.D. Edwards business X An upgrade disables and appends your
functions that have event rules custom event rules to the end of the event
attached to the same event rules. The merge prints a report (R9840D) to
notify you of any event rules that the upgrade
process disabled.
To restore your custom event rules to J.D. Edwards objects, highlight and drag the
event rules back to the proper place in the event and enable them. Prior to an
upgrade perform the following:
593
Data Structures
To bring your custom modifications made to J.D. Edwards data structures forward to the next
release level, run the Object Librarian Modifications (R9840D) report to list all of the modified
data structures, and use this report as a guide for manually refitting data structure changes.
Business Functions
For any new custom business functions, create a new (custom) parent DLL to store your
custom modifications. See the OneWorld Development Tools Guide for details.
To bring your custom changes forward to the next release level, run the Object Librarian
Modifications (R9840D) report to list all of the modified business functions, and use this
report as a guide for manually refitting the business function changes.
Always use the standard API (jdeCallObject) to call other business functions from within a
business function. Not following this and all other standards will cause problems.
To determine modifications to the source of existing base J.D. Edwards business functions,
use a third-party source-compare tool, such as Microsoft WinDiff. To determine modifications
to APIs within business functions, see the OneWorld online help feature for the most current
APIs.
594
Object Preserved Replaced Comments
New custom business function objects X
Versions
For new custom versions, create a new version with a name that does not begin with XJDE
or ZJDE. See the OneWorld Foundation Guide for details.
Version specifications X
In addition, processing option data is copied but not converted for non-JDE versions using
JDE processing option templates. A warning is issued at runtime, and some data may be lost.
Additionally, event rule modifications for custom versions on JDE templates are not
reconciled with the JDE parent template.
Form Processing
Find/Browse
Parent/Child
Fix/Inspect
Header Detail
Headerless Detail
Search/Select
Message Form
Processing for the following controls is also discussed in this section:
Edit Control
Grid Control
595
Process Flow for Find/Browse Form
A Find/Browse form is used to query a business view and select records from that business
view for an operation.
Default Flags
There are no form option flags checked by default on Find/Browse forms. The only form
option flag that can have an impact for this form type is the "No Fetch on Grid Business View"
flag. Checking any of the other form option flags does not have any impact on the form
processing.
The Find/Browse forms along with Parent/Child Browse forms are the only forms that have
the "Entry Point" property checked by default. Find/Browse forms are typically the entry point
into applications. The entry point property can be unchecked by the application developer.
Dialog Initialization
1. Initialize Thread Handling
7. Initialize Helps
9. Create Toolbar
10. Load Form Interconnection data into corresponding business view columns and
filter fields, if any
The data used for selection is pulled from filter fields and QBE Columns.
596
1. If the form option flag "No Fetch On Grid Business View" is unchecked then the
following two actions occur:
• Select and Sequence
• Begin Data Retrieval
2. If the form option flag "No Fetch On Grid Business View" is checked no data retrieval
is performed.
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. It will read one record at a time and for each record, perform the following
processing:
Closing Form
1. Perform Event Rules: End Dialog
5. Terminate Helps
6. Free all structures for form, including structures for Business View Columns,
Form Controls, Grid Columns, and Event Rules
Menu/Toolbar Items
597
Select
Select is a standard item that is automatically placed on Find/Browse forms. There is no
default processing for Select on Find/Browse forms. It will behave as a user defined item.
Close
Close is a standard item that automatically appears on Find/Browse forms. It closes the form.
Find
Find is a standard item that automatically appears on Find/Browse forms. When clicked by
the user, it is the signal to the runtime engine to call the database and reload the grid based
on the selections in the filter fields.
Delete
Delete is a standard item that can be added to Find/Browse forms. It deletes a record in the
grid from the database.
598
Copy
Copy is a standard item that can be added to Find/Browse forms. The copy function allows
users to duplicate and rename an object. There is no default processing for copy on
Find/Browse forms. They will behave as user defined items. If a form Interconnection is
placed on the Button Clicked event then the called form will open in copy mode.
Add
Add is a standard item that can be added to Find/Browse forms. There is no default
processing for add on Find/Browse forms. They will behave as user defined items. If a form
Interconnection is placed on the Button Clicked event then the called form will open in add
mode.
Default Flags
There are no form options flags checked by default on Parent/Child forms. The only form
option flag that can have an impact for this form type is the "No Fetch on Grid Business View"
flag. Checking any of the other form option flags does not have any impact on the form
processing.
The Parent/Child Browse forms along with Find/Browse forms are the only forms that have
the "Entry Point" property checked by default. Parent/Child forms are typically the entry points
into applications. The entry point property can be unchecked by the application developer.
Dialog Initialization
1. Initialize Thread Handling
2. Initialize Error Handling Process
3. Initialize Business View Columns
4. Initialize Form Controls
5. Initialize Grid/Tree Fields
6. Initialize Static Text
7. Initialize Helps
8. Initialize Event Rules Structures
9. Create Toolbar
10. Load Form Interconnection data into corresponding business view columns and filter
fields, if any
11. Perform Event Rules: Dialog is Initialized
599
12. Perform Event Rules: Post Dialog is Initialized
13. If the grid option flag "Automatically Find On Entry" is checked
• Begin Detail Data Selection and Sequencing
The data used for selection is pulled from filter fields and QBE Columns.
1. If the form option flag "No Fetch On Grid Business View" is unchecked
• Select and Sequence
• Begin Data Retrieval
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. It reads one record at a time and for each record, perform the required processing.
The data retrieval is performed in two different ways in the Parent/Child browse form. The
fetch performed to get the first level nodes in the tree is similar to the one performed in the
Find/Browse form:
1. If the Parent/Child Browse form has the grid permanently hidden, then expand the
header node and move the selection to the first child node under the header. This
initiates the events: `Tree - Node Level Changed' and `Tree - Node Selection
Changed.'
2. Perform Event Rules: Last Grid Record Has Been Read
600
The Parent/Child form also performs data retrieval whenever a particular node on the tree is
expanded. However, this fetch is performed only once for each node that is expanded. If a
particular node is collapsed and expanded again, then the tree and the grid are replenished
from internal structures. The processing performed for node expand event is given below:
Closing Form
1. Perform Event Rules: End Dialog
2. Load Form Interconnection data from corresponding business view columns, if any
3. Terminate Error Handling
4. Terminate Thread Handling
5. Terminate Helps
6. Free all structures for form, including structures for Business View Columns, Form
Controls, Grid Columns, and Event Rules.
7. Destroy the window
Menu/Toolbar Items
The following is the process flow for the menu/toolbar items on a Parent Child Form.
601
Select
Select is a standard item that is automatically placed on Parent/Child Browse forms. There is
no default processing for Select on Parent/Child Browse forms. It will behave as a user-
defined item.
Close
Close is a standard item that automatically appears on Parent/Child Browse forms. It closes
the form.
Delete
Delete is a standard item that can be added to Parent/Child Browse forms. Similar to the
Find/Browse form, the Parent/Child Browse form does the following.
This will not delete the child records of the node, if any, from the database. It
is your responsibility to delete them from the database.
Find
Find is a standard item that automatically appears on Parent/Child Browse forms. When
clicked by the user, it is the signal to the runtime engine to call the database and reload the
grid based on the selections in the Filter Fields and QBE columns.
602
1. Perform Event Rules: Button Clicked
2. If there no errors in any filter fields
• Begin Data Selection and Sequencing
• Perform Event Rules: Post Button Clicked
Copy
Copy is a standard item that can be added to Parent/Child Browse forms. There is no default
processing for copy on Parent/Child Browse forms. The forms work as user defined items. If
a form interconnection is placed on the Button Clicked event then the called form will open in
copy mode.
Add
Add is a standard item that can be added to Parent/Child forms. There is no default
processing for add on Parent/Child forms. The forms work as user defined items. If a form
interconnection is placed on the Button Clicked event then the called form will open in add
mode.
User-Defined Items
User-defined items are nonstandard items that you can add to Parent/Child forms to perform
specialized processing not handled by the standard items.
Default Flags
None of the form option flags are set by default.
Dialog Initialization
1. Initialize Thread Handling
2. Initialize Error Handling Process
3. Initialize Business View Columns
4. Initialize Form Controls
5. Initialize Static Text
6. Initialize Helps
7. Initialize Event Rules Structures
8. Create Toolbar
9. Load Form Interconnection data into corresponding business view columns. (Note:
Form controls and business view columns are sharing internal memory so copying
603
into the business view is effectively copying into the internal form control memory
locations.)
10. Perform Event Rules: Dialog is Initialized
11. If the No Fetch Form Business View is checked
• Perform Event Rules: Post Dialog is Initialized
12. If the form is in Add Mode
• Begin Clearing Dialog
13. If the form is in update mode and No Fetch Form Business View is checked
• Change mode to add mode
• Display the internal form control values to the screen
• Begin Clearing Dialog
14. If the form is in update mode and No Fetch Form Business View is not checked
• Begin Data Retrieval
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. The fetch is based on the information passed to the form through its form data
structure.
Clearing Dialog
1. If the form was called in Copy Mode
• Clear the key (primary index) controls that have the "Do Not Clear After Add" flag
unchecked
2. If the form was not called in Copy Mode
604
• Clear all form controls that have the "Do Not Clear After Add" flag unchecked
3. Perform Event Rules: Clear Screen Before Add
4. Perform Event Rules: Post Dialog is Initialized
Closing Form
1. Perform Event Rules: End Dialog
2. Load Form Interconnection data from corresponding business view columns, if any
3. Terminate Error Handling
4. Terminate Thread Handling
5. Terminate Helps
6. Free all structures for form, including structures for Business View Columns, Form
Controls, and Event Rules.
7. Destroy the window
Menu/Toolbar Items
The following is the process flow for the menu/toolbar items on a Fix/Inspect Form.
OK
OK is a standard item that is automatically placed on Fix/Inspect forms. It validates the
information on the form and updates or adds to the database through JDEKRNL function
calls.
605
9. If the form is in Update Mode
• If there were no errors attempting to update/add to the database
• Begin Closing Form
Cancel
Cancel is a standard item that is automatically placed on Fix/Inspect forms.
User-Defined Items
User-defined items are non-standard items that a developer can add to Fix/Inspect forms to
perform specialized processing not handled by the standard items.
Default Flags
No form option flags are automatically set for this form type. All form option flags can be
checked or unchecked by the application developer.
Dialog Initialization
1. Initialize Thread Handling
2. Initialize Error Handling Process
3. Initialize Business View Columns
4. Initialize Form Controls
5. Initialize Grid Fields
6. Initialize Static Text
7. Initialize Helps
8. Initialize Event Rules Structures
9. Create Toolbar
10. Load Form Interconnection data into corresponding business view columns and filter
fields, if any
11. Perform Event Rules: Dialog is Initialized
12. If the form option flag "No Fetch On Form Business View" is checked
• If the form is not in Add mode and was not entered with a Copy button
606
• Perform Event Rules: Post Dialog is Initialized
• Copy the Form Control values to the screen
13. If the form is in Update mode (note that this includes forms entered with a Copy
button)
• If the form option flag "No Fetch On Form Business View" is checked
• Begin Detail Data Selection and Sequencing
• If the form option flag "No Fetch On Form Business View" is unchecked
• Begin Header Data Retrieval
14. If the form is in Add Mode
• Begin Clearing Dialog
The data used for selection comes from filter fields, if any exist, or from the key business view
columns, if no filter fields exist.
1. If the form option flag "No Fetch On Grid Business View" is unchecked
• Select and Sequence
• Begin Data Retrieval
2. If the form option flag `No Fetch On Grid Business View' is checked
607
3. Begin Add Entry Row To Grid.
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. It will read one record at a time and for each record, perform the following
processing:
Clearing Dialog
1. If the form was called in Copy Mode
• Clear the key controls that have the "Do Not Clear After Add" flag unchecked
2. If the form was not called in Copy Mode
• Clear all form controls that have the "Do Not Clear After Add" flag unchecked
3. Perform Event Rules: Clear Screen Before Add
4. Delete any existing rows
5. Perform Event Rules: Post Dialog is Initialized
6. Begin Add Entry Row to Grid
Closing Form
1. Perform Event Rules: End Dialog
2. Load Form Interconnection data from corresponding business view columns, if any
3. Terminate Error Handling
4. Terminate Thread Handling
5. Terminate Helps
6. Free all structures for form, including structures for Business View Columns, Form
Controls, Grid Columns, and Event Rules.
7. Destroy the window
Menu/Toolbar Items
The following is the process flow for the menu/toolbar items on a Header Detail Form.
OK
OK is a standard item that is automatically placed on header detail forms. It validates the
information on the form and updates or adds to the database through JDEKRNL function
calls.
Perform Event Rules: Row is Exited and Changed - Inline for current row
Perform Event Rules: Row is Exited and Changed - Asynch for current row
609
• If the database delete has not been suppressed
a. Delete the record in the Business View from the database
b. Delete the grid row from the grid control
c. Perform Event Rules: Delete Grid Record from DB - After
6. Perform Event Rules: All Grid Recs Deleted from DB
7. If the form option flag `No Update On Form Business View' is unchecked
• If the form is in Add mode
• Perform Event Rules: Add Record to Database - Before
• If the database add has not been suppressed
Add the header business view record to the database
8. If the form option flag `No Update On Grid Business View' is unchecked
• For each grid row that was changed or added
• Clear the business view data structures
• Reset the original key values for this row in the business view data structures
• Copy grid data structures to the business view data structures
• Copy all non-filter database form controls to the business view data
structures
• Copy all equal filters to the business view data structures
• If form is in Add Mode
Perform Event Rules: Add Grid Rec to DB - Before
Add the record in the business view data structure to the database
Update the record in the business view data structure to the database
610
• If form is in Update Mode
• Perform Event Rules: All Grid Recs Updated to DB
9. Perform Event Rules: Post Button Clicked
10. If form is in Add Mode
• If form was called in Copy Mode or the flag `End Form On Add' is checked
• Begin Closing Form
• Else
• Begin Clearing Dialog
11. If the form is in Update Mode
• If there were no errors attempting to update/add to the database
• Begin Closing Form
Cancel
Cancel is a standard item that is automatically placed on header detail forms.
Delete
Delete is a standard item that can be added to Header Detail forms. The delete applies to the
grid record(s) selected. The actual delete from the database does not happen at this point, so
that if the user clicks cancel, the records are not deleted from the database. The delete
verification happens when the delete is pressed, and the actual database delete happens
when OK is pressed.
611
Find
Find is a standard item that can be added to header detail forms. When clicked by the user, it
is the signal to the runtime engine to call the database and reload the grid based on the
selections in the filter fields.
User-Defined Items
User-defined items are non-standard items that a developer can add to Header Detail forms
to perform specialized processing not handled by the standard items.
Default Flags
The following form option flags are automatically checked for Headerless Detail Forms and
should not be unchecked:
Dialog Initialization
1. Initialize Thread Handling
2. Initialize Error Handling Process
3. Initialize Business View Columns
4. Initialize Form Controls
5. Initialize Grid Fields
6. Initialize Static Text
7. Initialize Helps
8. Initialize Event Rules Structures
9. Create Toolbar
10. Load Form Interconnection data into corresponding business view columns and filter
fields, if any
11. Perform Event Rules: Dialog is Initialized
612
12. If the form is not in Add Mode
• If the form is not in Copy Mode
• Perform Event Rules: Post Dialog is Initialized (note that this event is run
immediately after Dialog is Initialized when in Update mode, so the FC
values are still at their NULL or zero value)
• If the grid option "Automatically Find on Entry" is checked
• Begin Data Selection and Sequencing
• If the grid option "Automatically Find on Entry" is unchecked
• Begin Add Entry Row to Grid
• If the form is in Add Mode
• Begin Clearing Dialog
The data used for selection is pulled from filter fields if any exist, or from the key business
view columns if there are no filter fields.
1. If the form option flag "No Fetch On Grid Business View" is unchecked
• Select and Sequence
• Begin Data Retrieval
2. If the form option flag "No Fetch On Grid Business View" is checked
• Begin Add Entry Row To Grid
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. It will read one record at a time and for each record, perform the following
processing:
613
The previous steps occur for each record read from the database. After all records have been
read, the runtime engine will then:
Clearing Dialog
1. If the form was called in Copy Mode
• Clear the key controls that have the "Do Not Clear After Add" flag unchecked
2. If the form was not called in Copy Mode
• Clear all form controls that have the "Do Not Clear After Add" flag unchecked
3. Perform Event Rules: Clear Screen Before Add
• Delete any existing grid rows
4. Perform Event Rules: Post Dialog is Initialized
• Begin Add Entry Row to Grid
Closing Form
1. Perform Event Rules: End Dialog
2. Load Form Interconnection data from corresponding business view columns, if any
3. Terminate Error Handling
4. Terminate Thread Handling
5. Terminate Helps
6. Free all structures for form, including structures for Business View Columns, Form
Controls, Grid Columns, and Event Rules
7. Destroy the window
Menu/Toolbar Items
The following is the process flow for the menu/toolbar items on a Headerless Detail Form.
614
OK
OK is a standard item that is automatically placed on Headerless Detail forms. It validates the
information on the form and updates or adds to the database through JDEKRNL function
calls.
Add the record in the business view data structure to the database
Update the record in the business view data structure to the database
Cancel
Cancel is a standard item that is automatically placed on Headerless Detail forms.
Delete
Delete is a standard item that can be added to Headerless Detail forms. The actual delete
from the database does not happen at this point, so that if the user clicks cancel, the records
are not deleted from the database. The delete verification happens when delete is pressed,
and the actual database delete happens when OK is pressed.
616
• If the record was read from the database
• Add this record to the delete stack (records to be deleted if the user presses
OK)
• Delete the grid row from the grid control
Find
Find is a standard item that can be added to Headerless Detail forms. When clicked by the
user, it is the signal to the runtime engine to call the database and reload the grid based on
the selections in the Filter Fields.
User-Defined Items
User-defined items are non-standard items that a developer can add to Headerless Detail
forms to perform specialized processing not handled by the standard items.
Important
Search/Select forms return only one value to the calling form, based on the dictionary alias. If
no data dictionary alias matches the value, the first value from the data structure will be
returned.
The following sections describe the processing flow of a Search/Select form type. A
Search/Select form should be attached as a visual assist only to data items that have the
same data type as the form data structure element.
Default Flags
No form option flags are automatically set for this form type, but application developers often
check the Grid option flag called Automatically Find on Entry. The only form option flag that
this form type affects is the No Fetch on Grid Business View flag. Checking any of the other
form option flags does not affect form processing.
Dialog Initialization
1. Initialize Thread Handling
2. Initialize Error Handling Process
3. Initialize Business View Columns
617
4. Initialize Form Controls
5. Initialize Grid Fields
6. Initialize Static Text
7. Initialize Helps
8. Initialize Event Rules Structures
9. Create Toolbar
10. Load Form Interconnection data into corresponding business view columns and filter
fields, if any
11. Perform Event Rules: Dialog is Initialized
12. Perform Event Rules: Post Dialog is Initialized
13. If the grid option "Automatically Find On Entry' is checked
• Begin Detail Data Selection and Sequencing
1. If the form option flag "No Fetch On Grid Business View" is unchecked
• Select and Sequence
• Begin Data Retrieval
Data Retrieval
A request is issued to the JDEKRNL, which performs the actual fetch of the data from the
database. It reads one record at a time, and, for each record, performs the following
processing:
618
• Remove the suppress grid line flag
The previous steps occur for each record read from the database. The following occurs only
once.
Clearing Dialog
Not done for this form type.
Closing Form
1. Perform Event Rules: End Dialog
2. Load Form Interconnection data from corresponding business view columns, if any
3. Terminate Error Handling
4. Terminate Helps
5. Free all structures for form, including structures for Business View Columns, Form
Controls, Grid Columns, and Event Rules
6. Destroy the window
Menu/Toolbar Items
The following is the process flow for the menu/toolbar items on a Search/Select Form.
Select
Select is a standard item that is automatically placed on Search/Select forms. It returns a
value to the form interconnection and closes the form.
1. Copy the selected grid row into the business view column
2. Perform Event Rules: Button Clicked
3. Perform Event Rules: Post Button Clicked
4. Begin Closing Form
Close
Close is a standard item that is automatically placed on Search/Select forms.
Find
Find is a standard item that can be added to Search/Select forms. When clicked by the user,
it is the signal to the runtime engine to call the database and reload the grid based on the
selections in the Filter Fields.
619
User-Defined Items
User-defined items are non-standard items that a developer can add to Search/Select forms
to perform specialized processing not handled by the standard buttons.
Dialog Initialization
1. Initialize Form Controls
2. Initialize Static Text
3. Initialize Helps
4. Initialize Event Rules Structures
5. Perform Event Rules: Dialog is Initialized
Closing Form
1. Terminate Helps
2. Free all structures for Controls and Event Rules
3. Destroy the window
Buttons
The form includes an OK button by default. Other options include Cancel, Yes, and No. All of
these buttons cause the dialog to close, and there is no other default processing.
Within the realm of database fields there is an added distinction between filter fields and non-
filter fields. Database fields are nonfilter fields by default. A filter field is used to alter the
selection criteria of a database fetch. A filter can have a comparison type of equal, not equal,
620
less than, less than or equal to, greater than, or greater than or equal to. A filter can be
marked so that a wildcard (*) displays when the filter is not included in the selection.
The actual storage for the value of the edit control is based on the type of the associated
dictionary item (such as numeric, string, character) and is distinct from the screen
representation of the value. An edit control is affected by the properties of the associated
dictionary item. For example, if an edit control is associated with a dictionary item of type
string with a length of thirty, that edit control will not allow more than thirty characters to be
typed into the field.
Disable Controls with this property appear gray and cannot be changed by the user. You can
use event rules to change the value of disabled fields. When a control is disabled, the
associated text (static text to the left) is also disabled. Controls do not have this
property by default.
Visible Controls with this property can be seen. Without this property the control cannot be
seen. You can use event rules to change the value of hidden controls.
Do not clear after This option applies only when a form is in add mode and the form is being cleared.
add Controls with this option retain their value. Controls do not have this option by default.
Required entry This option requires that a value is entered in the control before the record is saved
field (OK processing). This option does not accept either Null or blank. Controls do not
have this option by default.
Default cursor on This option specifies where the cursor will be placed in add/update mode. If multiple
add/update mode controls have this property on, you cannot predict which control will actually have the
cursor. Controls do not have this option by default.
No display if This option causes the control to be hidden when the Multicurrency Conversion is off.
currency is Off Controls do not have this option by default.
Control is Entered
1.Perform event rules: Control is Entered
On a Windows client, when a user presses the tab key or otherwise causes focus to move
from one control to another, the control that receives focus actually receives the Control is
Entered message before the control that loses focus receives the Control is Exited message.
Because this is a direct result of the sequence of Windows messages, it cannot be altered.
Control is Exited
1. If the focus is going to another window, stop processing. (Focus will return to this
control when this window again receives focus.)
2. Copy the text from the screen to the internal storage. (Conversion from string to the
appropriate type happens during this step.)
3. If this control is marked as a required entry field and does not contain a value, then
set the field in error.
621
4. Perform event rules: Control is Exited.
5. If this is the first time this control has been exited, or if this control has changed in
value since the last time the control was exited, then complete the following:
• Begin Control is Exited and Changed (Inline)
A grid can either be a browse grid or an update grid. You can use a browse grid for viewing
only, and cells cannot be selected individually. The Find/Browse form and the Search and
Select form have browse grids. You can use an update grid to add or update records. Cells in
an update grid can be selected individually. The Header Detail form and the Headerless
Detail form have update grids.
Grid controls can also have a Query By Example (QBE) line. The QBE columns have a one-
to-one correspondence with the grid columns. You use a QBE value to change the selection
criteria of a database fetch. Only database columns allow entry in the QBE columns because
622
the purpose of the QBE is to affect the select and only database columns are in the business
view. A QBE column can have one of the following comparison types:
• equal
• not equal
• less than
• less than or equal to
• greater than
• greater than or equal to
The comparison type is equal unless you specify otherwise. You can specify the comparison
type in the QBE column or by using system functions. You can use wildcards (* or %) for an
inexact search on a string field.
The values contained on a grid row act as a logical unit. You must validate a grid row prior to
accepting a record, but validating the individual columns is not required. Edit control
validation and grid row validation are parallel, but edit control validation and grid column
validation are not parallel. The Column is Exited events are executed only if the user
physically exits the cell. The Data Dictionary Validation for a cell executes when the cell is
exited after a change or the first time that the row is exited after it has been added. If you
change a cell programmatically, then the Row is Exited events execute prior to accepting a
record, but the column events and validation do not execute unless focus is physically set on
the column.
The vendor spreadsheet stores the grid cell values as a tab delimited string (one per row).
The values can be retrieved on a cell-by-cell basis or on a row-by-row basis. There is also
internal storage for the grid columns in the interactive engine. The actual storage for the grid
column value is based on the type of the associated dictionary item (for example, math
numeric, string, character), and it is distinct from the screen representation of the value. Only
one row of data can be acted upon at any given time. Each event executes in the context of a
specific row.
A grid column is affected by the properties of the associated dictionary item. For example, if a
grid column is associated with a dictionary item of type string with a length of 30, that grid
column will not allow more than 30 characters to be typed into the cell.
Grid Columns, and Query By Example (QBE) lines are discussed in separate flow
documents, but are an integrated portion of the grid. Grid Column link, QBE link.
Disable Grids with this property appear grey and cannot be changed by the user. The
application developer can change the value of disabled fields through ER. Grids do
not have this property by default.
Visible Grids with this property can be seen. Without this property, the grid cannot be seen.
The application developer can cause hidden grids to change value through ER.
623
Hide Query By Grids with this property do not have a QBE line. QBE is neither available to the user
Example nor the ER. Browse grids do not have this property by default. Update grids have this
property by default.
Update Mode This property is only available on update grids, but does not have any effect on the
grid during runtime.
Multiple Select This property allows for multiple grid rows to be selected at once. This can affect ER
execution and deleting. Grids do not have this option by default.
Automatically This option determines whether grid records will be fetched when the form is opened.
Find On Entry Grids without this option will open with no grid rows. Grids do not have this property by
default.
Auto Find On This option determines whether grid records will be fetched after a child form that has
Changes changed records closes. This option should be used only on forms that have no
modeless form interconnects. Grids do not have this property by default.
No Adds on This property applies to updates only. It determines whether an entry row appears in
Update Grid the grid. Without an entry row, records cannot be added. With this property turn on,
only existing records can be altered. (Records can be updated only). Grids do not
have this option by default.
Disable Page-At- This option causes all available grid records to be fetched when Find is pressed.
A-Time Without this option, only the first page of grid records is fetched until the user scrolls
Processing down to see additional records. Each time that more records are requested, a page of
data is returned. This provides a substantial performance benefit for large files and it is
not recommended that this option be checked without careful consideration. Grids do
not have this option by default.
Clear Grid After There is currently no reference to this field during runtime. Presence or absence of
Add this flag has no effect on the grid
Refresh Grid There is currently no reference to this field during runtime. Presence or absence of
After Update this flag has no effect on the grid
Process All Rows This option causes each row in the grid to perform the three Row is Exited events on
In Grid all the grid rows at least once before updating or adding the database records.
Row is Entered
1. Update the status bar with the current row number.
2. If this row is not the entry row (last row on update grids):
• Perform event rules: Row is entered
Row is Exited
If the form is not losing focus:
624
• If this is an update grid and the row has been changed since the last time the row was exited:
• Perform event rules: Row is Exited and changed - Inline
• If you are not leaving the grid (exiting one row, entering another):
• Attempt to execute Row is Exited and Changed (Asynchronous portion) on a
thread.
• If we are leaving the grid or the attempt to execute asynchronously was
unsuccessful:
• Begin Row is Exited and Changed (Asynchronous portion) as an inline function.
1. If this database item is also in the header portion of the form the grid column will be
populated from there, so skip this validation and go to the next grid cell.
Note
Filter fields are populated in the grid column only if they are equal filters.
2. If the text contained in the cell can be stored (no alphas in numerics, no out or range
data parameters):
• Begin Data Dictionary Validation for this cell.
• If there is an associated description column for this cell, populate it with the
information returned from Data Dictionary Validation.
1. Clear any errors set on this cell before calls to Row is Exited Validation and
Column is Exited events.
2. If the text contained in the cell can be stored (no alphas in numerics, no our of
range date parameters):
625
Key Pressed
On update grids when a key is pressed on the entry row (last row in the grid), a new row is
added to the grid.
626
Date Reference Scan
You can run date scan programs to search for date references in event rules or business
functions. This may be helpful if you wish to verify possible year 2000 issues.
The process to do this is the same as the business function scan, except that you use the
following objects.
• B9000080
627
• D9000080
• R9000080
When you run R9000080, the system creates two reports. One report has the number of date
references that the scan program detected.
628
The other report shows the date reference details.
The following illustration is an example of an event rule date reference detail report.
629
630