ITEC3612 Enterprise Architecture and Resource Planning (Lab) ABAP Programming (2)

Slides:



Advertisements
Similar presentations
SAP Performance & Tuning Bonus material for 201 ABAP Interview Questions Material code : BM02 Author.
Advertisements

ABAP Data/Internal Tables ITP 321 Anthony Borquez & Jim Graver.
 SAP AG2000 dvanced Advanced usiness Business rogramming Programming pplication Application / 4 Szkolenie ABAP.
ABAP/4 PROGRAMMING Internal Table 講 師:呂 昇 燦 2000 年 9 月 26 日.
ABAP Chapter 6 Message Debugging File Transfer Type Group.
Midterm Review Lecture 14b. 14 Lectures So Far 1.Introduction 2.The Relational Model 3.Disks and Files 4.Relational Algebra 5.File Org, Indexes 6.Relational.
University of Southern California Enterprise Wide Information Systems ABAP/ 4 Programming Language Instructor: Richard W. Vawter.
Introduction to Structured Query Language (SQL)
University of Southern California Enterprise Wide Information Systems SAP R/3 Overview & Basis Technology Instructor: Richard W. Vawter.
1 SQL-Structured Query Language SQL is the most common language used for creating and querying relational databases. Many users can access a database applications.
1 Creating a Non-Conditional List A- What are you going to do? You will “list” “all of the records” in a database. (it means you will not use any condition!)
Concepts of Database Management Sixth Edition
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
CSCI 6962: Server-side Design and Programming
ABAP Chapter 3 Open SQL Internal Table. SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI.
ASP.NET Programming with C# and SQL Server First Edition
Control Break Report ALV Report
Introduction to Databases Chapter 7: Data Access and Manipulation.
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),
1 Chapter 7 Query-By-Example by Monica Chan CS157B Professor Lee.
Analyzing Data For Effective Decision Making Chapter 3.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
In the next step you will enter some data records into the table. This can be done easily using the ‘Data Browser’. The data browser can be accessed via.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
Using Special Operators (LIKE and IN)
User Dialog Overview. Update Statement TABLES customers. SELECT SINGLE * FROM customers WHERE id = 1. IF sy-subrc = 0. customers-name = ‘John’. UPDATE.
Concepts of Database Management Seventh Edition
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
Information Technologies and Microsoft SQL Server Day 2 by Alper Özpınar
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
BACS 287 Structured Query Language 1. BACS 287 Visual Basic Table Access Visual Basic provides 2 mechanisms to access data in tables: – Record-at-a-time.
Concepts of Database Management Eighth Edition Chapter 3 The Relational Model 2: SQL.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 (Part II) INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor.
Report Layout Report Heading Report Body Column Heading Report Title.
Concepts of Database Management Seventh Edition Chapter 3 The Relational Model 2: SQL.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
SELECT-OPTIONS. SELECT-OPTIONS Syntax TABLES customers. SELECT-OPTIONS id FOR customers-id. START-OF-SELECTION.
Mantova, September 2015 SAP ECC 6.0 DEVELOPMENT ABAP SAP develop enviroment & Transport organizer.
(SQL - Structured Query Language)
Graphical Query Tools 5-ABAP.1 This is PricewaterhouseCoopers PROPRIETARY MATERIAL (hereafter, the Material) intended for internal use only. You may not.
SAP DEVELOPMENT BASICS Bohuslav Tesar. TRAINING OVERVIEW Amazing life of ABAP developer ;) SAP introduction ABAP basics ABAP Reporting.
Introduction to ABAP/4 A dvanced B usiness A pplication P rogram – Release 4 Why Use ABAP? –Programming language of SAP –Main purpose is to provide additional.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
 / 1 Optimize Database Access From ABAP QL.  / 2 Copyright Please note: No part of this Training Session may be reproduced or transmitted in any form.
