ABAP/4 PROGRAMMING Internal Table 講 師:呂 昇 燦 2000 年 9 月 26 日.

Slides:



Advertisements
Similar presentations
ABAP Data/Internal Tables ITP 321 Anthony Borquez & Jim Graver.
Advertisements

9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
Computer Concepts BASICS 4th Edition
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
University of Southern California Enterprise Wide Information Systems ABAP/ 4 Programming Language Instructor: Richard W. Vawter.
Introduction to Structured Query Language (SQL)
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
Introduction to Structured Query Language (SQL)
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. ACCESS 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 3 – Finding, Filtering,
MMG508.  Access Types  Tables  Relational tables  Queries  Stored database queries  Forms  GUI forms for data entry/display  Reports  Reports.
Access Tutorial 10 Automating Tasks with Macros
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.
ABAP Chapter 3 Open SQL Internal Table. SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
With Microsoft Access 2007 Volume 1© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Access 2007 Volume 1 Chapter.
CPSC 203 Introduction to Computers T59 & T64 By Jie (Jeff) Gao.
ASP.NET Programming with C# and SQL Server First Edition
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 11 - JavaScript: Arrays Outline 11.1 Introduction 11.2 Arrays 11.3 Declaring and Allocating Arrays.
SAP ABAP DemoNawin's Training Acadamy1. Enterprise Wide Information Systems ABAP/ 4 Programming Language Mr. RG Nawin Krishna, Bsc(cs);Msc(psychology);MBA(HR);SAP(HCM/HR),
10/31/2012ISC239 Isabelle Bichindaritz1 SQL Graphical Queries Design Query By Example.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Architecture Rajesh. Components of Database Engine.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
1 By: Nour Hilal. Microsoft Access is a database software where data is stored in one or more Tables. A Database is a group of related Tables. Access.
Key Applications Module Lesson 21 — Access Essentials
User Dialog Overview. Update Statement TABLES customers. SELECT SINGLE * FROM customers WHERE id = 1. IF sy-subrc = 0. customers-name = ‘John’. UPDATE.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 MYSQL Database. Introduction to MYSQL MySQL is the world's most popular open-source database. Open source means that the source code, the programming.
ITEC3612 Enterprise Architecture and Resource Planning (Lab) ABAP Programming (2)
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 3 BACKNEXTEND 3-1 LINKS TO OBJECTIVES Modify a Table – Add, Delete, Move Fields Modify a Table.
There are seven main components of a database in Access 2000: Tables. Use tables to store database information. Forms Use forms to enter or edit the information.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Microsoft FrontPage 2003 Illustrated Complete Creating a Form.
1 DBS201: Introduction to Structure Query Language (SQL) Lecture 1.
Database structure and space Management. Segments The level of logical database storage above an extent is called a segment. A segment is a set of extents.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
D Copyright © Oracle Corporation, All rights reserved. Loading Data into a Database.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Database Management System. DBMS A software package that allows users to create, retrieve and modify databases. A database is a collection of related.
Lesson 13 Databases Unit 2—Using the Computer. Computer Concepts BASICS - 22 Objectives Define the purpose and function of database software. Identify.
Session 1 Module 1: Introduction to Data Integrity
Altering Tables and Constraints Database Systems Objectives Add and modify columns. Add, enable, disable, or remove constraints. Drop a table. Remove.
SAP DEVELOPMENT BASICS Bohuslav Tesar. TRAINING OVERVIEW Amazing life of ABAP developer ;) SAP introduction ABAP basics ABAP Reporting.
CPSC 203 Introduction to Computers T97 By Jie (Jeff) Gao.
WaveMaker Visual AJAX Studio 4.0 Training Java Script Events.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
1 CS 430 Database Theory Winter 2005 Lecture 13: SQL DML - Modifying Data.
Single Linked Lists Objectives In this lesson, you will learn to: *Define single linked list *Identify the following types of linked lists: Single linked.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Unit-8 Introduction Of MySql. Types of table in PHP MySQL supports various of table types or storage engines to allow you to optimize your database. The.
Constraints Advanced Database Systems Dr. AlaaEddin Almabhouh.
Programming for the Web MySQL Command Line Using PHP with MySQL Dónal Mulligan BSc MA
VOCAB REVIEW. A field that can be computed from other fields Calculated field Click for the answer Next Question.
Dept. of Computer & Information Sciences
Web Systems & Technologies
© 2016, Mike Murach & Associates, Inc.
Objectives Create an action query to create a table
Introduction to Web programming
Chapter 8 Working with Databases and MySQL
Object Oriented Programming in java
Chapter 9 Query-by-Example Pearson Education © 2009.
TransCAD Working with Matrices 2019/4/29.
Database SQL.
Presentation transcript:

