abap 015 tables and structures

10
ABAP Tables and Structures Prepared by J Kreie New Mexico State University ABAP Tables and Structures This lesson and others assume you are comfortable with relational database concepts and terminology. Explanations for these terms and concepts are not covered. (If you are not familiar with relational database concepts you should get book about database management or systems analysis and design and read the chapter on data modeling.) In this lesson you will learn about structures, internal tables, and external tables. o u will create a program that reads data from a table and displays it in an output screen. Tables and !tructures !ince you"re familiar with !#$ you understand that a lot of data support the !#$ modules (%inancial # ccounting, &ogistic s, etc.) and these modules were written in #'#$ . %rom the outset # '#$ offered features to facilitate processing huge amounts of data. External tables are tables in t he database that support the !#$ modules. %or example, so me customer data are kept in a table called #* and sales order data are kept in +'# (header data) and +'#$ (sales order item data). hen we talk about tables in #'#$, an external table is maintained in the !#$ database, it used indirectly through an internal table defined in an #'#$ pr ogram, which is described in the next paragraph. It is possible to manipulate data directly in external tables with !-& but that is not recommended. Typically, data is retrieved from an external table and stored temporarily in an internal table, manipulated within an #'#$ program then written back to the exter nal table, if changes to the data need to be kept. Transparent / is another term !#$ uses for standard relational tables in the !#$ da tabase. o u"ll see this term again near the end of this lesson. There are other types of ta bles within !#$ which we will not use in t hese lessons. hen you work with table data in #'#$ , typically, you will use structures0work areas and internal tables. In your program you define a structure also called a work area 1variables that are grouped together and each variable is like a column or field in a table. The combined variables in t he work area are like a single row to hold data.  #n internal  table is defined by referencing the structure (group of variables) that makes up the columns in this temporary table. The data in an internal table ex ists only during pr ogram execution. 2uring execution t he internal table must be populated (data retrieved from an external table or input by a user) and the program must take care of storing an y data that should exist after the program"s end, i.e. transferring the data from the internal table to an external table. Work area 3ne row only Internal table 4ore than one row. 5ust like a real/ table except that it only exits in 6#4 during program execution. $age 1 of 10

Upload: ly-bang

Post on 08-Jul-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 1/10

Page 2: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 2/10

Page 3: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 3/10

Page 4: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 4/10

Page 5: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 5/10

Page 6: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 6/10

Page 7: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 7/10

Page 8: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 8/10

Page 9: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 9/10

Page 10: Abap 015 Tables and Structures

8/19/2019 Abap 015 Tables and Structures

http://slidepdf.com/reader/full/abap-015-tables-and-structures 10/10