SlideShare una empresa de Scribd logo
1 de 101
ABAP Chapter 3 ,[object Object],[object Object]
SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI 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 GUI
SAP System : Dialog Processing Database Server Application Server Dispatcher Request Queue D D D D … SAP Buffer Program Table … 1 3 4 5 6 8 9 10 Report zpsm1. Tables customers. Select single * from customers where id = 1. Write: / customers-name. Execute ABAP statement 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
Dialog Work Process Architecture TaskHandler DYNPRO Processor ABAP Processor Local Memory Memory Space DB Interface List buffer Database Server Dialog Work Process Result Set Memory
Open SQL ,[object Object],[object Object],[object Object],[object Object]
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 ,[object Object],customers BK NY NY cityto 250 SQ 0110 SQ 540  BK 0402 LH 100 LA 0400 LH distance cityfrom connid carrid London David 3 Singapore Peter 2 New York John 1 city name  id
Example Tables in DB sflight 75 20010226 0110 SQ 130 20010228 0400 LH 145 20010110 0400 LH 150 20010101 0400 LH price fldate connid carrid
Select Overview ,[object Object],[object Object],[object Object],[object Object]
Select Statement ,[object Object],[object Object],SELECT * FROM customers. … ENDSELECT. SELECT SINGLE * FROM customers WHERE id = 1. …
Select Multiple Records ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dialog WP ,[object Object],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 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select … Into Work Area ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise I  customers-id customers-name customers-city
SELECT with WHERE Clause
Loop Processing with Restriction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select With Range ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SELECT … With  IN  List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Single Record
Select Single Record ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Column List
Select * : Example  SELECT *
Reading Selected Column ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reading Selected Column ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Column : Example I
Reading Selected Column ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Column : Example II
Corresponding Fields of... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Statement : Special Topics
DB Count : SY-DBCNT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SELECT  … ORDER BY ... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
SELECT … With  Template ,[object Object],[object Object],[object Object],[object Object],[object Object]
Aggregate Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Aggregate Functions : COUNT,MIN,MAX,AVG and SUM
SELECT  … GROUP BY ... ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],อยากทราบว่า ในแต่ละสายการบิน มีราคาตั๋วต่ำสุดและสูงสุดเท่าไร sflight 75 20010226 0110 SQ 130 20010228 0400 LH 145 20010110 0400 LH 150 20010101 0400 LH Price fldate connid carrid
Sub Query ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ลูกค้าคนใดที่อยู่เมืองเดียวกับลูกค้ารหัส  ID 1
Exercise I customers-id customers-name customers-city ห้ามใช้  SELECT *
Exercise II usr02-ltime usr02-trdat usr02-bname ห้ามใช้  SELECT *
ABAP : Inner Join
Tables Join ,[object Object],sflight BK NY BK cityto 250 SQ 0110 SQ 540  BK 0402 LH 100 NY 0400 LH distance cityfrom connid carrid 75 20010226 0110 SQ 130 20010228 0400 LH 145 20010110 0400 LH 150 20010101 0400 LH price fldate connid carrid
Tables Join ,[object Object],[object Object],[object Object],[object Object]
Standard SQL ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tables Join Methods ,[object Object],[object Object],[object Object],[object Object]
Nested Select Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Open SQL – Inner Join ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Open SQL – Inner Join ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Table : A Table : B A-a  B-b  B-c b2 a2 b1 a1 b a c2 b2 c3 b3 c1 b1 c b
Open SQL – Inner Join Table : A Table : B Single Result Table(Result set) Select … inner join.. Endselect. Database Server Application Server 1 2 b2 a2 b1 a1 b a c2 b2 c3 b3 c1 b1 c b b2 b1 B~b c2 a2 c1 a1 B~c A~a
Open SQL – Alias Table Name ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inner Join/Outer Join Example ZPRODUCTS  ZSALES ZSALEREPS  ZCUSTOMERS 432555 Singapore David 3 234111 Bangkok Micheal 4 222222 London Peter 2 111111 New York John 1 tel city name id CD Tape Ruler Pencil Pen prod_name 120 X1 80 B1 99 Y1 125 A2 100 A1 on_hand p_id 90 50 10 qty 02 20020321 X1 3 01 20020318 A2 1 01 20020318 A1 1 sale_id sale_date prod_id cust_id Pipop 02 Somchai 01 name sale_id
Open SQL – Inner Join ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Open SQL – Inner Join > 2 Tables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Table : A Table : B Table : C A-a  B-c  C-y …  …  b a ... … … … ... … c b ... … y x
Open SQL – Inner Join > 2 Tables  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise : User Master USR02-BNAME  USR02-TRDAT  ADCP-TEL_NUMBER USR02 USR21 ADCP BNAME PERSNUMBER ADDRNUMBER Tables Relationship
ABAP : Outer Join
Open SQL – Outer Join ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Single Result Table B~PROD_ID A~NAME X1 David Micheal Peter A2 John A1 John
Exercise ,[object Object]
Sub Query ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ลูกค้าชื่ออะไรที่ไม่ได้ซื้อสินค้าจากเรา มีใครบ้าง
Internal Table
Data Objects in ABAP ,[object Object],Structure Table Structure Internal Table Variable Constants <Field-symbols>
INTERNAL TABLE ,[object Object],Carrid Connid Date Price Internal Table Flight (Internal Table) Carrid Connid Date Price Header Line
Structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
INTERNAL TABLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
USING ABAP DICTIONARY STRUCTURE ,[object Object],[object Object],[object Object]
INTERNAL TABLE USING LIKE ,[object Object]
FILLING INTERNAL TABLE (APPEND) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Key of Internal Table Data: begin of tab occurs 0, f1 type  C , f2 type I, f3 type  N , f4 type P, end of tab. tab f4 f3 f2 f1
Reading Data From Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Access Database Without Internal Table
Access Database Using Internal Table
Reading Data From Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise I : Change Using Internal Table
SORTING INTERNAL TABLE (SORT) ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],SORTING INTERNAL TABLE
PROCESSING INTERNAL TABLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Internal Table Template Condition ,[object Object],[object Object],[object Object]
Reading Single Record ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Reading Single Record using Index ,[object Object],[object Object],[object Object],[object Object],[object Object]
CHANGING INTERNAL TABLE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
DELETING INTERNAL TABLE ,[object Object],[object Object],[object Object],DATA flight LIKE sflight occurs 0 with header line.
Total Record of  Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise I
Internal Table Processing ,[object Object],[object Object],[object Object],[object Object],[object Object]
SELECT … INNER JOIN ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Inner Join   into Internal Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Internal Table Without Header Line ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Internal Table Declaration ,[object Object],[object Object],[object Object]
ABAP Practice
Database Table Processing ,[object Object],[object Object],[object Object],[object Object],Database
Insert (Table) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Update Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Update customers set name = ‘John’ where id = 1.
Update Statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Modify Statement ,[object Object],[object Object],[object Object],[object Object]
Deleting Database Table Entries ,[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise II
Exercise II usr02-ltime usr02-trdat usr02-bname 1.  ห้ามใช้  SELECT * 2.  ใช้  Internal Table
Exercise III
Tables Relationship for User Master USR02-BNAME  USR02-TRDAT  ADCP-TEL_NUMBER USR02 USR21 ADCP BNAME PERSNUMBER ADDRNUMBER Tables Relationship
Exercise III : User Master usr02-bname usr02-trdat adcp-tel_number ใช้  Internal Table

Más contenido relacionado

La actualidad más candente

C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrency
xu liwei
 

La actualidad más candente (20)

Advanced Programming C++
Advanced Programming C++Advanced Programming C++
Advanced Programming C++
 
Unit i intro-operators
Unit   i intro-operatorsUnit   i intro-operators
Unit i intro-operators
 
CBSE Class XI Programming in C++
CBSE Class XI Programming in C++CBSE Class XI Programming in C++
CBSE Class XI Programming in C++
 
Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)Modern c++ (C++ 11/14)
Modern c++ (C++ 11/14)
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
C sharp part 001
C sharp part 001C sharp part 001
C sharp part 001
 