ABAP/4 PROGRAMMING Internal Table 講 師:呂 昇 燦 2000 年 9 月 26 日

Internal Table Internal table is a temporary table stored in RAM on the application server. It is created and filled by a program during execution and is discarded when the program ends. An internal table consists of a body and an optional header line.

Data: begin of it occurs 0, f1(1), f2(2), end of it. header line it f1f2 body it Definition The definition of an internal table named it. It contains two fields f1,f2.

Add data and Read data append [wa to] [initial line to] it. loop at it [into wa] [from m] [to n] [where exp] endloop. read table it [into wa] [index i | with key keyexp [binary search] ] [comparing cmpexp] [transporting texp].

Syntax for the sort statement sort it [descending] [as text] [by f1 [ascending|descending] [as text] f2…]

Advanced Internal Table(1) it[] means “the body of the internal table it if internal table it does not have a header line,you can use either it[] or it represent the body,they are equivalent Without a header line, you can perform efficient table operations

Information about an internal table Determining whether an internal table is empty: if it[] is initial. Determining the number of rows in an internal table: describe table it [lines i] [occurs j].

Copying data from one internal table to another it2[] = it1[]. Two internal tables have the same structure if –they both have the same number of components, –the data type and length of each component is the same as the corresponding of another –only the component names do not have to match

Using append lines /insert lines statement append lines of it1 [from nf] [to nt] to it2. insert lines of it1 [from nf] [to nt] into it2 [index nb]. User insert lines statement when you want to insert rows at a place other than the end into the target table.

Inserting rows into an internal table insert [wa into] it [index n] if index is specified, the new row is inserted before row n.Row n then becomes row n+1

Modifying rows in an internal table modify it [from wa] [index n] [transporting c1 c2 … [where exp]] transporting specifies which components are to be overwritten.

Exercise: Read contents of zmkpf_xx into an internal table Filling your tables zmkpf_fdevxx Use select into table Modify the usnam column so that the third row contains ‘TOM’ (use modify transporting where) Modify the mjahr, changing all ‘1994’ to ‘2000’ (use modify transporting where)

Deleting rows in an internal table free : delete all rows from an internal table and free the associated memory refresh : delete all rows from an internal table but leave the memory allocated clear : either clear the header line or delete all rows from it and leave the memory allocate delete : delete one or more rows from an internal table

Filling an internal table using collect collect [wa into] it. When collect is executed, the system forms a key from the default key fields int the wa The key composed of the values from all fields of type c, n, d, t, and x. System searches it for a row that has the same key in wa. If not, the row is appended to the end of the table.If it does find,the fields in wa are added to the corresponding row

Advanced Internal Table(2) Filling an internal table from a DB table: –Selecting multiple rows directly into the body of an internal table. –Selecting single rows into a work area and then appending

Selecting multiple rows select * –from dbtab into [corresponding fields of] table it select f1 f2 –from dbtab into [corresponding fields of] table it f1 and f2 are fields within dbtab Other additions, such as where and order by, can follow it endselect is not used with into table. select into table does not start a loop.

Using the corresponding fields The components of the internal table aren’t in the same order as those from database Or they don’t have the same data type and length as those from database The statement moves fields from the database table into fields of the same name in the internal table body

Exercise: Using internal table Sorting function with desceding Drilldown function Design a GUI status using menu painter