ABAP/4 is the language created by SAP AG for implementation and customization of their R/3 system.
The rough English translation of the acronym would be A Business Application Programming language, version 4.
It is a block-structured language that seems to me to most resemble a cross between Oracle's PL/SQL and IBM's PL/I.
It contains a moderately rich set of data structures; integers, "packed" BCD numbers, character strings, dates, times, ...
Some reasonable modularization tools handling both subroutines
that are localized (called a FORM), and globally defined
encapsulated functions (called FUNCTION MODULES).
A somewhat weak set of SQL operators; a select statement is represented by a loop structure, where operations are placed within the loop. e.g. A typical selection would look like:
select * from mytable where key like '25%'.
write: / mytable-key, mytable-value.
perform do_something using mytable-value.
endselect. |
The operators are somewhat "weak" in that they cannot be directly composed to generate such things as inner or outer joins; one would instead nest select "loops" one within another.
ABAP/4 contains some highly report-oriented event-driven control structures. For instance, events can be defined for:
INITIALIZATION.
START-OF-SELECTION.
END-OF-SELECTION.
AT NEW-PAGE.
AT END-OF-PAGE.
There are also events defined to automate access to "logical databases," that is, to selectively walk down a hierarchy tree defined for a set of related tables. This can be used to provide (without programmer intervention) additional selection and sort criteria as parameters to reports.
ABAP/4 is a byte-compiled language. The virtual machine is fairly well hidden from view, but core dumps can be examined, and appear to resemble IBM 370 assembly language.
Operations that work on tables will have to access the database server; for efficiency's sake, there is the notion of an "Internal Table," which is an array structure that is stored "locally" on the application server . Using internal tables decreases both the load on the network and on the database server, and is highly encouraged, at least for moderate quantities of data.
Some additional "little languages" are used to link ABAP/4 code to screen definitions and screen control code to help define online transactions.
Jointly with the "screen control" language, ABAP/4 is used to implement substantially all of the visible R/3 system functionality. The R/3 "kernel" represents some (albeit fairly large) programs written in C that interpret ABAP/4 bytecode. There is so much infrastructure built up around this that most users and indeed many developers are probably not aware of where or what the kernel is.
Introduction to ABAP/4 Programming for SAP, Revised and Expanded Edition
Advanced ABAP Programming for SAP
It's not a tremendously "advanced" guide; it would be more accurate to characterize it as an "intermediate" guide. But as a successor to an "introduction" book, they presumably had to call it "Advanced."
The ever-nasty way of generating sophisticated typeset report output on R/3 systems
I'm not sure it makes sense to consider that it can be "made easy," but this is pretty definitive documentation from SAP...
Diego Menese's Batch Input Generator 1.0
I wrote this program that automatically writes ABAP code for Batch Input Processing (using or not Call Transaction, and reading files from server or client, and also reading from external tables). It can capture transaction specification from SM35-generated-programs, and it's very simple to use. Here is a sample that opens an Excel spreadsheet from SAPGUI... REPORT ZKOBI1 . INCLUDE OLE2INCL. *declaration of variants DATA EXCEL TYPE OLE2_OBJECT. DATA WORKBOOK TYPE OLE2_OBJECT. DATA: H_SHEET TYPE OLE2_OBJECT , H_SHEET1 TYPE OLE2_OBJECT , H_SHEET2 TYPE OLE2_OBJECT. * opening the excel application CREATE OBJECT EXCEL 'Excel.Application'. SET PROPERTY OF EXCEL 'Visible' = 1. * opening the desired excel woorkbook CALL METHOD OF EXCEL 'Workbooks' = WORKBOOK. CALL METHOD OF WORKBOOK 'Open' EXPORTING #1 = 'H:\COMP\KOBIZ\DOCUMENT\PRICELIST-TEST-1.0.XLS'. GET PROPERTY OF EXCEL 'ACTIVECELL' = H_SHEET1. SET PROPERTY OF H_SHEET1 'VALUE' = SEL_FILE. * activating an excel macro CALL METHOD OF EXCEL 'RUN' EXPORTING #1 = 'OPEN1'. | ||
| -- Diego Menese | ||