Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

42
Differences Training Differences Training BAAN IVc - BaanERP 5.0c: BAAN IVc - BaanERP 5.0c: Development Development BaanERP 5.0c Tools

Transcript of Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Page 1: 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

Page 2: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Introduction Introduction

• Name

• Company / Position

• Knowledge BaanERP Tools

• Knowledge BAAN IV Tools Development Kit

• Experience Programming languages

• Expectations

Page 3: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Course ObjectivesCourse Objectives

Demonstrate knowledge / skills of:

• Software architecture

• Domains

• Table definitions

• Sessions

• Program Scripts

• Data Access Layer (DAL)

Page 4: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 5: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Software ArchitectureSoftware Architecture

Bshell

Operating system

Hardware

user-interface driver

databasedriver RDBMS

Tools

---

Packages

td tf ti tp tt

Page 6: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Technical ArchitectureTechnical Architecture

Standard Program

BshellRDBMS

Data AccessLayer

UI - script

External Application

Common Data Access Server

Page 7: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 8: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 9: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Session Usage - Session Usage - 11

• Number of sessions in the Menu

Browser reduced

• Multi-occurrence overview session

• Subsessions for maintenance and

printing

• Synchronization

Page 10: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Session Usage - Session Usage - 22

Page 11: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 12: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 13: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Creating a new application Creating a new application - - 22

• Generate sessions

• Create menus

• Create Program Scripts

• Create Data Access Layers

Page 14: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 15: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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)

Page 16: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 17: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 18: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Session Generator Session Generator

Page 19: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Synchronized Sessions - Synchronized Sessions - ExampleExample

“General Item Data” table: “tcibd001”

Multi-occurrence display session:

tcibd0501m000

Single-occurrence maintenance session:

tcibd0101s000

Page 20: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 21: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 22: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 23: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 24: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 25: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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)

Page 26: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 27: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 28: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

28

Changes in UI - Form CommandsChanges in UI - Form Commands

• Used to activate a• Session

• Menu

• Function

• Bind Type• Print• Form• Field

Page 29: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 30: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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()

Page 31: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Differences Development Differences Development

• Technical Architecture

• Sessions

• Creating a new application

• Session Generator

• Program (UI) Script

• Data Access Layer script

Page 32: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

Data Access Layer - Data Access Layer - OverviewOverview

Table tcmcs045

Table tcmcs0450101110110

tcmcs045

DAL

External Application

Common Data Access Server

session

Page 33: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 34: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

-

-

-

-

-

-

Page 35: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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()

Page 36: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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)

}

Page 37: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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()

Page 38: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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

Page 39: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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.

Page 40: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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)}

Page 41: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

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)}

Page 42: Differences Training BAAN IVc - BaanERP 5.0c: Development BaanERP 5.0c Tools.

The EndThe End

Differences TrainingDifferences TrainingBAAN BAAN IVcIVc - - BaanERP BaanERP 5.0c: 5.0c:DevelopmentDevelopment

BaanERP 5.0c Tools