Physical Database
LFA1
LFAS
LFB5
LFAS LFBK LFB1 Documents
LFC1
BSIK BKPF
BKPF
BSEG
BSEG
GSEG
GSEG
Reading Data
ABAP Dictionary
1 2
Logical Database Without Logical
Database
REPORT ... .
TABLES:SPFLI,SFLIGHT. REPORT ... .
GET SPFLI. TABLES: SPFLI,SFLIGHT.
SELECT SPFLI.
Processing SELECT SFLIGHT.
GET SFLIGHT.
.... Processing
Processing ....
ENDSELECT.
ENDSELECT.
Event Key Words: Overview
START-OF-SELECTION Introduces any initial processing to be done
prior to next event keyword (usually GET).
START-OF-SELECTION
1 GET LFA1
1 LFA1 5 1 LFA1 5
2 GET LFB1
2 LFB1 4 2 LFB1 4
3 GET LFC1
END-OF-SELECTION
Report-Driven Reading of Vendor Master Data
REPORT ZZ70D121.
TABLES: LFA1, LFB1, LFC3.
SELECT * FROM LFA1
WHERE LIFNR ...
Processing LFA1
SELECT * FROM LFB1
WHERE LIFNR = LFA1-LIFNR.
Processing LFB1
SELECT * FROM LFC3
WHERE LIFNR = LFA1-LIFNR
AND BUKRS = LFB1-BUKRS.
Processing LFC3
ENDSELECT.
ENDSELECT.
ENDSELECT.
The STOP Statement
REPORT ZZ70D124.
TABLES: LFA1.
DATA: COUNTER TYPE I.
GET LFA1.
WRITE: ‘GET LFA1’, 15 LFA1-LIFNR,
LFA1-NAME.
COUNTER = COUNTER + 1.
SKIP.
IF COUNTER > 1.
STOP.
ENDIF.
END-OF-SELECTION.
WRITE: / ‘END-OF-SELECTION’,
TEXT-001.
* TEXT-001: ‘That’s it buddy !’.
Logical Database vs. Select
GET SELECT
• The functional connection • Faster than logical databases
already exists • More powerful than logical
• Beginners can find the databases -
database they are after – select into
easier – order by
• The logic is reusable • More flexible
• Select-Options are flexible • More specific coding is easier
• Authority check is made work for the database.
automatically
BUT: BUT:
Logical databases are slower ; Authority check missing
Changes to a logical database ; Parameters for select-
affect all programs that use it options have to be
coded
Classic Scenario verses Function Module
LDB_PROCESS
Classic Scenario
LDB_PROCESS