abap/4 course. general n workbench n program maintenance n screen painter n menu painter n...

22
ABAP/4 Course

Upload: ruby-tyler

Post on 12-Jan-2016

229 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 Course

Page 2: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

General

Workbench Program maintenance Screen Painter Menu Painter Transactions ABAP/4 Query Translation menu

Page 3: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 (SE38)

Change/Display Variants Attributes (Logical Data Bases) Documentation Text Elements Program Directory Copy/Rename/Delete Development Test

Page 4: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Development/Test

Run-time Analysis Extended Syntax

Check Program References Pretty Printer Find Source String

Page 5: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 Editor Check/Generate Insert Statement Split Line/Copy/Move... Fetch Position Goto Menu Utilities (Local/Global Search) Upload/Download Set/Display Breakpoints Printing (Only a part ...)

Page 6: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Insert Statement

Select * from Call Function Message Write Others e.g. Comment

(*, **1, *f, *m ...)

Page 7: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 Debugger

Single Step/Execute/Continue Table (PgUp/PgDn/Format E,C,X) Click on fields (Change Contents or

Display) Scroll in program source Goto Menu Set/Delete Breakpoint (Breakpoint At)

Page 8: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 Programming

= Event-driven programming language Working with Reports Report Syntax and layout Declaring and Processing data Events and Flow Control Subroutines Reading and Processing Internal tables/Database tables Selection criteria and Parameters Working with Logical Databases Interactive Reporting

Page 9: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Working with Reports

Naming a Report (R/Z + M/F... + Name(6)) Creating Reports Changing Reports

Page 10: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Report Syntax and Layout

Structure of the ABAP/4 Programming Language

ABAP/4 Report Layout Inserting Ready-Made Strucures

Page 11: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Key Words

Declaratives (DATA,.) Events (GET,...) Control (IF,...) Operational (WRITE,)

Page 12: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Declaring and Processing data

Constants/Variables Assigning Values Arithmetic Operations Processing Text Fields System Fields (SY-UZEIT, SY-DATUM)

Page 13: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Events and Flow Control

Event Key Words (GET, START/END OF SELECTION, INITIALIZATION)

Events: Concept Flow Control in ABAP/4 Flow Control: Concept

Page 14: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Events: Concept

LFA1

LFB1

LFC1 1990 1991

0001

... ...

0002

0000000001

1990 1991

0001

... ...

0002

0000000002

Page 15: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Flow Control: ConceptREPORT DEMO.

<declaration section>START-OF-SELECTION. " processing block WRITE: 'Start', ... .

GET LFA1. " processing block WRITE: ... . IF LFA1-LAND1 = 'D'. ... ENDIF.

GET LFB1. " processing block WRITE: ... .

END-OF-SELECTION. " processing block WRITE: 'Total:', ... .

Page 16: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Subroutines

Definition Calling Subroutines Passing data between subroutines/reports

(INCLUDE, PERFORM X(Y),...) Function Modules

Page 17: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Reading and Processing Internal Tables/Databases

Definition (Internal Tables) Filling Internal Tables Reading/Changing and Sorting SELECT/INSERT/UPDATE/MODIFY/

DELETE

Page 18: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Simple ReadingSELECT * FROM T005T WHERE LAND1 EQ 'D'. WRITE: T005T-SPRAS, T005T-NATIO.ENDSELECT.

SELECT * FROM <dbtab> INTO TABLE <itab> [WHERE ...] [ORDER BY ...].Note that there is no ENDSELECT here.

SELECT * FROM <dbtab> APPENDING TABLE <itab> [WHERE ...]

[ORDER BY ...].If the operation was successful, the system field SY-SUBRC is set to 0, otherwise to 4.

SELECT SINGLE * FROM <dbtab> WHERE ...In this case, the WHERE condition may contain only equality conditions linked using AND. You have to specify the primary key in full.

Page 19: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Selection Criteria and Parameters

SELECT-OPTIONS PARAMETERS SELECTION-SCREEN

Page 20: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Working with Logical Databases

Display/Maintenance ABAP/4 Key words for Logical Databases Concept

Page 21: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

Logical Data Bases

Structure Selections/Texts Database Program (SAPDB<dba>) Selection Screen Documentation Checking/Copying/Deleting/Details

Page 22: ABAP/4 Course. General n Workbench n Program maintenance n Screen Painter n Menu Painter n Transactions n ABAP/4 Query n Translation menu

ABAP/4 Course