PC12 Customizing 2022
PC12 Customizing 2022
PC12 Customizing 2022
Jan 2023
Prerequisites
• Knowledge of PROGRESS 4 GL
• Relational Database Experience
• Application Programming Experience
• Overview of QAD Enterprise Application
Topics
• Why customize QAD Enterprise Application
• Naming Conventions
• Environments
• Common Include Files
• Modifying QAD Enterprise Application
• Program Templates
• Compiling Code and Installing
Why Customize QAD Enterprise Application
• Business Needs
• Risks
Business Needs
• New Reports are needs
• Additional functionality needed
• Interfaces to other applications
05/06/03
• --------------------------------------------------------------------------------
• | Order Date:• Price List: Release to Corp: | p
-------------------------------------------------------------------------------
• | Required Date:• | Sales Order:
Site: Confirmed: To: | |
• | Promise Date: • | Sold-To:
Channel: Currency: To:
Language: | |
• | Due Date:• | Order Date:
Project: / / Taxable: To: / / | |
• |Purchase Order:• | Salespsn: To:
Credit Terms: | |
• |Salesperson[1]:• |Purchase Order: Credit:
Mult: To:
Freight List: | |
• | Commission[1]:• | ActionG/L
Status:
Entity: To:
Allocations: | |
• | Remarks:• | Quote: To:
Comments: | |
• • |
-------------------------------------------------------------------------------- |
• .p
•
•
|Currency (Blank for All): Base
|
|
|
• • 4-End
F1-Go 2-Hlp 3-Ins | 6-Mnu 7-Rcl 8-Clr 9-Prev 10-Next 11-Buf |
Module + Function + Screen
•
•
|
|
Include Allocated: yes
Include Picked: yes
Display Features and Options: no
Display Comments: no
|
|
•
Name length is not more than 8 characters.
•
| Include Shipped: yes
| Include Unprocessed: yes Output:
|
|
• | Batch ID: |
• F1-Go 2-Hlp 3-Ins 4-End 6-Mnu 7-Rcl 8-Clr 9-Prev 10-Next 11-Buf
- ( For portability purpose)
• -------------------------------------------------------------------------------
.i
prefix + function
Module
Screen
mt
rp
iq
br
Screen
• Maintenance mt
• Inquiry iq
• Report rp
• Control File pm
• Archive/Delete up
• Power Browse br
• Lookup Browse lu
Database Files
• Name = Prefix + “_” + Subfix
• File : Module_Data
• Field : Module_Function
• Index : Module_Function[_Function…]
Data
• Control Data ctrl
• Static Data mstr
• Transaction Data mstr, det
• Historical Data hist
• Work File wkfl
Ex. Files
Ex. Fields
Operational New Financials
• cm_mstr ▪ Debtor
- cm_domain – Debtor_ID
- cm_addr – DebtorCode
- cm_type – BusinessRelation_ID
- cm_active – DebtorIsActive
• ad_mstr ▪ Address
- ad_domain – Address_ID
- ad_addr – AddressName
- ad_name – BusinessRelation_ID
- ad_address_id – AddressType_ID
- ad_bus_relation
Changing Standard Source File Names
• Renaming a customized version of a
standard QAD Enterprise Application
program file
• sosomt.p • x1sosomt.p
• .i • .i
• prefix + function • a + n + standard filename
• solinfrm.i • x1solnfr.i
• .v • .v
• prefix + function • a + n + standard filename
• gpsite.v • x1gpsite.v
New Custom Source File Names
• .p
• a + n+ module + function
• x1dwmt.p
• .i
• a + n+ module + function
• x1trfrm.i
• .v
• a + n+ module + function
• x1trnbr.v
Naming Conventions - Customization
• Use “xx” prefix
- xx, x0 – x9
• Program Name
- Custom Prefix + Function + Screen
QAD : sosomt.p
Customize: xxsosomt.p (or x0 thru x9)
• Database
- Custom Prefix + Module + Data
QAD : pt_mstr
Customize: xxpt_mstr (or x0 thru x9)
Environment
• Directory Structure
• File Type
• Database
• Environment Variables and Commands
Directory Structure
/qond/apps/mfgpro/dist
• fin
- customcode/*.r
• ict
- us/??/*.[ri]
• ict-customizations
• mfg
- us/??/*.[ri]
• mfg-customizations
- us/xx/*.[ri]
• pro
- com/qad/shell/report/reports/*.[prixml]
24
Directory Structure (Custom)
/qond/apps/mfgpro/customizations
• fin
- customcode/*.p
• fin/work
- customcode/*.p
• mfg
- default/src/us/??/*.[pi]
- work/src/us/??/*.[pi]
• pro
- com/qad/shell/report/reports/*.[pixml]
• pro-work
- com/qad/shell/report/reports/*.[pixml]
• schema
- custom/*.df
25
File Type
• Object Code .r
• Databases .db, .bi, .lg
• Database Definitions .df
• Source Code (including encrypted) .p, .i, .v, .w, .t
• Data Files for Databases .d
• Files for PROGRESS Results .p, .i, .f
• Scripts, .bat DB Name (Unix) , bat (DOS)
• Database Dump & Load Procedures .r
• Bulk Load Description .fd
File Name Extension
.p Source Code Files
.i Include Files
.t Schema Trigger Files
.w Source Code Files Created in the UIB
.v Validation Routines
.r Executable Files
.st Multi-Volume Database Structure
.db Database Extent Directory
.d1/.d2 Database Data Extents
.bi Database Before-Image File
.lg Database Log File
.lk Database Lock File
.d Data Files
.df Database Definition Files
.fd Database Bulkload File
QAD Enterprise Application Database
• Database Components
• Database Definition
• Files Relationship
• Database Associations
Database Components
• Dictionary
• .db •
•
Data
Indexes
• mfg.lg •
•
logout
PROGRESS
• Errors and
• .lg activity
• Created when
database is in use.
https://documentlibrary.qad.com/documents/2370665/368290012/DatabaseDefinitions_TR_v2022EE.pdf
Database Definition
https://documentlibrary.qad.com/documents/2370665/368290012/DatabaseDefinitions_TR_v2022EE.pdf
Definition File
code_mst.df
ADD FIELD "code_fldname" OF "code_mstr" AS character
DESCRIPTION "The field for which this data applies."
FORMAT "x(32)"
INITIAL ""
LABEL "Field Name"
POSITION 2
MAX-WIDTH 80
ORDER 10
https://documentlibrary.qad.com/documents/2370665/368290012/EntityDiagrams_TR_v2022EE.pdf
File Relationship (Financial)
https://documentlibrary.qad.com/documents/2370665/368290012/EntityDiagrams_TR_v2022EE.pdf
Database Associations
• Logical name
• CRC
Logical Name
• Database reference
• Default is the physical database name
• Stored in the object code (.r) any
procedures that reference that database
• Used to resolve database references
[db name].[file name].[field name]
sosomt.r
Logical Database Name at Excution
Standard QAD Enterprise Application Logical
Name
• QAD EA Database mfgdb
• Help database hlpdb
• Admin Database admdb
• Customization Database custdb
CRC
• Cyclic Redundancy Check (CRC)
• Relevant schema attributes are stored in the
.r for comparison at execution time
CRC Check
• CRC in program must be the same as CRC
in database
• Progress checks CRC while running the
program
• Modify database definition cause CRC
change
- The program must be recompiled
CRC Components
• Files
- file-name, db-lang
• Field
- Field-name, data-type, dtype, sys-field, field-rpos,
decimals, order, extent, fld-stdtype, fld-stlen,
fld-stoff, fld-case
• Index
- Index-name, unique, num-comp, index-num
• Index-Field
- Field-name, ascending, abbreviate, unsorted
Lab #1.1 : Naming Convention
❑ By program name, Guess it’s function
▪ apvomt.p _______________________
▪ sosoiq.p _______________________
▪ icunis.p _______________________
❑ Screen type
▪ mt ________________________
▪ iq _________________________
▪ rp _________________________
▪ pm ________________________
▪ up ________________________
▪ br ________________________
Lab #1.2 : Naming Convention
❑ Data type
▪ mstr ________________________
▪ det _________________________
▪ ctrl _________________________
▪ hist ________________________
▪ wkfl ________________________
❑ Guess
▪ File : pod_det = ________________
▪ Field : Item code in Sales order detail
• _________________________
▪ Field : Item code in Purchase order detail
• _________________________
Customizing Environment
• Working Directory
• Propath
• PROGRESS Editor
• QAD Enterprise Application Release
Working Directory
• Store of your custom code
- /home/<userid>/<ticket number>
• us/xx/*.p
• reports/*.p
• custom/*.df
• QAD_Layouts/*.xml
Propath
• List of Directories
- PROGRESS searches when attempting to find
procedure files
• Default directories searched
Propath Setting
• Environment variable in start-up script
PROPATH=:dir1:dir2:…
export PROPATH
Example:
$ more /qond/apps/mfgpro/dist/mfg/version.mfg
"Release eB3 SP21 as of Jun 28 2021"
06/28/21
This line is no longer being used.
"QAD Enterprise Applications 2021 - Enterprise
Edition as of Jun 28 2021"
Revision Control
• Engineering Change Order
• Procedure Header
(when procedure filename has changed)
• Revision Log
Engineering Change Order (ECO)
• Reflects a functional unit
• Example: E-mail capability
• ECO number or patch number
- GTSCS or CVC ticket number (CVC0362)
Original Procedure Header
Revision Level
Using the ECO method
Comments
• Comments in source code are specified as
/* comments */
• Anything within markers is not active code
How to Modify QAD Enterprise Application
Programs
• Points to remember
- Define your program prefix code – ‘xx’
- Change source name, do not modify on
standard source
- Design your patch update code
- Put your patch update code
- Put your patch update code into the beginning
of every line you modify
- Comment unused code, do not delete them
- Work in development environment
- When finish ticket to promote in next environment
Step to Setup Customized Environmemt
• Create working directory
- /home/<userid>/<ticket number>/us/xx/*.p
• Modify/Customize your job in working
directory
• Use CVC tools to compile your programs
• Create Menu/Permission
Modifying QAD Enterprise Application
• Points to remember
- Change source name, do not modify on
standard source
- Design your patch update code
- Put your patch update code into the beginning
of every line you modify
- Comment un-used code, do not delete them
Lab #2.1: Custom Programming
❑ Program: Item Data Report (ppptrp11.p)
(1) Add 2 new criteria “Item Group” and
“Added”
(2) Extend format of “Description” to 48x
(3) Remove column “Design Group” and
“Size” in report
QAD Enterprise Application Common Routine
• Menu Structure
• Messages
• Printer Selection
• Batch Control
• Generalized Codes
• Others
Menu Function
• 36.4.4.1 Menu System Maintenance
Menu Function
• 36.3.6.5 Role Permissions Maintain
Menu Function: Files
Menu Function: Primary Fields
Messages Function
• 36.4.6.1 Message Maintenance
Messages Function : Primary Fields
• msg_lang Language Code
• msg_nbrMessage Number Assigned
- >>>9 format
• msg_desc Message itself
Messages Function : Access
• pxmsg.i
- &MSGNUM= Message Number Assigned
- &ERRORLEVEL= Error Level (1 thru 4)
- &MSGARG1= Optional. An argument which will be substituted.
- &CONFIRM= Optional. Indicates this is a confirmation message.
Example:
{us/bbi/pxmsg.i &MSGNUM=1 &ERRORLEVEL=1}
Adding new record
{us/bbi/pxmsg.i &MSGNUM=1 &ERRORLEVEL=2}
WARNING: ADDING NEW RECORD.
{us/bbi/pxmsg.i &MSGNUM=1 &ERRORLEVEL=3}
ERROR: ADDING NEW RECORD. Please re-enter.
{us/bbi/pxmsg.i &MSGNUM=1 &ERRORLEVEL=4}
ERROR: ADDING NEW RECORD.
Messages Function : Access
• pxmsg.i
- &MSGNUM= Message Number Assigned
- &ERRORLEVEL= Error Level (1 thru 4)
- &MSGARG1= Optional. An argument which will be substituted.
- &CONFIRM= Optional. Indicates this is a confirmation message.
Example:
define variable yn as logi.
{us/bbi/pxmsg.i &MSGNUM=11 &ERRORLEVEL=1 &CONFIRM=yn}
prd_dev prd_type
prd_path
Printer Function : Files
Printer Function : Access
• mfselprt.i
{1} default device type “terminal” or “printer”
{2} width 80 or 132
Optional Parameters :
{3} “nopage” for printing checks or labels
{4} stream name (also included in mfrtrail.i)
{5} “append” for disk files
bcd_batch
bcd_userid
bcd_exec
bcd_parm
bcd_dev
Batch Processing Function : Files
Batch Processing Function : Primary Fields
Batch Processing Function : Access
• mfselbpr.i
{1} default device “terminal” or “printer”
{2} width 80 or 132
Optional parameters :
{3} “nopage”
{4} stream name
{5} “append”
Batch Processing Function : Access
• gpselout.i
- This file is a merge version of the following files
- mfselprt.i
- mfselbpr.i
• Purpose
- Allows selection of an output destination
- Validates the selected output destination
- Calls gpprsout.i to process output to the selected
destination
Batch Processing Function : gpselout.i
Code
/*ACCEPT PRINTER INFORMATION*/
/* {us/mf/mfselbpr.i "printer" "80"} */
/*CALL GENERIC DESTINATION SELECTION INCLUDE SPECIFYING THAT THE
VARIABLES batch_id AND dev SHOULD NOT BE DEFINED AS THEY HAVE
ALREADY BEEN DEFINED WITH A CALL TO mfsprtdf.i AT THE BEGINNING OF THIS
FILE. */
{us/gp/gpselout.i &printType = "printer"
&printWidth = 80
&pagedFlag = " "
&stream = " "
&appendToFile = " "
&streamedOutputToFile = " "
&withBatchOption = "yes"
&displayStatementType = 1
&withCancelMessage = "yes"
&pageBottomMargin = 6
&withEmail = "yes"
&withWinprint = "yes"
&defineVariables = "yes"}
............report code ..............
{us/bbi/mfreset.i}
Batch Processing Function : Access
• mfquoter.i
- After data statement of selection criteria
- Assigns global bcdparm variable double quotes
for quotation marks
Batch Processing Function : Access
• gpquote.p
- After data statement of selection criteria
- Assigns global bcdparm variable double quotes
for quotation marks
- Limit 20 passed parameter report criteria
variables
- All parameters must be string data type and
number of parameter must be 20. If report criteria
variables are less than 20, the remaining
parameter must be hard code to “null_char”
- replace mfquoter.i
Batch Processing Function : Example
ppptrp.p
bcdparm = "".
{us/mf/mfquoter.i line }
{us/mf/mfquoter.i line1 }
{us/mf/mfquoter.i part }
{us/mf/mfquoter.i part1 }
{us/mf/mfquoter.i type }
{us/mf/mfquoter.i type1 }
{us/mf/mfquoter.i ptgroup}
{us/mf/mfquoter.i group1 }
{us/mf/mfquoter.i added }
{us/mf/mfquoter.i added1 }
{us/mf/mfquoter.i cmmts }
{us/mf/mfquoter.i et_report_curr}
Batch Processing Function : Example
ppptrp22.p
{us/bbi/gprun.i ""gpquote.p"" "(input-output bcdparm,
20,
site,
site1,
line,
line1,
part,
part1,
abc,
abc1,
loc,
loc1,
stat,
stat1,
ptstat,
ptstat1,
string(date1),
string(avguse_yn),
costset,
string(summary),
string(inclfirm),
string(inclplanned))"}
t001.i
• {us/t0/t001.i} equal with ‘To’
• Example:
form
line colon 15
line1 label {us/t0/t001.i} colon 45 skip
Drill Down/Lookup Functions
• 36.4.8.1 Drill-Down/Lookup Maitenance
Generalized Code Function
• 36.2.13 Generalized Codes Maintenance
Generalized Code Function : Primary Fields
Generalized Code Function : Customization
• Use code_mstr for a one-to-one relationship
• Utilize “xx” prefix for code_fldname for
version control
Common Include Files
▪ mfdtitle.i Global Variables & Revision
▪ mfdeclre.i Global Variables
▪ gprun.i Subroutine Execution
▪ mfselprt.i Printer Selection
▪ mfselbpr.i Printer with Batch Option
▪ gpselout.I Printer Selection (Merge Version)
▪ mfmsg.i Message Display
▪ window*.i Window Help
▪ mfnp.i Next / Previous Function
▪ mfphead.iReport Header
▪ mfrtrail.i Report Trailer
▪ mfrpexit.i Report End
▪ mfreset.i Inquiry_End
mf.p
• Creates alias qaddb for ldbname[1]
- logical qaddb was used at compilation
• Defines global variables
• Sets User Language Code
• Welcome screen
• Security
• Connect all available databases
- mgdcinit.p
• Primary general ledger entity
• Other start-up tasks
mfdtitle.i
• mfdtitle.i displays the title line at the top of the screen which
includes
- Program name
- Revision level
- Menu selection
- Date
Example
{us/bbi/mfdeclre.i &NOSHARED} - TO SUPPRESS THE SHARED VARIABLES
{us/bbi/mfdeclre.i "NEW"} - TO DEFINE NEW SHARED VARIABLES
{us/bbi/mfdeclre.i} - TO DEFINE SHARED VARIABLES
mfdeclre.i (2 of 2)
• Just as mfdtitle.i must be included in all main
programs, mfdeclre.i should be included in
all subprograms
- mfdeclre.i need not be included in a main
program because it is included within mfdtitle.i
itself
- Can replace with mfglobal.i for a smaller subset
of the global variable definition contained in
mfdeclre.i
For example
arparp.p {us/mf/mfdtitle.i}
arparpa.p {us/bbi/mfdeclre.i}
Limits
• hi_char = chr (255)
• hi_date = 12/31/3999
• low_date = 01/01/1900
Limits
• Use for report range selection - all
ppptrp.p
form
line colon 15
line1 label {us/t0/t001.i} colon 49 skip
added colon15
added1 lable {us/t0/t001.i} colon 49 skip
with frame a side-labels width 80.
update line line1 part part1.
if line1 = ““ then line1 = hi_char.
if added = ? then added = low_date.
if added1 = ? Then added1 = hi_date.
gprun.i
• Input Parameters
{1} Program Name
{2} Optional Parameter to pass the program
{3} Optional [ PERSISTENT [set handle] ] parameter
for Progress v7
Example:
Example:
{us/gp/gprunp.i "mcpl" "p" "mc-chk-valid-curr"
"(input et_report_curr, output mc-error-number)"}
gprunpdf.i
• Input Parameters
{1} External procedure name only w/o extension
{2} External procedure file extension (usually “p”)
• Description
This file defines variables used for running a persistent procedure via
gprunp.i.
• Example
{us/gp/gprunpdf.i "mcpl" "p"}
Example:
{us/gp/gprunpdf.i "mcpl" "p"}
{us/gp/gprunpdf.i "mcui" "p"}
• Note
Put this include file before repeat loop if you want to showing
report on the web.
• Example
{us/wb/wbrp01.i}
repeat:
wbrp04.i
• Input Parameters
{1} Optional (Input frame)
• Description
Report include file for web-enablement. Procedures to get the
handle of the input frame (frame a) and the main output
frame, used in Web processing. These procedures have to be
at the bottom of the program, because the frames may not
be defined until late in the program.
• Example
{us/wb/wbrp04.i &frame-spec = a}
wbrp06.i
• Description
Report include file for web-enablement. Handles incoming
selection criteria, and starts the appropriate replies when in
web mode.
• Syntax
{us/wb/wbrp06.i &command = … &field = … &frm = ..}
• Input Parameters:
&command should be “update”
&field variable set in criteria screen within quote
&frm input frame name such as “a”
• Example
{us/wb/wbrp06.i &command = update &fields = "line line1 part part1"
&frm = "a”}
mfphead.i
• Finds tables ls_mstr & ad_mstr for company
title
- where ls_addr = “~report” and ls_type =
“company”
• View 132 column standard form header
Example:
{us/bbi/mfphead.i}
or {us/bbi/mfphead.i "stream rport" "(rport)"}
mfrtrail.i
mfrtrail.i
• Displays 132 column report criteria
• Closes output stream
• Executes reset command
- prd_rset_pro
mfrtl080.i
• Displays 80 column report criteria
mfrpchk.i
• Executes maximum page limit
- prd_max_page
Example
{us/mf/mfrpchk.i &loop="soloop"}
or {us/mf/mfrpchk.i}
mfrpexit.i
• Shows “Report Terminated”
{1} “false” Do not display message
Example
{us/mf/mfrpexit.i "false"}
Note:
Put this include file anywhere in FOR Each Loop
when retrieving record take long time and allow
user to terminate report.
mfreset.i
• Executes scrolled output
- prd_scoll_only
• Closes output stream
• Executes printer reset command if selected
- prd_rset_pro
Status Line
• Present uniform function key usage to the
user
• stline[2] = “F1-Go 2-Hlp 3-Ins 4-End 5-Delete 6-Mnu 7-Rcl 8-Clr 11-Buf”
• Do:
pause 0.
• Don’t:
pause 0 before-hide.
Definition and Acceptable Values for Logical
Variables
Correct:
• Report Program
• Inquiry Program
• Maintenance Program
The Report Template
{us/mf/mfdtitle.i “..” }
form definition [selection criteria]
{us/wb/wbrp01.i}
repeat :
data statements [selection criteria]
{us/wb/wbrp06.i …}
{us/mf/mfquoter.i [selection criteria]} or {us/bbi/gprun.i “”gpquote.p””}
{us/gp/gpselout.i &printType = "printer“…..}
{us/bbi/mfphead.i} or {us/bbi/mfphead2.i}
for each...
display
{us/mf/mfrpchk.i} or {us/mf/mfrpexit.i}
end.
Example
Form
part colon 20
part1 label {us/t0/t001.i} colon 45
with frame a width 80 side-label.
Reports – Mandated Program Structure
Every report program must:
• Use mfrpchk.i in all programs
- mfrpchk.i cannot exist within the same block
level as mfreset.i, mfrtrail.i, or mftrl080.i
The Inquiry Template
{us/mf/mfdtitle.i “..”}
form definition [selection criteria]
{us/wb/wbrp01.i}
repeat :
data statements [selection criteria]
{us/mf/mfnp.i …..}
{us/wb/wbrp06.i …}
{us/mf/mfselprt.i “terminal” 80}
/* ADD/MODIFY/DELETE SECTION */
Explained on next
slide
END. /* MAINLOOP */
STATUS INPUT.
Maintenance Program Template (2 of 3)
Add/Modify/Delete Section
/*ADD/MODIFY/DELETE*/
FIND table1 WHERE key1 = … NO-LOCK NO-ERROR.
IF NOT AVAILABLE table1 THEN DO:
{us/bbi/mfmsg.i 1 1} /* ADDING NEW RECORD */ If the record is not
Create New Record. found, create it!
END.
Ststatus = stline[2].
STATUS INPUT ststatus.
DISPLAY fields.
Setloop: ON ENDKEY UNDO blockx, RETRY blocky: Update status
SET fields… GO-ON (F5 CTRL-D).
line and display
If LASTKEY = KEYCODE(F5) OR ... /*DELETE*/:
del_yn = YES. fields
{us/bbi/mfmsg01.i 11 1 del_yn}
IF del_yn = YES THEN DO:
DELETE table1. NEXT mainloop.
END.
END.
VALIDATIONS ...
END. /* SETLOOP */
The Maintenance Template (3 of 3)
{us/mf/mfdtitle.i “..”}
define variables
form with frame a
mainloop :
repeat :
prompt-for..editing :
{us/mf/mfnp.i}
end.
ADD/MOD/DELETE
find..
if not available..
{us/bbi/mfmsg.i 1 1}
create..
assign..
end.
status-stline[2]
update … go-on (F5 or CTRL-D)
if F5 or CTRL-D then do :
del-yn=yes
{us/mf/mfmsg01.i 11 1 del-yn}
...if del-yn then delete
end.
end.
status input.
QAD .NET UI
FOR EACH…
DISPLAY…
{us/mf/mfrpchk.i}
END.
{us/bbi/mfreset.i} Every inquiry program must follow
END. this structure
QAD .NET UI : Sample Report Program
/* Sample Report Program */
REPEAT:
IF c-application-mode <> “web”:U THEN
[Get selection criteria (update, set or prompt-for)]
{us/wb/wbrp06.i &command=[update,set, or prompt-for]
&fields= “[Selection criteria separated by a space] ”
&frm= “[Frame name]”}
[Assign variable from selection criteria]
{us/mf/mfquoter.i [selection criteria]} /*if batch runable*/
{us/mf/mfselprt.i terminal 132}
{us/bbi/mfphead.i}
FOR EACH ...
DISPLAY ...
{us/mf/mfrpchk.i}
END.
{us/mf/mfrtrail.i}
END.
Every report program must follow
this structure
QAD .NET UI : Another Sample Report
/* Sample Inquiry Program */
{us/wb/wbrp01.i}
REPEAT:
IF c-application-mode <> “web”:U THEN
[Get selection criteria(update, set or prompt-for)]
{us/wb/wbrp06.i &command=[update,set, or prompt-for]
&fields=“[Selection criteria]”
&frm=“[Frame name]”}
IF (c-application-mode <> 'web':u) OR
(c-application-mode = 'web':u AND
(c-web-request begins 'data':u)) THEN DO:
[Assign variable from selection criteria]
{us/mf/mfquoter.i [selection criteria]}
END.
{us/mf/mfselbpr.i terminal 132}
{us/bbi/mfphead.i}
FOR EACH…
DISPLAY…
{us/mf/mfrpchk.i}
END.
{us/bbi/mfreset.i}
END.
*** Notes *** Please contact QAD I&I before using user fields and
file.
User Fields Naming Conventions
Example
• pt_mstr
- pt__chr01 thru pt__chr10
• format x(8)
- pt__dec01 and pt__dec02
• format >>>,>>>,>>9.99
- pt__log01 and pt__log02
• yes/no
usrw_charfld[15] x(8)
usrw_ datefld[4] 99/99/99
usrw_decfld[15] ->>, >>9.99 10
usrw_key1 x(8)
usrw_key2 x(8)
usrw_key3 x(8)
usrw_key4 x(8)
usrw_key5 x(8)
usrw_key6 x(8)
usrw_user1 x(8)
usrw_user2 x(8)
usrw__qadc01 x(8)
Note:
Think of code_mstr how it fit your requirement before
you create new table.
Setup Validation in Database
code_mstr
• Utilize for custom one-to-one relationship
• Cannot be used if standard product
validation
- PROGRESS Data Dictionary validation
• Example
- create code_mstr.
- code_fldname = “pt_part”.
- code_value = item number.
- code_cmmt = alt-item number.
Example Extra File on Side Database
• xxpt_mstr (Extra information for item
master)
- xxpt_part (key field)
- xxpt_user1
- xxpt_user2
- xxpt_user3
- ...
• Files Relationship
xxpt_mstr
pt_mstr
Extra Info.
Item Master
Item Master xxpt_part=pt_part
Record Locks
Report & Inquiry Programs
▪ Always Specify “NO-LOCK” Type for Report & Inquiry
▪ Ex.
For each pt_mstr no-lock.
.......
.......
End.
Q&A