MySQL Tutorial. Databases A database is a container that groups together a series of tables within a single structure Each database can contain 1 or more.
SAP Tuning 실무 SK㈜ ERP TFT.
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
Copyright © 2014 Pearson Canada Inc. Ext. 5b-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5b Using Microsoft Access Part 2: Using Information.
2 Copyright © 2008, Oracle. All rights reserved. Building the Physical Layer of a Repository.
Enterprise Wide Information Systems SAP R/3 Overview & Basis Technology Instructor: Richard W. Vawter.
ABAP EVENTS & Interaction
PHP –MySQL Interview Question And Answer.
ABAP/4程序员之路——第3天 上海华和得易信息技术有限公司 王勇.
Database systems Lecture 3 – SQL + CRUD
Access: SQL Participation Project
Structured Query Language – The Fundamentals
Introduction To Structured Query Language (SQL)
Contents Preface I Introduction Lesson Objectives I-2
Unit 8 Search Help 、 Unit 7 Views
Updating Databases With Open SQL
Updating Databases With Open SQL
Presentation transcript:

ITEC3612 Enterprise Architecture and Resource Planning (Lab) ABAP Programming (2)

ABAP #2 Open SQL Internal Table

SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI

SAP SYSTEM (3 Tier Architecture) Presentation Layer (Windows based) Application Layer (Windows Server/UNIX) Database Server Database Layer (Windows Server/UNIX) M SAP Instance Oracle Informix DB2 MS SQL Server SAP DB/MaxDB G Dispatcher Request Queue D D B V S E SAP Buffer (Shared Mem) SAP GUI

SAP System : Dialog Processing Database Server Application Server Dispatcher Request Queue DDDD … SAP Buffer Program Table … Report zpsm1. Tables customers. Select single * from customers where id = 1. Write: / customers-name. Execute ABAP stateme nt Check Program in Program Buffer 7 Load&Gen Program SQL Request Send List Generate Screen(List) Send Request Request List 2 Search for free WP Store request to queue Send request to WP SAP GUI

TaskHandler DYNPRO Processor ABAP Processor Local Memory Memory Space DB Interface List buffer Database Server Dialog Work Process Dialog Work Process Architecture Result Set Memory

Open SQL SELECT... INSERT... UPDATE... DELETE...

DB Interface SAP Application Server Local Memory Dialog WP TaskHandler DB Interface Result Set Database Server ~ 32 KB in length ABAP Processor DYNPRO Memory Space List Buffer

Example Tables in DB spfli carridconnidcityfromcitytodistance LH0400LANY100 LH0402BKNY540 SQ0110SQBK250 carridconnidfldateprice LH LH LH SQ sflight

Example Tables in DB id namecity 1JohnNew York 2PeterSingapore 3DavidLondon customers

Select Overview Select Which Columns? From Which Table? Into Where to place? Where Which Lines?

Select Statement Select multiple records from database Select single record from database SELECT * FROM customers. … ENDSELECT. SELECT SINGLE * FROM customers WHERE id = 1. …

Select Multiple Records Tables spfli. Select * from spfli. write: /spfli-carrid, spfli-connid, spfli-cityto. endselect. ifsy-subrc <> 0. write: / ‘No Data’. endif.

Dialog WP TaskHandler DYNPRO Processor ABAP Processor Database Local Memory Memory Space DB Interface Lis t b uffer Result Set

SELECT Statement Working Steps 1. Transform open SQL to DB SQL and return result set into result set work area SELECT * FROM spfli. … ENDSELECT. SELECT * FROM spfli; 2. Loop with data in result set and transfer each record to work area in memory space SELECT * FROM spfli. … ENDSELECT. Table Structure in Memory Space

Select … Into Table Structure Tables spfli. Select * from spfli into spfli. write: /spfli-carrid, spfli-connid, spfli-cityfrom, spfli-cityto. endselect. ifsy-subrc <> 0. write: / ‘No Data’. endif.

