190 likes | 334 Views
MINS298c ABAP/4 Programming. Gail Corbitt Fall 1998 Chapter 1-3. Chapters 1-3. Some Key Features Repository Concept (development workbench) Beginning Program. Key Features. Advanced Business Application Program Multi language Interpretive Language Event Driven Reusability
E N D
MINS298cABAP/4 Programming Gail Corbitt Fall 1998 Chapter 1-3
Chapters 1-3 • Some Key Features • Repository Concept • (development workbench) • Beginning Program
Key Features • Advanced Business Application Program • Multi language • Interpretive Language • Event Driven • Reusability • Data Objects • Subroutines (which are called ??? in ABAP)
Multi-Language • Documentation • Titles & Headers • Text Symbols • Selection Text • Text Fields • Message Texts
Re-usability • Patterns • Subroutines • Data Objects • Structures
Repository Concept Data Models Dictionary Types Table Structures Programs Screens Functions Patterns More... Users Developers
Repository Concept Developer Group 1 Users Developer Group 2
Program • A Program has: • Source code • Text elements • title • selection text • text symbols • Variants • Attribute • Documentation
A Program Text elements Variants Repository Attributes Type Source Code Status Application Title Dev. Class
Attributes (For now) • Program Name Convention • ZZ##EX** • ## is your assigned number • ** is assignment number • Program Type • 1 (one) : Interactive • Development Class • $TMP • Local Object
Editor for Source Code • Two ways to get there • editor • Object Browser • Three editor modes • command • pc • pc with line numbering
Basic Language Constructs • Reserved or Key words such as MOVE, WRITE, DATA • Elementary Data Types: • Character -- C Floating Point -- F • Integer -- I Numeric Text -- N • Date -- D Packed Decimal -- P • Time -- T Hexadecimal -- X • Construction Concept • Record - fixed number of related fields/data objects • Internal Table - variable number of related records
Basic Language Constructs Cont • Non-Elementary Data Types (User Defined) • Example: Types t_phone (20) type C. • Data customer_phone type t-phone. • Data Object: (not defined explicitly) attributes and entities • References: uses key word LIKE copies attributes of one data object into another
Basic Syntax for Source Code • Statements • not case sensitive • Keyword + series of space delimited words • ends with period • can span multiple lines • Literals are identified between single quotes • Comments • * in first column of line • inline after double quote
Basic Syntax for Source Code • Colon notation • implies “repeat verb/ABAP reserved word” • Example 1: Write var-1. Write var-2. Write var-3. Write: var-1, var-2, var-3. • Example 2: Write ‘The answer is: ‘. Write var-1. Write: ‘The answer is: ‘, var-1.
Some Verbs • REPORT program name • REPORT ZZ99DB01 • DATA var(length) TYPE • Curr_date(20) TYPE C • Curr_date LIKE sy-datum • Assignment • MOVE ‘XYZ’ to Curr_date. • Curr_date = ‘XYZ’. • Write • WRITE / column position(length) dataname
Basic Compile Environment • Check = Syntax check • Save = records current version of source code • Generate = Compiles and generates object code • Execute (does NOT save) = Runs or if does not exist generates and runs • Drill Down • X Y Z editor buffers • Help
Assignment #1 • Create a program to display the following information on the screen when executed • Current Date Current Time • Client Number Username • Language Key System ID • R/3 Release Database System • Operating System >>> 1 item per line <<<
Assignment #2 • Copy the program ZZ99DB01 (Debug 01) to your own program name. • Edit and fix the compile error(s). • Include the PATTERN DEMO_PATTERN in the program. • Change the title to include your name