Modifying Function Code Output
OLE DB Object Services attempts to make reasonable assumptions when dealing with a Lawson ERP application through a form based rowset, but also allows the consumer to override these assumptions to gain better control of the consumer application.
You might need to use the override capabilities when handling output from function codes (FC) that appear on Lawson application forms. Many Lawson ERP applications use a function code to determine what actions will be applied to data. With OLE DB Object Services, you can control the output for some of these actions through a set of command properties for form queries.
In the command properties for a form query, you can specify how to indicate end of set and/or success for Inquire, Next, Add, Change, and Delete function codes (FC).
To add or change status for any of these options, type the correct codes separated by | (vertical line character) in the spaces provided.
You maintain Lawson error messages through the Message Definition utility (msgmnt). If you are unfamiliar with this utility, see the Doc for Developers: Application Development Workbench (UNIX and Windows) or System Utilities Reference Guide (UNIX, Windows, and IBM i).
Following is an example to explain why you might want to use one of the options on the Function Code Properties dialog box.
Example:
The HR11.1 form returns a status 108 as a warning that the person's salary has gone over a defined limit; however, a change to the person's salary has been successfully applied by a Lawson application. Because OLE DB Object Services adheres to the defined limit unless you specify differently, you must override the status in order to avoid the warning.
To implement a change, you can by specify the Success Statuses on the Change Command to include 108 as a successful status for the application as shown in the following form clip.
The code that would be generated is shown below.
ags:_TKN=HR11.1&FC=I&EMP-COMPANY=122&EMP-EMPLOYEE=1&_CHGSTAT=000|108
When you initialize a rowset with a form query string, you must specify the function code (FC) value for the Inquire or Next class if you want the rowset to be loaded with information from Lawson. If you want an empty rowset in order to insert new records into the Lawson application, you can omit the FC field from the form query string.
To modify function code output
- Define the basic form query.
- Right-click in the Properties view of the query and select Command Properties.
- Expand the Active Command Properties.
- Right-click on the function code command property you want to modify and select Edit Property Value.
- Type a new value, press Enter, and click OK.