Select … Into Work Area Data wa like spfli. Select * from spfli into wa. write: /wa-carrid, wa-connid, wa-cityfrom, wa-cityto. endselect. ifsy-subrc <> 0. write: / ‘No Data’. endif.

SELECT with WHERE Clause

Loop Processing with Restriction Tables spfli. Select *from spfli where cityfrom = ‘FRANKFURT’. write: / spfli-carrid, spfli-cityto. endselect. If sy-subrc <> 0. write / ‘no data’. endif.

Select With Range Tablessflight. Select * From sflight Where price between 100 and Write:/sflight-carrid, sflight-connid, sflight-price. Endselect.

SELECT … With IN List Tablessflight. Select * From sflight Where price in ( 100, 1000 ). Write: / sflight-carrid, sflight-connid, sflight-price. Endselect.

Select Single Record

Tables spfli. Select single * from spfli where carrid = ‘LH’ and connid = ‘0400’. if sy-subrc = 0. write: / spfli-carrid, spfli-connid, spfli-cityfrom, spfli-cityto. else. write: / ‘Data not found’. endif.

Select Column List

Reading Selected Column Data: id like customers-id, name like customers-name, city like customers-city. Select id name city into (id, name, city) from customers. write: / id, name, city. endselect. if sy-subrc <> 0. write / ‘No Data found’. endif.

Reading Selected Column Data: begin of wa, id like customers-id, name like customers-name, city like customers-city, end of wa. Select id name city into wa from customers. write: / wa-id, wa-name, wa-city. endselect. if sy-subrc <> 0. write / ‘No Data found’. endif.

Reading Selected Column Tables customers. Select id name city into(customers-id,customers-name,customers-city) from customers. write: / customers-id,customers-name, customers-city. endselect. if sy-subrc <> 0. write / ‘No Data found’. endif.

Corresponding Fields of... Tables: customers. Select id name city into corresponding fields of customers from customers. Write: / customers-id, customers-name, customers-city. Endselect.

DB Count : SY-DBCNT Tables customers. Select * from customers. write: / sy-dbcnt,customers-id, customers-name. endselect. if sy-subrc <> 0. write: / ‘No Data found’. else. write: / sy-dbcnt, ‘Record found’. endif.

SELECT … ORDER BY... Tables:spfli. Select * from spfli Order by cityfrom. Write: / spfli-carrid, spfli-connid, spfli-cityfrom. Endselect.

SELECT … With Template Tablescustomers. Select * From customers Where name Like ‘_r%’. Write: / customers-id,customers-name. Endselect.

Aggregate Functions Aggregate Functions : COUNT,MIN,MAX,AVG and SUM Data: maxdat like sflight-distance, mindat like sflight-distance, counter type I. Select COUNT(*) MIN(distance) MAX(distance) into (counter,mindat, maxdat) from spfli. Write:/ ‘Count :’, counter, / ‘Min :’, mindat, / ‘Max :’, maxdat.

SELECT … GROUP BY... Data: carrid like sflight-carrid, mindat Type P Decimals 2, maxdat Type P Decimals 2. Select carrid Min( price ) Max( price ) Into (carrid, mindat, maxdat) From sflight Group by carrid. Write: / carrid, mindat, maxdat. Endselect. อยากทราบว่า ในแต่ละสายการบิน มีราคาตั๋วต่ำสุดและสูงสุดเท่าไร

tables customers. select * from customers where id <> 1 and city = ( select city from customers where id = 1 ). write: / customers-id, customers-name. endselect. Sub Query ลูกค้าคนใดที่อยู่เมือง เดียวกับลูกค้ารหัส ID 1

Exercise I usr02-ltime usr02-trdat usr02-bname ห้ามใช้ SELECT *

ABAP : Inner Join

Tables Join spfli carridconnidcityfromcitytodistance LH0400NYBK100 LH0402BKNY540 SQ0110SQBK250 carridconnidfldate price LH LH LH SQ sflight

