The R/3 kernel (system runtime environment) itself is written in standard C or C++.
But application programs running inside R/3 are written using SAP's proprietary programming language ABAP (pronouced as ahhh-bap).
Note: the "/4" in "ABAP/4" has been dropped over the confusion that the "4" referred to "R/4", which doesn't exist.
Netweaver AS (Application Server) combines which SAP calls two "personalities" because WebDynpro (pronouced "web din pro") for ABAP and WebDynpro for Java use the same meta model. WebDynpro components, views, models, and controllers have the same semantics in both ABAP and Java.
The main difference is the design-time environment, the development infrastructure, and the run-time environment.
Architecture
Components are reusable (nestable) units of the application project. Components appear as nodes within the object list on the left side of the Workbench window.
The components (sub-objects) of an ABAP program are:
Source code - instructions written by ABAP programmers that are interpreted by the SAP ABAP language intrepreter.
Variants - input values that can change but are not frequently used.
Attributes - properties of each ABAP program, such as its program type, title, creation and last modified date, and active status.
Documentation - helps other programmers understand the program flow.
Text elements - short descriptions such as report column headings. Some headings can be replaced with the longer text.
Within SAP, objects are small programs related to screen design, menu design, and other functions.
Dialog programs and their components are created and edited from menu Workbench > Edit object (Shift+F5) Program.
Generally, there are two types of ABAP programs:
dialogs.
reports (interactive and traditional) which displays selection screens (for users to provide filtering criteria) and output (report) screens.
SAP's Architecture Manual WebDynpro
SAP's Tool Maual for WebDynpro for ABAP
SAP's Reference Guide WebDynpro for ABAP
Different Types of ABAP object programs
ABAP Program Type Introduced with first part Called using Can do
1 (one) = Executable REPORT SUBMIT (LEAVE TO TRANSACTION) &
SUBMIT AND RETURN (CALL TRANSACTION) started by entering the program name or using a transaction code; can have its own screens.
M = Module (in Module Pool) PROGRAM (using Transaction Maintenance transaction SE93) only by transaction code:
CALL TRANSACTION or
LEAVE TO TRANSACTION; Can be called using tcode or menu. Have their own dialog screens.
S = Interface Definition Subroutine pools PROGRAM non executable container programs for sub-routines called externally cannot have its own screens.
F = Function Group FUNCTION-POOL non executable container for function modules. can have its own screens.
K = Class Definition (container programs for global classes) CLASS-POOL non executable container for classes. cannot have its own screens.
J = Interface Definition (container programs for global interfaces) CLASS-POOL TABLES non executable container for interfaces. cannot have its own screens.
T = Type Groups TYPE-POOL non executable container for type definitions. cannot have its own screens.
I = Include Program non executable container for modularizing ABAP source code. none INCLUDE statement. -
Transports and Packages
When an ABAP module is first created, it is stored as an inactive local object in a $TMP temporary transport.
With ABAP, deployment of components are organized as Transport definitions.
Objects need to be activated for editing.
Screens
To invoke the Screen Painter tool, use tcode SE51 or from the Object Navigator tool.
Screen attributes include its number (default to 0100 for the first screen), short description, subsequent screen number, and type of screen:
normal
subscreen
modal (pop-up) dialog box
selection
Goto Layout (placement) of screen elements (text label, input/output edit fields, text boxes, push buttons, radio buttons, etc.).
Goto Secondary window to set Attributes for each field screen element in the Element List (Dict. data type (such as numbers only), format, length, etc..
Flow logic is determined by ABAP program source code events and keywords:
TOP where globals are defined.
PROCESS BEFORE OUTPUT. (PBO) to display screen
PROCESS AFTER INPUT. (PAI)
PROCESS ON HELP-REQUEST. (POH) when F1 is pressed
PROCESS ON VALUE-REQUEST. when F4 is pressed
ABAP Language Source Code Syntax
ABAP is a declarative language with a syntax similar to the COBOL language, but enhanced for use to specify both classic procedural and object-oriented processing.
ABAP doesn�t care where a statement begins on a line. > Each statement (phrase) begins with a command keyword (verb) and
ends with a period character (instead of the semicolon used in C and Java).
An ABAP statement can span several lines (without continuation characters as needed in VB programs).
Spaces separate words.
Asterisks (*) in front of a line are recognized as comments and not processed.
Double-quote characters (") mark the beginning of in-line comments. All code is ignored after a double-quote character. For this reason,
single-quote (') characters encase a text string, which can contain spaces.
The ABAP editor converts (marks) all text to UPPER CASE unless it's within single quotes.
Statements with have an identical first part can be concatenated if there is a colon (:) after that first part and individual statements are separated with commas and a period (.) is placed after the last part.
Object-oriented ABAP coding follow these conventions.
hide h1. stores in a hide area the value of variable h1 from the current line of the current internal table.
The SAP R/3 Style Guide maintained by the SAP Design Guild provides standards for accessible user interaction design of functions, UI elements (Screens, application and task menus, Fields, Checkboxes, Radio Buttons, Drop-Down List Boxes, Lists, Tables, Trees), hot keys, and presentation of dialogues and texts.
String processing in German is Zeichenkettenverarbeitung.
Command summary
Operation Commands Description
Object assignment MOVE variable1 TO variable2 assigns values to data objects to a variable. It works like the equal sign (=).
MOVE-CORRESPONDING ... TO ...
WRITE TO passes values to variables (mainly to fill character fields).
CLEAR resets a data object to the initial value appropriate to its data type. -
Numeric operations compute var3 = var1 - var2
subtract var2 from var1
add var1 to var2
divide var1 by var2
multiply var1 by var2
-
Individual modularization units MODULE, PERFORM, CALL FUNCTION,
CALL SCREEN,
CALL TRANSACTION,
CALL DIALOG,
SUBMIT (CALL FUNCTION IN UPDATE TASK,
CALL FUNCTION IN BACKGROUND TASK,
CALL FUNCTION STARTING NEW TASK) These create a new user context:
database access SELECT * INTO TABLE tableB FROM dbTableA.
endselect.
EXEC SQL -
Internal table operations APPEND,
COLLECT,
READ TABLE�WITH KEY�,
INSERT ... INDEX ...
SORT,
BINARY SEARCH -
delete internal tables and release memory REFRESH,
FREE -
Programming Logic contrasts ABAP with other programing languages' conditional (IF/ELSE/LOOP) statements.
ULINE requests a line break in the output.
Workbench
WebDynpro application components are created and modified within the WebDynpro Explorer within the ABAP Workbench access from Tools > ABAP Workbench > Overview > (within the Application Hierarchy) SE80 > - Object Navigator
The Workbench stores its assets (such as MIME definitions and ABAP development objects (packages, programs, functions) in a persistent Repository.
ABAP Workbench organization of tools:
Development Function Builder, Screen Painter, Menu Painter)
SE11 ABAP Data Dictionary (DDIC)
User Interface:
SE38 ABAP Editor
SE51 Screen Painter
SE41 Menu Painter (to define GUI status of Menu bar, app. toolbar, function keys)
SE37 Function Builder
SE24 Class Builder
SE37 Function Builder
SE33 Context Builder
Programming Environment:
SW01 Business Object Builder
Debugging
ST05 SQL Trace
SE30 Run Time Analysis (of memory usage) On Line Debugger to view variables while stepping through a program,
SM21 System Log
Navigation (Application Hierarchy,
SE80 Object Navigator
SE84 ABAP Repository Information System
SE16 Data Browser
Organizing
SE09 Transport System to make moves requested using Workbench Organizer
SAP offers these courses:
TAW10 ABAP Workbench Fundamentals E-Learning
TAW12 ABAP Workbench Concepts E-Learning
Skillsoft offers two web-based courses:
ABAP Programming I (205 minutes)
ABAP Programming II (205 minutes)
ABAP Editor
ABAP Workbench is the IDE SAP supplies to edit, compile, and run ABAP programs.
An ABAP program defines and maniulates data using statements of specific syntax.
XML-based info objects can only be edited in the Knowledge Workbench.
ABAP Data Dictionary (DDIC)
The ABAP Dictionary contains:
table type
tables
views
data elements
domains (value ranges)
structures (hierarchy)
lock objects
online help information
search help information
Each field in the DD is based on a built-in DD data type or a Data Element (which in turn is based on a Domain).
The Data Element contains the more semantical information (text and documentation).
The Domain defines the basic technical attributes:
Data type, length, number of decimals -- essential for dealing with fields correctly and building nice user interfaces that are aware of the field attributes.
Check table -- a separate table such as country name associated with a country code.
Fixed values -- information about codes stored in the Domain (not in a separate table).
Conversion exit -- in SAPGUI to translate between internal and external representations of data, because most BAPIs return and expect the internal format, which makes little to no sense to users.
Texts and documentation: SAP stores multiple texts per field and also extended documentation in many cases. This documentation is available in all installed languages and therefore an easy way to provide multi-lingual capabilities in applications.
Mixed case support. Indicates to the users which fields are uppercase only. Many text fields in SAP are uppercase only.
SAPscript and forms
A SAPscript form is a template that supplies the layout (for example, page size) and content (for example, sales data for an invoice) for business forms.
SAPscript print program is needed to print, distribute, or display business forms.
A form is made up of pages, which contains several windows (header, address, main, etc.). Text elements are formatted with paragraph formats (which define font and tab positions) and character formats (such as bold).
Create a view for the component. This calls the Layout tab and creates the root element in the UI Element Hierarchy. See the view in the browser by embedding it actively in a WebDynpro window.
Activate "Accessibility Checks Active" by clicking on the checkbox.
-
ABAP Functionality
The functionality of an ABAP program include:
Receive requests and messages.
Present user interface (title bar, menu bar, standard & application toolbars, function keys).
Present screen elements (iViews push bottons, radio buttons, checkboxes, input fields, scroll fields).
Obtain user input in fields, mouse movements, etc.
Make calculations and edits.
Access databases.
web services (send responses).
Log activities.
Exit.
Classic Sections and Events
Classic ABAP programs are made up of self-contained sections (containing block of code) which cannot be nested. Events in ABAP report programs are executed in a predefined sequence.
INITIALIZATION.
SELECTION-SCREEN.
START-OF-SELECTION. where select statements retrieve data.
TOP-OF-PAGE.
END-OF-PAGE.
END-OF-SELECTION.
Bolded events are only for ABAP report programs.
Even though code sections can be specified in any order, it's better to keep this sequence.
Code for an event ends when the next event name is specified.
The STOP command causes (at runtime) a jump to the next section.
Classic Data Declaration
DATA DECLARATION. Defines:
data i(8) type n value 0.
data final type c value 'literal'.
parameters x(15) type c.
select-options Number for x.
Data are stored in data objects: modifiable field strings, variables and internal tables or non-modifiable literals and constants.
Classic List Handling
Interactive report programs provide menus for user interaction. When the user clicks on a row within a basic list created using a select statement within the start-of-selection section, code under section at line-selection. is invoked to create a secondary list.
When the user selects a row and clicks a defined PF key (i.e., Shift+F12), code under section at pf24. is invoked. Because most PC keyboards have 12 F keys:
13 = Shift F1
14 = Shift F2
15 = Shift F3
16 = Shift F4
17 = Shift F5
18 = Shift F6
19 = Shift F7
20 = Shift F8
21 = Shift F9
22 = Shift F10
23 = Shift F11
24 = Shift F12
When the user selects a row and clicks the Enter key, code under section at user-command. is invoked.
at user-command.
if sy-ucomm=20 .
get cursor Field f Value v. retrieves the field name and value of where the user has placed his cursor.
Object-Oriented Coding
Object-oriented ABAP coding defines events (with only exporting parameters) and handler this way:
ABAP Internal Tables
ABAP report programs obtains results from database queries from temporary internal tables on WebAS server memory.
For example, to define two internal tables with a capacity of 53 records:
data : begin of tableA occurs 100 with header line.
field 1 (c) (like databasefield1 ).
field 2 (c) (like databasefield2 ).
end of tableA.
data : begin of tableB like tableA occurs 100.
To modify data from the internal table:
modify tableA index i.
To read data from internal table:
loop at tableA from 50 to 100.
modify tableA .
" code to display data on the screen.
endloop .
Contexts
To avoid unnecessary system load from repeating calculations, define contexts in the Context Builder within ABAP Workbench.
Application programs work with instances of a context. SUPPLY input values for key fields and DEMAND derived data.
Each context has a cross-transaction buffer on the application server. When you query an instance for values, the context program searches first of all for a data record containing the corresponding key fields in the appropriate buffer. If one exists, the data is copied to the instance. If one does not exist, the context program derives the data from the key field values supplied and writes the resulting data record to the buffer.
Class inheritance (Vererbung) is achieved using
CLASS
Data Types
The largest ABAP datatype holds 65,535 characters.
ABAP UIs
The standard Web user interface is WebDynpro.
The SAP R/3 Style Guide maintained by the SAP Design Guild provides standards for accessible user interaction design of functions, UI elements (Screens, application and task menus, Fields, Checkboxes, Radio Buttons, Drop-Down List Boxes, Lists, Tables, Trees), hot keys, and presentation of dialogues and texts.
Business Server Pages (BSP) provides a high degree of adjustment for Web interface.
Java Development
Java Development Infrastructure
WebDynpro ABAP
WebDynpro Java
SAP's Documentation for SAP Getting Started with Netweaver 2004s, 2004, and 6.30.
SAP Interactive Forms by Adobe Overview
ABAP WebDynpro Development Processes
Process Process Description
Modeling 1. Provide business logic APIs.
2. Structure development projects in packages.
3. Create (reusable) WebDynpro components.
4. Model user navigation.
5. Model Portal navigation.
Developing 6. Create and implement controllers and define contexts.
7. Design of views, define layouts and bind to contexts.
8. Define WebDynpro applications.
9. Execute testing and debugging.
Configuring 10. Provide component configurations.
11. Combine WebDynpro components with WebDynpro application configurations.
12. Execute functional tests.
13. Include WebDynpro applications to Portal iViews and roles.
Adapting 14. Adapt configuration settings.
15. Enhance or modify WebDynpro components.
16. Internationalization of WebDynpro ABAP components.
17. Execute end-user and load testing.
18. Configure and personalize WebDynpro application in the Portal.
Upgrading 19. Merge new developments into productive applications.
20. Execute end-user testing.
ABAP Persistence
Access to the R/3 System database is made using OPEN SQL statements in the PUT_
No comments:
Post a Comment