C++11 concurrency
C++11 concurrencyC++11 concurrency
C++11 concurrency
 
Loan-defaulters-predictions(Python codes)
Loan-defaulters-predictions(Python codes)Loan-defaulters-predictions(Python codes)
Loan-defaulters-predictions(Python codes)
 
C++ 11 Features
C++ 11 FeaturesC++ 11 Features
C++ 11 Features
 
L6
L6L6
L6
 
Managing input and output operations in c
Managing input and output operations in cManaging input and output operations in c
Managing input and output operations in c
 
CHAPTER 4
CHAPTER 4CHAPTER 4
CHAPTER 4
 
overloading in C++
overloading in C++overloading in C++
overloading in C++
 
Input Output Management In C Programming
Input Output Management In C ProgrammingInput Output Management In C Programming
Input Output Management In C Programming
 
Pointers
PointersPointers
Pointers
 
C++
C++C++
C++
 
C++ chapter 2
C++ chapter 2C++ chapter 2
C++ chapter 2
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
 
CP Handout#4
CP Handout#4CP Handout#4
CP Handout#4
 

Similar a 03 abap3-090715081232-phpapp01-100511101016-phpapp02

Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
wingsrai
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
tabish
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
tabish
 
07.advanced abap
07.advanced abap07.advanced abap
07.advanced abap
Phong Ho
 

Similar a 03 abap3-090715081232-phpapp01-100511101016-phpapp02 (20)