Tables Join Question: Select carrid, connid and cityto from spfli and fldate,price from sflight where carrid = ‘ LH ’ spfli-carrid spfli-connid sflight-fldate spfli-cityto sflight-price เงื่อนไข : ให้แสดงข้อมูลเฉพาะสายการบิน ‘LH’ เท่านั้น

Standard SQL Select spfli.carrid, spfli.connid, sflight.fldate, sflight.price From spfli, sflight Where spfli.carrid = sflight.carrid and spfli.connid = sflight.connid and spfli.carrid = ‘LH’;

Tables Join Methods Inner join of Select statement Nested select statement Internal table View

Open SQL – Inner Join Tables: spfli,sflight. Select spfli~carrid spfli~connid sflight~fldate spfli~cityto sflight~price into (spfli-carrid, spfli-connid, sflight-fldate, spfli-cityto, sflight-price) from spfli inner join sflight on spfli~carrid = sflight~carrid and spfli~connid = sflight~connid where spfli~carrid = ‘LH’. Write: / spfli-carrid, spfli-connid, sflight-fldate, spfli-cityto, sflight-price. Endselect.

Open SQL – Inner Join Tables: A,B. Select A~a B~b B~c into (A-a,B-b,B-c) from A inner join B on A~b = B~b. Write: / A-a,B-b,B-c. Endselect. ab a1b1 a2b2 Table : A bc b1c1 b2c2 b3c3 Table : B A-a B-b B-c

Open SQL – Inner Join ab a1b1 a2b2 Table : A bc b1c1 b2c2 b3c3 Table : B A~aB~bB~c a1b1c1 a2b2c2 Single Result Table(Result set) Select … inner join.. Endselect. Database Server Application Server 1 2

Open SQL – Alias Table Name Tables: spfli,sflight. Select a~carrid a~connid b~fldate a~citytob~price into (spfli-carrid, spfli-connid, sflight-fldate, spfli-cityto, sflight-price) from spfli as a inner join sflight as b on a~carrid = b~carrid and a~connid = b~connid where a~carrid = ‘LH’. Write: / spfli-carrid, spfli-connid, sflight-fldate, spfli-cityto, sflight-price. Endselect.

Inner Join/Outer Join Example idnamecitytel 1JohnNew York PeterLondon DavidSingapore MichealBangkok p_id prod_nameon_hand A1Pen100 A2Pencil125 B1Ruler80 X1Tape120 Y1CD99 cust_idprod_idsale_dateqtysale_id 1A A X sale_idname 01Somchai 02Pipop ZPRODUCTS ZSALES ZSALEREPS ZCUSTOMERS

Open SQL – Inner Join REPORT ZINNERJOIN01. TABLES: ZCUSTOMERS,ZSALES. SELECT A~NAME B~PROD_ID INTO (ZCUSTOMERS-NAME,ZSALES-PROD_ID) FROM ZSALES AS B INNER JOIN ZCUSTOMERS AS A ON B~CUST_ID = A~ID. WRITE: / ZCUSTOMERS-NAME,ZSALES-PROD_ID. ENDSELECT.

Open SQL – Inner Join > 2 Tables Tables: A,B,C. Select A~a B~c C~y into (A-a,B-c,C-y) from A inner join B on A~b = B~b inner join C on C~x = B~c. Write: / A-a,B-c,C-y. Endselect. ab …… Table : A bc …... … …… Table : B xy …... Table : C A-a B-c C-y

Open SQL – Inner Join > 2 Tables REPORT ZINNERJOIN02. TABLES: ZCUSTOMERS,ZPRODUCTS,ZSALES. SELECT A~NAME C~PROD_NAME B~QTY INTO (ZCUSTOMERS-NAME,ZPRODUCTS-PROD_NAME, ZSALES-QTY) FROM ZSALES AS B INNER JOIN ZCUSTOMERS AS A ON B~CUST_ID = A~ID INNER JOIN ZPRODUCTS AS C ON C~P_ID = B~PROD_ID. WRITE: / ZCUSTOMERS-NAME,ZPRODUCTS- PROD_NAME,ZSALES-QTY. ENDSELECT.

