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
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