ABAP REPORTING TOUTRIAL.pdf
(
540 KB
)
Pobierz
198117934 UNPDF
BC ABAP Reporting Tutorial
Release 4.6B
™
BC ABAP Reporting Tutorial
SAP AG
Copyright
©
Copyright 2000 SAP AG. All rights reserved.
No part of this brochure may be reproduced or transmitted in any form or for any purpose without
the express permission of SAP AG. The information contained herein may be changed without
prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary software
components of other software vendors.
Microsoft
®
, WINDOWS
®
, NT
®
, EXCEL
®
, Word
®
and SQL Server
®
are registered trademarks of
Microsoft Corporation.
IBM
®
, DB2
®
, OS/2
®
, DB2/6000
®
, Parallel Sysplex
®
, MVS/ESA
®
, RS/6000
®
, AIX
®
, S/390
®
,
AS/400
®
, OS/390
®
, and OS/400
®
are registered trademarks of IBM Corporation.
ORACLE
®
is a registered trademark of ORACLE Corporation, California, USA.
INFORMIX
®
-OnLine for SAP and Informix
®
Dynamic Server
TM
are registered trademarks of
Informix Software Incorporated.
UNIX
®
, X/Open
®
, OSF/1
®
, and Motif
®
are registered trademarks of The Open Group.
HTML, DHTML, XML, XHTML are trademarks or registered trademarks of W3C
®
, World Wide
Web Consortium, Laboratory for Computer Science NE43-358, Massachusetts Institute of
Technology, 545 Technology Square, Cambridge, MA 02139.
JAVA
®
is a registered trademark of Sun Microsystems, Inc. , 901 San Antonio Road, Palo Alto,
CA 94303 USA.
JAVASCRIPT
®
is a registered trademark of Sun Microsystems, Inc., used under license for
technology invented and implemented by Netscape.
SAP, SAP Logo, mySAP.com, mySAP.com Marketplace, mySAP.com Workplace, mySAP.com
Business Scenarios, mySAP.com Application Hosting, WebFlow, R/2, R/3, RIVA, ABAP, SAP
Business Workflow, SAP EarlyWatch, SAP ArchiveLink, BAPI, SAPPHIRE, Management
Cockpit, SEM, are trademarks or registered trademarks of SAP AG in Germany and in several
other countries all over the world. All other products mentioned are trademarks or registered
trademarks of their respective companies.
2
December 1999
SAP AG
BC ABAP Reporting Tutorial
Icons
Icon
Meaning
Caution
Example
Note
Recommendation
Syntax
Tip
December 1999
3
BC ABAP Reporting Tutorial
SAP AG
Contents
BC ABAP Reporting Tutorial..............................................................................6
BC - ABAP Workbench: Reporting Tutorial ................................................................................ 7
Note to the Reader......................................................................................................................... 8
Overview ......................................................................................................................................... 9
Requirements ............................................................................................................................... 10
Syntax conventions..................................................................................................................... 11
Platform ........................................................................................................................................ 12
Naming Conventions for SAP Objects ...................................................................................... 13
Further Documentation ............................................................................................................... 14
ABAP Query ................................................................................................................................. 15
Overview of ABAP Query............................................................................................................ 16
User Groups ................................................................................................................................. 17
Functional Areas.......................................................................................................................... 18
Query............................................................................................................................................. 20
Basic Settings for a Query.......................................................................................................... 21
Creating a Basic List................................................................................................................. 23
Layout of a Basic List ..........................................................................................................24
Other presentations of a basic list....................................................................................... 26
Creating Statistics..................................................................................................................... 27
Creating a Report Using ABAP Statements.............................................................................. 29
Overview ....................................................................................................................................... 30
The ABAP Programming Language........................................................................................... 31
Creating an ABAP Program ........................................................................................................32
The ABAP Editor ...................................................................................................................... 34
Comment lines.......................................................................................................................... 35
ABAP Statements for Screen Display ...................................................................................... 36
Declaring data .......................................................................................................................... 38
Handling Variables ................................................................................................................... 39
Text Layout ............................................................................................................................... 40
List Headers ............................................................................................................................. 42
Dynamic List Headings........................................................................................................ 43
Database Access...................................................................................................................... 44
The SELECT Statement...................................................................................................... 45
Selection Criteria ...................................................................................................................... 47
PARAMETERS.................................................................................................................... 48
SELECT-OPTIONS ............................................................................................................. 50
Variants..................................................................................................................................... 52
Nested SELECT Statements .................................................................................................... 53
Performance of the SELECT Statement .................................................................................. 55
Sample Program: nested SELECT statements ......................................................................... 56
Logical Databases and Events ................................................................................................... 59
Overview: logical databases....................................................................................................... 60
Creating a Report That Uses a Logical Database .................................................................... 61
Retrieving Data Using a Logical Database............................................................................... 62
4
December 1999
SAP AG
BC ABAP Reporting Tutorial
Sample program: reading SBOOK using a logical database ................................................... 64
Hierarchy of a Logical Database ................................................................................................ 65
Events ........................................................................................................................................... 67
GET <tablename> LATE .......................................................................................................... 68
Sample program: report using logical database ...................................................................... 70
Structures and Internal Tables ................................................................................................... 72
Internal Tables ............................................................................................................................. 73
Structures and Internal Tables ................................................................................................... 74
Declaring a structure ................................................................................................................ 75
Declaring an internal table........................................................................................................ 77
Defining the Work Area ............................................................................................................ 78
Filling internal tables................................................................................................................. 79
Working with Internal Tables ....................................................................................................80
IF statement.................................................................................................................................. 83
Sample program: internal tables................................................................................................ 84
Processing control levels ........................................................................................................... 87
Control Level Processing.......................................................................................................... 89
Calculating Totals ..................................................................................................................... 91
Sample program: processing control levels ............................................................................. 92
Interactive Reporting................................................................................................................... 95
Concept: interactive reporting ................................................................................................... 96
New Event Keywords ............................................................................................................... 97
Creating a Detail List ................................................................................................................ 98
Valid Line Selection ................................................................................................................ 100
Defining a User Interface........................................................................................................ 101
Sample program for interactive reporting ............................................................................... 103
December 1999
5
Plik z chomika:
sliwak
Inne pliki z tego folderu:
userexit.pdf
(2320 KB)
sysflds.pdf
(38 KB)
spmp.pdf
(4741 KB)
sappress_enhancing_quality_abap-5.pdf
(520 KB)
inttabl.pdf
(61 KB)
Inne foldery tego chomika:
ABAP Tutorials
Bazy Danych
Crystal Reports
film_ytd
instrukcje SAP ERP
Zgłoś jeśli
naruszono regulamin