Exercise II : User Master USR02-BNAME USR02-TRDAT ADCP-TEL_NUMBER USR02 USR21 ADCP BNAME PERSNUMBER ADDRNUMBER Tables Relationship

ABAP : Outer Join

REPORT ZOUTERJOIN. TABLES: ZCUSTOMERS,ZSALES. SELECT A~NAME B~PROD_ID INTO (ZCUSTOMERS-NAME,ZSALES-PROD_ID) FROM ZCUSTOMERS AS A LEFT OUTER JOIN ZSALES AS B ON A~ID = B~CUST_ID. WRITE: / ZCUSTOMERS-NAME,ZSALES-PROD_ID. ENDSELECT. Open SQL – Outer Join

REPORT ZSUBQUERY. tables: zcustomers. select * from zcustomers as a where not exists ( select * from zsales as b where b~cust_id = a~id ). write: / zcustomers-name. endselect. Sub Query

Internal Table

Data Objects in ABAP Memory Space Structure Table Structure Internal Table Variable Constants

INTERNAL TABLE Flight (Structure) CarridConnidDatePrice Internal Table Flight (Internal Table) CarridConnidDatePrice Header Line

Structure Data:Begin of flight, carridlike sflight-carrid, connidlike sflight-connid, datelike sflight-fldate, pricelike sflight-price. Data:End of flight. flight-carrid = ‘LH’. Write:/ flight-carrid.

INTERNAL TABLE Data:begin of tab occurs 10, carridlike sflight-carrid, connidlike sflight-connid, fldatelike sflight-fldate, pricelike sflight-price. Data end of tab.

USING ABAP DICTIONARY STRUCTURE Data:begin of tab occurs 0. Include structure sflight. Dataend of tab.

INTERNAL TABLE USING LIKE Data tab LIKE sflight OCCURS 0 WITH HEADER LINE.

FILLING INTERNAL TABLE (APPEND) Tables sflight. Data flight like sflight occurs 0 with header line. Select * from sflight. Move sflight to flight. Append flight. Endselect. Loop at flight. Write: / flight-mandt, flight-price. Endloop.

Reading Data From Internal Table Data tab like sflight occurs 0 with header line. Select * from sflight into table tab. If sy-subrc = 0. Loop at tab. Write: / tab-carrid, tab-price. Endloop. Else. Write: / ‘No Data’. Endif.

Access Database Without Internal Table

Access Database Using Internal Table

Reading Data From Internal Table Data: begin of tab occurs 0, id like customers-id, name like customers-name, end of tab. Select id name from customers into table tab. If sy-subrc = 0. Loop at tab. Write: / tab-id, tab-name. Endloop. else. Write: / ‘No Data’. Endif.

Exercise III : Change Using Internal Table

SORTING INTERNAL TABLE (SORT) Sortflight. Sortflight byprice fldate. Sortflight byprice ascending fldate descending.

Standard Key of Internal Table f1f2f3f4 Data: begin of tab occurs 0, f1 type C, f2 type I, f3 type N, f4 type P, end of tab. tab Data type C, N, D, T

SORTING INTERNAL TABLE Data tab like spfli occurs 0 with header line. Select * from spfli into table tab. Sort tab by cityfrom. Loop at tab. write: / tab-carrid, tab-connid,tab-cityfrom. Endloop.

PROCESSING INTERNAL TABLE... Loop at flight. Write: / flight-carrid, flight-connid. Endloop. Loop at flight where carrid = ‘LH’. Write: / flight-carrid, flight-connid. Endloop. Loop at flight from 1 to 10. Write: / sy-tabix,flight-carrid, flight-connid. Endloop.

Internal Table Template Condition... loop at tab where name cp ‘ +r* ’....

