Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.
-
Upload
shona-welch -
Category
Documents
-
view
248 -
download
1
Transcript of Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.
Differences Training Differences Training BAAN IVc - BaanERP 5.0c: BAAN IVc - BaanERP 5.0c: DevelopmentDevelopment
BaanERP 5.0c Tools
Introduction Introduction
• Name
• Company / Position
• Knowledge BaanERP Tools
• Knowledge BAAN IV Tools Development Kit
• Experience Programming languages
• Expectations
Course ObjectivesCourse Objectives
Demonstrate knowledge / skills of:
• Software architecture
• Domains
• Table definitions
• Sessions
• Program Scripts
• Data Access Layer (DAL)
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Software ArchitectureSoftware Architecture
Bshell
Operating system
Hardware
user-interface driver
databasedriver RDBMS
Tools
---
Packages
td tf ti tp tt
Technical ArchitectureTechnical Architecture
Standard Program
BshellRDBMS
Data AccessLayer
UI - script
External Application
Common Data Access Server
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Session Structure - Session Structure - BaanERPBaanERP
ReportReport
report object
CompileCompile
0101110110
session object
StandardStandardSourceSource
CompileCompile
FormsForms
form dump
DumpDump
Prog.Prog.ScriptScript
CompileCompile
0101110110
4 GL object
Session Usage - Session Usage - 11
• Number of sessions in the Menu
Browser reduced
• Multi-occurrence overview session
• Subsessions for maintenance and
printing
• Synchronization
Session Usage - Session Usage - 22
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Creating a new application Creating a new application - - 11
• Create Design Environment
• New Package and Modules
• Package Combination
• Package VRC
• Create Data Model
• Create domains
• Create table definitions
• Create tables
Creating a new application Creating a new application - - 22
• Generate sessions
• Create menus
• Create Program Scripts
• Create Data Access Layers
Domains and Table DefinitionsDomains and Table Definitions
Table Definition
Table Fields
Domain: ppyesno yes/no
Datatype: EnumeratedConstants
12
yesno
YesNo
Domain: ppdsca description
Datatype: StringLength: 30Alignment: LeftConversion: No
Data Model - Data Model - Order Entry SystemOrder Entry System
Purchase Order Headers(oes022)
Countries(oes031)
Items(oes020)
Suppliers(oes021)
Purchase Order Lines(oes023)
Item Groups(oes030)
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Generate SessionsGenerate Sessions
InputInput Session CodeSession Code
Main Sess. ?Main Sess. ?Start OptionStart Option
Session TypeSession Type
Main TableMain Table
IndexIndexReport Attr.Report Attr.
Form Attr.Form Attr.Process:Process:Generate Session, Form, Report, ScriptGenerate Session, Form, Report, ScriptCompile and ConvertCompile and Convert
Output:Output:Run the SessionRun the Session
Session Generator Session Generator
Synchronized Sessions - Synchronized Sessions - ExampleExample
“General Item Data” table: “tcibd001”
Multi-occurrence display session:
tcibd0501m000
Single-occurrence maintenance session:
tcibd0101s000
Session Generator Conventions - Session Generator Conventions - Overview windowOverview window
• Multi Occurrence
• Display
• Main Session
• One Form Page, max 132 characters
• Window Type: List Window
• Start Option: 44 (Get Defaults)
• Form Type: 2
• Option Set: M.2.S
• Coding: kkmmms5vvm000
• Synchronized with single occurrence session
Session Generator Conventions - Session Generator Conventions - Details windowDetails window
• Single Occurrence
• Maintain
• Not Main Session
• Multiple Form Pages allowed, max 80 characters
• Window Type: Synchronized Dialog
• Start Option: 0 (None)
• Form Type: 1
• Option Set: S.Y.O
• Coding: kkmmms1vvs000
Session Generator Conventions - Session Generator Conventions - Multi Occurrence Edit SessionMulti Occurrence Edit Session
• Multi Occurrence
• Maintain
• Main Session
• One Form Page, max 80 characters
• Window Type: List window
• Start Option: 44 (Get Defaults)
• Form Type: 2
• Option Set: M.2.O
• Coding: kkmmms1vvm000
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Session Generator vs. Program Script Session Generator vs. Program Script
Session Generator
• Generates basic
functionality
Program Script
• Used to develop additional functionality
• BAAN C
• Event Oriented
• Compiled separately
ReportReport
CompileCompile
StandardStandardProgramProgram
CompileCompile
FormForm
DumpDump
ProgProg..ScriptScript
CompileCompile
0101110110
session objectform dump report object
0101110110
4 GL object
Program Script StructureProgram Script Structure
Sections without subsections
• Program sections
Sections with subsections
• Form sections
• Group sections
• Choice sections
• Field sections
• Zoom sections
• Main table sections (replaced by DAL)
Program Script - Program Script - ExampleExample
declaration:extern domain ppoes.pris stock.value
field.ppoes020.pris:when.field.changes:
stock.value = ppoes020.stck * ppoes020.prisdisplay(“stock.value”)
choice.first.view:after.choice:
execute(first.set)
Main sectionSub sectionSyntax
Changes in Program (UI) Script Changes in Program (UI) Script
• Group sections for dynamic forms
• Compiled separately
• No database actions
• main.table.io section skipped if DAL is
used
28
Changes in UI - Form CommandsChanges in UI - Form Commands
• Used to activate a• Session
• Menu
• Function
• Bind Type• Print• Form• Field
Changes in BAAN C Changes in BAAN C
• Various new functions for
• disabling fields
• query extensions
• session synchronization
• DAL actions
• etc.
• See Programmer’s Reference for details
SQL Query extensions SQL Query extensions
• Used to read fields from reference tables
• Only used if fields needed by script are not in the
form
• query.extend functions
• query.extend.select, query.extend.from,
query.extend.where
• Program script:
• before.program
• before.zoom
• DAL:
• before.open.object.set()
Differences Development Differences Development
• Technical Architecture
• Sessions
• Creating a new application
• Session Generator
• Program (UI) Script
• Data Access Layer script
Data Access Layer - Data Access Layer - OverviewOverview
Table tcmcs045
Table tcmcs0450101110110
tcmcs045
DAL
External Application
Common Data Access Server
session
Data Access Layer - Data Access Layer - FeaturesFeatures
• Linked to a table definition
• Logical integrity rules
• Database interaction
• DAL name = Table name
• Object hooks
• Property hooks
• BAAN C
• Compiled separately
TerminologyTerminology
Class
Object
Object Set
Property
Method
Hook
Table Definition
Record in a table
Table
Field in a record
Operation or function
Logic integrity rule; implemented in DAL
-
-
-
-
-
-
DAL HooksDAL Hooks
Object Hooks
• before.open.object.set()
• before.get.object()• after.get.object()
• before.destroy.object()• after.destroy.object()
• before.save.object()• after.save.object()
• after.commit.transaction()
• method.is.allowed()
Property Hooks
• <fieldname>.check()
DAL Hooks - DAL Hooks - ExampleExample
function extern long ppoes020.spri.check(long has_changed){
if ppoes020.spri < ppoes020.ppri then dal.set.error.message(”ppoes00001")return(DALHOOKERROR)
endifreturn(0)
}
function extern long before.destroy.object(){
if tdsls040.stat = tdsls.stat.invoiced thendal.set.error.message("tdsls44041")
return(DALHOOKERROR)endifreturn(0)
}
Data Access and Property MethodsData Access and Property Methods
Example:
dal.set.property("tdsls400", ttdsls400, "tdsls400.amnt", tdsls400.amnt + tdsls401.amnt, DAL_UPDATE)
dal.update("tdsls400", ttdsls400, ret, true, db.retry)
Data Access Methods
• dal.new()• dal.update()• dal.destroy()
Property Methods
• dal.set.property• dal.get.property.flag()
Non interactive database modifications Non interactive database modifications
• Business method • Programmed in the dal of the most relevant table• Activated from UI script or DAL• Activated by means of dal.start.business.method
Non interactive database modifications Non interactive database modifications - Example (1)- Example (1)
Purchase Order Headers(oes022)
Items(oes020)
Purchase Order Lines(oes023)
When a new order line is saved (table oes023), the Stock on Order field in the Items table (oes020) is updated automatically.
Example: The following order line is saved:Purchase Order: 105. Position: 20Item: 101010Ordered Quantity: 25
At the moment of saving this order line, automatically, the Stock on Order field (table oes020) for item 101010 is increased by 25.
Non interactive database modifications Non interactive database modifications - Example (2)- Example (2)
DAL Purchase Order Lines table (ppoes023):
function extern long after.save.object(long mode){
if mode = DAL_NEW then dal.start.business.method(”ppoes020",
”update.stock.on.order", ret,ppoes023.item,ppoes023.oqua)
endif
return(0)}
Non interactive database modifications Non interactive database modifications - Example (3)- Example (3)
DAL Items table (ppoes020):
function extern long update.stock.on.order( domain ppoes.item order.item, domain ppoes.quan order.quan )
{long ret
select ppoes020.ostk from ppoes020 for updatewhere poes020._index1 = {:order.item}selectdo
dal.set.property(”ppoes020", tppoes020, ”ppoes020.ostk", ppoes020.ostk + order.quan, DAL_UPDATE)
dal.update(”ppoes020", tppoes020, ret, true, db.retry)endselect
return(0)}
The EndThe End
Differences TrainingDifferences TrainingBAAN BAAN IVcIVc - - BaanERP BaanERP 5.0c: 5.0c:DevelopmentDevelopment
BaanERP 5.0c Tools