mis 3020 - abap programming lecture 1 introduction to the abap workbench

39
MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Upload: tobias-peters

Post on 17-Dec-2015

265 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

MIS 3020 - ABAP Programming

Lecture 1Introduction to the ABAP

Workbench

Page 2: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Objectives to introduce

the ABAP integrated development environment

the two main ABAP application types reporting dialog programming

Page 3: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Order of Presentation Purpose and Function of the ABAP Workbench Workbench Tools:

Object Navigator (Repository Browser) The ABAP Language The Repository Information System Test and Analysis Tools Menu & Screen Painter The Data Modeler ABAP Query The Workbench Organizer The Class Builder

Page 4: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

ABAP WorkbenchPurpose & Function

SAP’s Integrated Graphical Programming Development Environment: Used to create/change ABAP application programs Each ABAP application program is either a report or

a transaction: Reports are applications that retrieve and display

information from database with little or no user interaction Transactions accepts inputs/data from users and then

perform one or more relevant actions, usually involving updating databases

Page 5: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

ABAP WorkbenchPurpose & Function

The Workbench can be used to write ABAP code design dialogs/screens with a graphical

editor create menus with a menu editor debug an application test an application for efficiency control access to objects under development create new or access predefined database

information

Page 6: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

ABAP WorkbenchPurpose & Function

Comprises the following tools The Object Navigator (aka Repository

Browser) the ABAP Language

the Screen and Menu Painters the Repository Information System the Data Modeler various test and analysis tools the ABAP Query the Workbench Organizer

Page 7: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

R/3Repository

ABAPProcessor

Debugging Trace Test Tuning

Reporting Screen

Painter

FunctionModules

AB

AP

Or g

aniz

erTransport System

MenuPainterData

Modeler

ABAPDictionary

ABAPEditor

ABAP Workbench Architecture

Page 8: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

The Workbench Screen All R/3 screens have a similar ‘look and

feel’ screens consist of

screen titlebar menu bar standard toolbar application toolbar screen body message line

Page 9: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Menubar

Standard toolbar

Application toolbar

Message line Client Server

Screen title-bar

Page 10: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

The Object Navigator (The Repository Browser)

central tool for organizing and managing your personal development objects

used to navigate through development object lists where development objects are the components

used to construct an application automatically calls other workbench tools

if you create a new data definition the browser calls the Data Dictionary, and then returns to the browser after the definition is created

Page 11: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 12: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

The ABAP Language

Advanced Business Application Programming developed by SAP for the interactive development

of application programs 4th Generation Language (with some OO features) main uses for ABAP programs include

creation of new reports development of new user dialog programs (transactions) customisation of R/3 to meet individual client needs

Page 13: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Reporting uses ABAP Open SQL to extract

data from the R/3 database Open SQL is a subset of ANSI SQL

report consists of a [selection screen] and a list screen selection screen allows the user to

enter selection criteria list screen displays the report data

Page 14: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Selection Screen

ListScreen

ABAP Open SQL

Report

R/3 Database

Page 15: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 16: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 17: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 18: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Dialog Programming

Dialog Programs (Transactions) are used for both reading and changing the database

Main Components of a Dialog Program are screen & menus processing logic defined in an ABAP program

(module pool) for each screen, interaction and control flow from

one module to another is defined in DYNPRO data structures defined in the ABAP dictionary

Page 19: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Development Environment

ABAPDictionary

ScreenPainter

ABAP MenuPainter

Runtime Environment

Dialog Processor ABAP Processor

Page 20: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Dialog Programming - Overview

TransactionCode Module Pool

0100

0200

0300

ScreenFlowLogic

Page 21: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

PROCESS BEFORE OUTPUT.

MODULE INITIALISE.

PROCESS AFTER INPUT.

MODULE READ-ITAB. MODULE ....

MODULE INITIALISE Clear ITAB.ENDMODULE.

MODULE READ-ITAB. Select * From ITAB Where...

ENDMODULE.

MODULE...... : :ENDMODULE.

DIALOG DIALOG CommunicationCommunication ABAP ABAP

12

3

4

Page 22: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Graphical Elements Toolbar

Currently Edited Field

Graphical Screen Painter

Page 23: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Menu Painter

Page 24: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

The Repository Information System

The Repository Information System is used to search for objects in the R/3 system and provides list of all objects X with attribute/s Y the Where Used List which gives a list of every place

that object X is used throughout the R/3 system information about foreign key relationships between

tables display of data (all records in table X with attribute Y)

Page 25: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 26: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Test and Analysis Tools ABAP Editor

syntax checker tests for coding and syntactical correctness provides automatic ‘correct’ facility in case of an error, provides a detailed

(although sometimes obscure) reason for the error

extended syntax check searches out situations that might possibly

result in a runtime error (eg, inconsistent interface parameters)

warns about use of literals instead of text elements

Page 27: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Test and Analysis Tools Debugger

finds logic errors provides ability to

stop the program anywhere during runtime

continue statement by statement skip over subroutines check or change the contents of variables

and internal tables on the fly

Page 28: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 29: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Test and Analysis Tools Runtime analysis

used to determine the performance, (absolute and relative) of the various parts of an ABAP program

can provide statistics on the efficiency of

code database accesses R/3 system itself

Page 30: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 31: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 32: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

The Data Modeler graphical tool that utilises E-R

modelling tightly coupled to the data dictionary

possible to click on an object in the model (ie, an entity), and retrieve related data from the dictionary, (ie table - structure, contents)

create the data model and the dictionary can create the table automatically

Page 33: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench
Page 34: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

ABAP Query Automated report generator

user not required to know ABAP language can generate

basic lists, statistics, ranked lists To define a report

enter individual texts, such as titles select the fields and options which determine the report

layout assign a particular sequence by numbering the fields.

The system generates each query in the form of an ABAP program.

Page 35: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Workbench Organizer records and controls changes to

objects ABAP Programs, Dictionary Objects,

Screens, User Interface Definitions, … provides assistance for organizing

development projects by allowing you to distribute project work

for individual developers or teams among different change requests

Page 36: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Workbench Organizer interface to the Transport mechanism

movement of applications from development test production environments

prevents parallel, uncoordinated changes to the same object, (version control) even when many copies of the object

exist in several, connected SAP systems

Page 37: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Summary & Conclusion

this lecture provided an overview of the tools that comprise the ABAP Development Workbench

of these the editor /syntax checker/debugger is the combination that we will use most frequently

it is essential that you be able to use the tools to navigate around the workbench find,execute,change development objects

Page 38: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Related Reading

OnLine Help R/3 Library ... Basis Components ...

ABAP Workbench BC ABAP User’s Guide

ABAP Basics Overview of the Components of

Application Programs ABAP Workbench Tools

Page 39: MIS 3020 - ABAP Programming Lecture 1 Introduction to the ABAP Workbench

Recommended ABAP Texts ABAP/4: Programming the SAP R/3 System, Bernd Matzke Developing SAP’s R/3 applications with

ABAP/4, Rudiger Kretschmer, and Wolfgang

Weiss Introduction to ABAP/4 Programming for

SAP, Revised and Expanded Edition by Gareth M. De Bruyn, Robert Lyfareff