Internal Table Template Condition Data tab like spfli occurs 0 with header line. Select * from spfli into table tab. Sort tab by cityfrom. Loop at tab where cityfrom cp 'F*'. write: / tab-carrid, tab-connid,tab-cityfrom. Endloop.

Reading Single Record Data flight like sflight occurs 0 with header line. Select * from sflight into table flight. Sort flight by carrid connid fldate. Read table flight with key carrid = 'LH‘ fldate = ' ' Binary Search. if sy-subrc = 0. write : / flight-carrid,flight-connid, flight-fldate, flight-price. endif.

Reading Single Record using Index Data flight like sflight occurs 0 with header line. Select * from sflight into table flight. Sort flight by carrid connid fldate. Read table flight index 3. if sy-subrc = 0. write : / flight-carrid,flight-connid, flight-fldate, flight-price. endif.

CHANGING INTERNAL TABLE... Deleteflight index 5. Deleteflight where carrid = ‘LH’. flight-carrid = ‘XX’. flight-price = 100. … Insert flight index 1.

DELETING INTERNAL TABLE Clear flight. Refresh flight. Free flight. DATA flight LIKE sflight occurs 0 with header line.

Tables sflight. Data flight like sflight occurs 0 with header line. Select * from sflight. Move sflight to flight. Append flight. Endselect. refresh flight. if flight is initial. write :/ 'empty'. Free flight. endif. Loop at flight. Write: / flight-mandt, flight-price. Endloop.

Total Record of Internal Table Data: line_count type i. Data tab like sflight occurs 0 with header line. Select * from sflight into table tab. Describe table tab lines line_count. Write: / line_count.

Internal Table Processing Data tab like spfli occurs 0 with Header line. … Select * from spfli appending table tab where carrid = ‘ LH ’.

SELECT … INNER JOIN REPORT ZINNERJOIN01. TABLES: ZCUSTOMERS,ZSALES. SELECT A~NAME B~PROD_ID INTO (ZCUSTOMERS-NAME,ZSALES-PROD_ID) FROM ZSALES AS B INNER JOIN ZCUSTOMERS AS A ON B~CUST_ID = A~ID. WRITE: / ZCUSTOMERS-NAME,ZSALES-PROD_ID. ENDSELECT.

Inner Join into Internal Table REPORT ZJOIN01. DATA: begin of tab occurs 0, name like zcustomers-name, prod_id like zsales-prod_id, end of tab. SELECT A~NAME B~PROD_ID INTO TABLE tab FROM ZSALES AS B INNER JOIN ZCUSTOMERS AS A ON B~CUST_ID = A~ID. LOOP AT tab. WRITE: / TAB-NAME,TAB-PROD_ID. ENDLOOP.

Internal Table Without Header Line DATA tab LIKE zcustomers OCCURS 0. DATA wa LIKE zcustomers. … LOOP AT tab INTO wa. WRITE: / wa-id, wa-name. ENDLOOP.

Database Table Processing  INSERT  UPDATE  MODIFY  DELETE Database

Insert (Table) Tables zcust. zcust-id = '999'. zcust-name = 'Test'. Insert zcust. if sy-subrc <> 0. write: / 'Data Already Exists'. endif.

Update Statement Tables zcust. Select single * from zcust where id = 999. If sy-subrc = 0. zcust-name = 'John'. update zcust. Endif. Update customers set name = ‘John’ where id = 999.

Modify Statement Tables zcust. zcust-id = ‘88’. zcust-name = ‘uraiporn’. Modify zcust.

Deleting Database Table Entries Tables zcust. zcust-id = ‘1’. Delete zcust. Delete from zcust. Delete From zcust. Where city = ‘Bangkok’.

Deleting Database Table Entries Tables zcust. zcust-id = '999'. Delete zcust. if sy-subrc <> 0. write: / 'Data Not Exists'. endif.

Exercise IV : User Master usr02-bname usr02-trdat adcp-tel_number ใช้ Internal Table