Looking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in ChennaiLooking for best Sap abap training institute in Chennai
Looking for best Sap abap training institute in Chennai
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Sap abap training Overview
Sap abap training OverviewSap abap training Overview
Sap abap training Overview
 
Tech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming languageTech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming language
 
07.advanced abap
07.advanced abap07.advanced abap
07.advanced abap
 
Odp
OdpOdp
Odp
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.
 
Alv theory
Alv theoryAlv theory
Alv theory
 
R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?
 
Zmalv output type_v1.1
Zmalv output type_v1.1Zmalv output type_v1.1
Zmalv output type_v1.1
 
Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]Laura Garcia - Shodan API and Coding Skills [rooted2019]
Laura Garcia - Shodan API and Coding Skills [rooted2019]
 
MongoDB Distilled
MongoDB DistilledMongoDB Distilled
MongoDB Distilled
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statement
 
New Framework - ORM
New Framework - ORMNew Framework - ORM
New Framework - ORM
 
Call session Method of BDC
Call session Method of BDCCall session Method of BDC
Call session Method of BDC
 

Último

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Último (20)

TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Magic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptxMagic bus Group work1and 2 (Team 3).pptx
Magic bus Group work1and 2 (Team 3).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 

03 abap3-090715081232-phpapp01-100511101016-phpapp02

  • 1.
  • 2. SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI SAP GUI
  • 3. 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 GUI
  • 4. SAP System : Dialog Processing Database Server Application Server Dispatcher Request Queue D D D D … SAP Buffer Program Table … 1 3 4 5 6 8 9 10 Report zpsm1. Tables customers. Select single * from customers where id = 1. Write: / customers-name. Execute ABAP statement 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
  • 5. Dialog Work Process Architecture TaskHandler DYNPRO Processor ABAP Processor Local Memory Memory Space DB Interface List buffer Database Server Dialog Work Process Result Set Memory
  • 6.
  • 7. 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
  • 8.
  • 9. Example Tables in DB sflight 75 20010226 0110 SQ 130 20010228 0400 LH 145 20010110 0400 LH 150 20010101 0400 LH price fldate connid carrid
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. 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
  • 15.
  • 16.
  • 17. Exercise I customers-id customers-name customers-city
  • 19.
  • 20.
  • 21.
  • 23.
  • 25. Select * : Example SELECT *
  • 26.
  • 27.
  • 28. Select Column : Example I
  • 29.
  • 30. Select Column : Example II
  • 31.
  • 32. Select Statement : Special Topics
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39. Exercise I customers-id customers-name customers-city ห้ามใช้ SELECT *
  • 40. Exercise II usr02-ltime usr02-trdat usr02-bname ห้ามใช้ SELECT *
  • 41. ABAP : Inner Join
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. Open SQL – Inner Join Table : A Table : B Single Result Table(Result set) Select … inner join.. Endselect. Database Server Application Server 1 2 b2 a2 b1 a1 b a c2 b2 c3 b3 c1 b1 c b b2 b1 B~b c2 a2 c1 a1 B~c A~a
  • 50.
  • 51. Inner Join/Outer Join Example ZPRODUCTS ZSALES ZSALEREPS ZCUSTOMERS 432555 Singapore David 3 234111 Bangkok Micheal 4 222222 London Peter 2 111111 New York John 1 tel city name id CD Tape Ruler Pencil Pen prod_name 120 X1 80 B1 99 Y1 125 A2 100 A1 on_hand p_id 90 50 10 qty 02 20020321 X1 3 01 20020318 A2 1 01 20020318 A1 1 sale_id sale_date prod_id cust_id Pipop 02 Somchai 01 name sale_id
  • 52.
  • 53.
  • 54.
  • 55.
  • 56. Exercise : User Master USR02-BNAME USR02-TRDAT ADCP-TEL_NUMBER USR02 USR21 ADCP BNAME PERSNUMBER ADDRNUMBER Tables Relationship
  • 57. ABAP : Outer Join
  • 58.
  • 59.
  • 60.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69. Standard Key of Internal Table Data: begin of tab occurs 0, f1 type C , f2 type I, f3 type N , f4 type P, end of tab. tab f4 f3 f2 f1
  • 70.
  • 71. Access Database Without Internal Table
  • 72. Access Database Using Internal Table
  • 73.
  • 74. Exercise I : Change Using Internal Table
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 91.
  • 92.
  • 93.
  • 94.
  • 95.
  • 96.
  • 98. Exercise II usr02-ltime usr02-trdat usr02-bname 1. ห้ามใช้ SELECT * 2. ใช้ Internal Table
  • 100. Tables Relationship for User Master USR02-BNAME USR02-TRDAT ADCP-TEL_NUMBER USR02 USR21 ADCP BNAME PERSNUMBER ADDRNUMBER Tables Relationship
  • 101. Exercise III : User Master usr02-bname usr02-trdat adcp-tel_number ใช้ Internal Table