Program
Names
Lawson recommends the following program naming standards
for Lawson applications:
Each program should start with a two character "system
code". Lawson recommends using a system code as a standard,
but any identifying two character code will work. We recomend
creating a system code for use with your custom programs.
For example: Kastle Consulting will use "KC" as
a system code and as a naming standard.
After the two character code please use the following number
ranges for the next two or three characters of the program
code:
Range Description
01-99 Online entry and inquiry programs and forms.
Setup and maintenance programs have the lowest program numbers.
100-199 Batch update programs.
200-299 Batch report programs.
300-399 Special processing reports (for example, Year-End
Closing).
400-899 Additional batch report programs and conversion routines.
900-999 Special load programs and database administration
routines.
Some special programs do not follow the above numbering
scheme, but instead use a scheme that includes the two character
System Code and two more alphabetic characters. These programs
are usually Online programs that are set up to be used only
for "Invoking" from another application (See INVOKE
in Lawson documentation).
Additional Indexes
Lawson uses for format of "FilePrefix" + "SET"
+ number for the index names. I've always seen index XXXSET1
used as the "Primary" index for a file (although
there may be some cases where this is not true).
Lawson does not recomend any naming standards for additional
indexes. You should also check with your DBA to find out what
an additional index would do to the performance of your system.
I recomend using the same "FilePrefix" + "SET"
as the beginning of your new index, but the start the numbering
at 51. You can really start anywhere and name the index anything.
By naming the index using the same prefix as Lawson uses your
DBA will be happier and there will be less confusion when
writing and debugging programs.
An alternative to adding an index to a file could be to create
an Indexed Work File for your program. Load the work file
with only the records you need, then work with the index in
the work file. You could also define a sort for the program.
User Exits (UE)
In earlier versions of Lawson User Exits were not that easy
to work with.
Now they're not only easy, they're almost simple!
You can write a UE instead of making modifications to the
code and in some cases you can accomplish the same thing as
modifying the code and do it much faster.
Here's An Example
Let's say you want to add a few new fields to the BL02 (ShipTo)
screen and you want these fields to be updated in another
Lawson table. Here's how you'd do it:
First of all you will need to change BL02.scr to include
the additional fields (the UE can't handle this). Then copy
BL02PD to BL02EPD and copy BL02WS to BL02EWS (since we want
this to be an "Ending" UE.
Modify BL02EWS to only have WS fields that you need that
don't already exist in another WS. Modify BL02EPD, replacing
all "BL02S" with "BL02ES" and then change
the code to do exactly what you want it to do. Remember that
you have access to all the same variables that BL02 has in
each Screen section.
Compile to code. Enter: qcompile -u ProductLine SystemCode
BL02E and press enter.
Check for errors, fix them and compile it again.
For more information you should see the Application Developers
Workbench Standards Lawson Help file (787k) under the "Application
Programs" submenu.
|