Your SlideShare is downloading. ×
0
ABAP Programming   Overview
ABAP Course Outline <ul><li>Chapter 1 : Introduction to ABAP </li></ul><ul><li>Chapter 2 : List Processing in ABAP </li></...
ABAP Chapter 1 <ul><li>Introduction to SAP Architecture </li></ul><ul><li>ABAP Overview </li></ul><ul><li>Data Object in A...
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 Serve...
Dialog Processing
SAP System : Dialog Processing Database Server Application Server Dispatcher Request Queue D D D D … SAP Buffer Program Ta...
Dialog Work Process Architecture TaskHandler DYNPRO Processor ABAP Processor Local Memory Memory Space DB Interface List b...
ABAP Programming Overview
ABAP Overview DATA ... WRITE ... IF ... MOVE … WHILE... *Comment... SEARCH ... SELECT ... LOOP AT ... DO  ...
ABAP <ul><li>A dvanced </li></ul><ul><li>B usiness </li></ul><ul><li>A pplication </li></ul><ul><li>P rogramming   </li></ul>
ABAP Feature <ul><li>Declaring data with various types and structure </li></ul><ul><li>Operational elements for data manip...
ABAP  <ul><li>Operating/Database system-independent programming  </li></ul><ul><li>ABAP contains a subset of SQL called  O...
ABAP  Programming  <ul><li>ABAP Report  </li></ul><ul><li>Dialog Programming(Transaction) </li></ul>
ABAP Program : Report Report Program : attribute type 1 (executable) Reading Database <ul><li>Reading data </li></ul>
Types of ABAP Report 1. Report Listing 2. Drill-down Report 3. Control-break Report 4. ALV Report 1 3 4
ABAP Program : Dialog Program Dialog Program : attribute type M (Module Pool) Reading Database <ul><li>Reading and  changi...
Dialog Program : Transaction
ABAP Programming
How to create ABAP program  Transaction Code : SE38
Transaction : SE38
Program Attribute
ABAP Editor
The Structure of the Language <ul><li>Each statement must end with a period </li></ul>DATA  tmp  TYPE  I. WRITE ‘Hello Wor...
Literal DATA  tmp  TYPE  I. WRITE ‘Hello World’. WRITE ’10’.   MOVE  9 TO tmp.   Text Literal Numeric Literal Text Literal
Chained Statements <ul><li>Successive statements that have the same string segment can be combined to form a single chaine...
Chained Statements <ul><ul><li>WRITE ‘Hello World’.  </li></ul></ul><ul><ul><li>WRITE  ‘OK’.  </li></ul></ul><ul><ul><li>=...
Chained Statement <ul><ul><ul><li>MOVE  sy-subrc  TO  tmp1. </li></ul></ul></ul><ul><ul><ul><li>MOVE  sy-subrc  TO  tmp2. ...
Chained Statement <ul><ul><ul><li>PERFORM  cal_1  USING  a1  a2. </li></ul></ul></ul><ul><ul><ul><li>PERFORM  cal_1  USING...
Comments * This is  full line  comment WRITE ‘Hello World’.  “ Write data  (partial line comment)   WRITE ‘Test’.
ABAP Command : Case Sensitivity <ul><li>ABAP command is not case sensitive </li></ul><ul><ul><li>WRITE ‘Hello World’.  </l...
Data Objects in ABAP
Data Objects in ABAP <ul><li>Memory Space </li></ul>Structure Table Structure Internal Table Variable Constants <Field-sym...
Variable
Variable <ul><li>Variables can be declared at any point in a program  </li></ul><ul><li>Variables can be up to 30 characte...
Predefined ABAP Data Types Type Description Initial Value C D F I N P T X String xstring Character Date Floating Point Int...
Defining Variable with DATA Statement * Syntax DATA  var[( length )]  [Type  type ]  [Decimals   number ]. DATA  var  LIKE...
Defining Variable with DATA Statement * Data Declaration DATA: tmp(10)  TYPE  C, tmp1  TYPE  I, tmp2(8)  TYPE P  DECIMALS ...
Defining Variable with DATA Statement * Data Declaration DATA  customerno  LIKE  customers-id. DATA  matnr   LIKE  mara-ma...
ABAP Predefined Data Types ABAP Predefined Data Types Complete Types (I,F,D,T,STRING and XSTRING) Incomplete Types (C,N,P ...
Variable <ul><li>Data Type  C , N  and  X  length between  1 – 65535  (Default 1)  </li></ul><ul><li>Data Type  P  length ...
Data type N <ul><li>data tmp(5) type N. </li></ul><ul><li>tmp = ‘Xca9yy23K6’. </li></ul>
ABAP Error System Runtime Error User Runtime Error Time Exceed (10 Minutes) Cannot Allocate Space ABAP Error Syntax  Error...
User Runtime Error DATA result TYPE i. result = 10 / 0.
System Runtime Error : Space Allocation
System Runtime Error : Time Exceed
Non-elementary Type <ul><ul><li>* Data Declaration </li></ul></ul><ul><ul><li>TYPES  tname(30)  TYPE  c. </li></ul></ul><u...
Value Assignment * Value  assignment DATA:  name1(30), first_num  TYPE  I , next_num  TYPE  I. MOVE  ‘XXXX’  TO  name1. MO...
Value Assignment * Value  assignment DATA:  tmp1  TYPE  i , tmp2  TYPE  i . tmp1 = tmp2 = 10.
ABAP Practice  ต้องการให้สร้างตัวแปรชื่อ  firstname  และ  lastname  โดยให้ค่าชื่อของคุณกับ ตัวแปร  firstname  และนามสกุลขอ...
Structure
Structure <ul><ul><li>* Syntax </li></ul></ul><ul><ul><li>DATA  BEGIN  OF  < structure name >. </li></ul></ul><ul><ul><li>...
Structure <ul><ul><li>* Syntax </li></ul></ul><ul><ul><li>DATA  BEGIN  OF  wa. </li></ul></ul><ul><ul><li>DATA   id  LIKE ...
Defining Structure (Include Structure) <ul><ul><li>* Include Structure </li></ul></ul><ul><ul><li>DATA  BEGIN  OF  wa. </l...
Defining Structure <ul><ul><li>* LIKE option </li></ul></ul><ul><ul><li>DATA  wa LIKE customers. </li></ul></ul><ul><ul><l...
ABAP Practice  ต้องการให้สร้าง  Structure  ชื่อ  myname  โดยมีฟิลด์  firstname  และ  lastname  โดยให้ค่าชื่อของคุณกับฟิลด์...
Constants
Constants <ul><ul><li>* Constant variable </li></ul></ul><ul><ul><li>CONSTANTS  max_no  TYPE  I  VALUE  999.   </li></ul><...
Constants Using Example <ul><ul><li>* Constant variable </li></ul></ul><ul><ul><li>CONSTANTS  ctext(11)  TYPE  C  VALUE  ‘...
System Fields <ul><li>The system fields (structure syst) are filled by the runtime environment. You can use them to query ...
ABAP System Fields : Structure SYST (SE11)
DATE * Fixed Length  8 * Include Representation  ‘ YYYYMMDD ’ DATA  today  TYPE  D. today  =  sy-datum. WRITE  today. toda...
TIME <ul><ul><li>* Fixed Length  6 </li></ul></ul><ul><ul><li>* Format  ‘HHMMSS’ </li></ul></ul><ul><ul><li>DATA  times  T...
MOVE Statement DATA   wa LIKE customers . DATA  vender  LIKE  customers.   wa -id  =  ‘1234’. wa -name  =  ‘Test#1’. MOVE ...
MOVE-CORRESPONDING Statement DATA: begin of wa1, f1,f2,f4, end of wa1 . DATA: begin of wa2, f2,f1,f3, end of wa2 . … MOVE ...
Field-symbols
Field-symbols <ul><ul><li>Data:  name (4)  Value  ‘Test’, </li></ul></ul><ul><ul><li>num  Type  I  Value  10, </li></ul></...
Field-symbols : UNASSIGN <ul><ul><li>d ata:  name (4)  Value  ‘Test’, </li></ul></ul><ul><ul><li>f ield-symbols  <temp>. <...
CLEAR Statement <ul><li>Example: </li></ul><ul><ul><ul><li>DATA tmp type i value 9. </li></ul></ul></ul><ul><ul><ul><li>tm...
CLEAR Structure <ul><ul><ul><li>DATA wa like customers. </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><ul>...
ABAP Report : Program Structure <ul><li>Report ztest. </li></ul><ul><li>*Data objects declaration </li></ul><ul><li>data ....
ABAP Practice
Upcoming SlideShare
Loading in...5
×

Chapter 1 Abap Programming Overview

5,531

Published on

Getting Started : Basics of ABAP.

Published in: Career, Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,531
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
390
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Chapter 1 Abap Programming Overview"

  1. 1. ABAP Programming Overview
  2. 2. ABAP Course Outline <ul><li>Chapter 1 : Introduction to ABAP </li></ul><ul><li>Chapter 2 : List Processing in ABAP </li></ul><ul><li>Chapter 3 : Open SQL & Internal Table </li></ul><ul><li>Chapter 4 : Event-driven Programming & </li></ul><ul><li>Selection Screen </li></ul><ul><li>Chapter 5 : Modularization & Catch Statement </li></ul><ul><li>Chapter 6 : Message, Debugging, File Transfer and Type Group </li></ul>
  3. 3. ABAP Chapter 1 <ul><li>Introduction to SAP Architecture </li></ul><ul><li>ABAP Overview </li></ul><ul><li>Data Object in ABAP </li></ul>
  4. 4. SAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUI SAP GUI
  5. 5. 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 MaxDB G Dispatcher Request Queue D D B V S E SAP Buffer (Shared Mem) SAP GUI SAP GUI
  6. 6. Dialog Processing
  7. 7. 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
  8. 8. 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
  9. 9. ABAP Programming Overview
  10. 10. ABAP Overview DATA ... WRITE ... IF ... MOVE … WHILE... *Comment... SEARCH ... SELECT ... LOOP AT ... DO ...
  11. 11. ABAP <ul><li>A dvanced </li></ul><ul><li>B usiness </li></ul><ul><li>A pplication </li></ul><ul><li>P rogramming </li></ul>
  12. 12. ABAP Feature <ul><li>Declaring data with various types and structure </li></ul><ul><li>Operational elements for data manipulation </li></ul><ul><li>Control elements for controlling the program flow </li></ul><ul><li>Event elements for reacting to external events </li></ul>
  13. 13. ABAP <ul><li>Operating/Database system-independent programming </li></ul><ul><li>ABAP contains a subset of SQL called Open SQL for comfortable database access for various database </li></ul>
  14. 14. ABAP Programming <ul><li>ABAP Report </li></ul><ul><li>Dialog Programming(Transaction) </li></ul>
  15. 15. ABAP Program : Report Report Program : attribute type 1 (executable) Reading Database <ul><li>Reading data </li></ul>
  16. 16. Types of ABAP Report 1. Report Listing 2. Drill-down Report 3. Control-break Report 4. ALV Report 1 3 4
  17. 17. ABAP Program : Dialog Program Dialog Program : attribute type M (Module Pool) Reading Database <ul><li>Reading and changing data </li></ul>Writing
  18. 18. Dialog Program : Transaction
  19. 19. ABAP Programming
  20. 20. How to create ABAP program Transaction Code : SE38
  21. 21. Transaction : SE38
  22. 22. Program Attribute
  23. 23. ABAP Editor
  24. 24. The Structure of the Language <ul><li>Each statement must end with a period </li></ul>DATA tmp TYPE I. WRITE ‘Hello World’. WRITE ‘OK’.
  25. 25. Literal DATA tmp TYPE I. WRITE ‘Hello World’. WRITE ’10’. MOVE 9 TO tmp. Text Literal Numeric Literal Text Literal
  26. 26. Chained Statements <ul><li>Successive statements that have the same string segment can be combined to form a single chained statement </li></ul><ul><li>To do so, you specify the identical starting segment once and conclude it with a colon (:), the remaining segments are then listed, separated by commas (,) and concluded with a period (.) </li></ul><ul><li>At runtime, a chained statement is treated like an equivalent sequence of individual ABAP statements </li></ul>
  27. 27. Chained Statements <ul><ul><li>WRITE ‘Hello World’. </li></ul></ul><ul><ul><li>WRITE ‘OK’. </li></ul></ul><ul><ul><li>= </li></ul></ul><ul><ul><li>WRITE: ‘Hello World’, ‘OK’. </li></ul></ul><ul><ul><li>DATA tmp1 TYPE I. </li></ul></ul><ul><ul><li>DATA tmp2 TYPE C. </li></ul></ul><ul><ul><li>= </li></ul></ul><ul><ul><li>DATA: tmp1 TYPE I, </li></ul></ul><ul><ul><li>tmp2 TYPE C. </li></ul></ul>
  28. 28. Chained Statement <ul><ul><ul><li>MOVE sy-subrc TO tmp1. </li></ul></ul></ul><ul><ul><ul><li>MOVE sy-subrc TO tmp2. </li></ul></ul></ul><ul><ul><ul><li>MOVE sy-subrc TO tmp3. </li></ul></ul></ul><ul><ul><ul><li>= </li></ul></ul></ul><ul><ul><ul><li>MOVE sy-subrc TO: tmp1, </li></ul></ul></ul><ul><ul><ul><li>tmp2, </li></ul></ul></ul><ul><ul><ul><li>tmp3. </li></ul></ul></ul>
  29. 29. Chained Statement <ul><ul><ul><li>PERFORM cal_1 USING a1 a2. </li></ul></ul></ul><ul><ul><ul><li>PERFORM cal_1 USING a3 a4. </li></ul></ul></ul><ul><ul><ul><li>= </li></ul></ul></ul><ul><ul><ul><li>PERFORM cal_1 USING: a1 a2, </li></ul></ul></ul><ul><ul><ul><li>a3 a4. </li></ul></ul></ul>
  30. 30. Comments * This is full line comment WRITE ‘Hello World’. “ Write data (partial line comment) WRITE ‘Test’.
  31. 31. ABAP Command : Case Sensitivity <ul><li>ABAP command is not case sensitive </li></ul><ul><ul><li>WRITE ‘Hello World’. </li></ul></ul><ul><ul><li>WriTe ‘Hello World’. </li></ul></ul><ul><ul><li>wRiTE ‘Hello World’. </li></ul></ul>
  32. 32. Data Objects in ABAP
  33. 33. Data Objects in ABAP <ul><li>Memory Space </li></ul>Structure Table Structure Internal Table Variable Constants <Field-symbols>
  34. 34. Variable
  35. 35. Variable <ul><li>Variables can be declared at any point in a program </li></ul><ul><li>Variables can be up to 30 characters in length </li></ul>REPORT ZTEST. DATA firstname TYPE STRING. firstname = ‘John’.
  36. 36. Predefined ABAP Data Types Type Description Initial Value C D F I N P T X String xstring Character Date Floating Point Integer Numeric Text Packed Decimal Time Hexadecimal Variable-length Variable-length Hexadecimal Space ‘ 00000000’ 0.0 0 ‘ 0’ 0 ‘ 000000’ ’ 00’ Space Blank string Length 1 – 65535 8 characters 8 bytes 4 bytes 1 – 65535 1 – 16 bytes 6 characters 1 – 65535 Variable Variable
  37. 37. Defining Variable with DATA Statement * Syntax DATA var[( length )] [Type type ] [Decimals number ]. DATA var LIKE Table-Field [VALUE initial value ].
  38. 38. Defining Variable with DATA Statement * Data Declaration DATA: tmp(10) TYPE C, tmp1 TYPE I, tmp2(8) TYPE P DECIMALS 2 VALUE ‘1.50’. DATA: tmp3(5) TYPE N, tmp4.
  39. 39. Defining Variable with DATA Statement * Data Declaration DATA customerno LIKE customers-id. DATA matnr LIKE mara-matnr . DATA customerno TYPE customers-id. DATA matnr TYPE mara-matnr.
  40. 40. ABAP Predefined Data Types ABAP Predefined Data Types Complete Types (I,F,D,T,STRING and XSTRING) Incomplete Types (C,N,P and X)
  41. 41. Variable <ul><li>Data Type C , N and X length between 1 – 65535 (Default 1) </li></ul><ul><li>Data Type P length between 1 – 16 (Default 8) and decimals length between 0 – 31 </li></ul><ul><li>Data Type I value between – 2 31 to 2 31 – 1 </li></ul><ul><li>or –2,147,483,648 to 2,147,483,647 </li></ul>DATA tmp(10) TYPE C. DATA tmp(5) TYPE P DECIMALS 2. DATA tmp TYPE I. tmp = 1000000.
  42. 42. Data type N <ul><li>data tmp(5) type N. </li></ul><ul><li>tmp = ‘Xca9yy23K6’. </li></ul>
  43. 43. ABAP Error System Runtime Error User Runtime Error Time Exceed (10 Minutes) Cannot Allocate Space ABAP Error Syntax Error Runtime Error
  44. 44. User Runtime Error DATA result TYPE i. result = 10 / 0.
  45. 45. System Runtime Error : Space Allocation
  46. 46. System Runtime Error : Time Exceed
  47. 47. Non-elementary Type <ul><ul><li>* Data Declaration </li></ul></ul><ul><ul><li>TYPES tname(30) TYPE c. </li></ul></ul><ul><ul><li>DATA: customer_name TYPE tname, </li></ul></ul><ul><ul><li>firstname TYPE tname. </li></ul></ul>
  48. 48. Value Assignment * Value assignment DATA: name1(30), first_num TYPE I , next_num TYPE I. MOVE ‘XXXX’ TO name1. MOVE 5 TO first_num. COMPUTE next_num = first_num + 5. name1 = ‘SAP’. ADD 1 TO next_num.
  49. 49. Value Assignment * Value assignment DATA: tmp1 TYPE i , tmp2 TYPE i . tmp1 = tmp2 = 10.
  50. 50. ABAP Practice ต้องการให้สร้างตัวแปรชื่อ firstname และ lastname โดยให้ค่าชื่อของคุณกับ ตัวแปร firstname และนามสกุลของคุณให้กับตัวแปร lastname พร้อมทั้งแสดง ค่าข้อมูล firstname กับ lastname ออกมาที่หน้าจอ
  51. 51. Structure
  52. 52. Structure <ul><ul><li>* Syntax </li></ul></ul><ul><ul><li>DATA BEGIN OF < structure name >. </li></ul></ul><ul><ul><li>DATA field1. </li></ul></ul><ul><ul><li>DATA field2. </li></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><ul><li>DATA END OF < structure name >. </li></ul></ul>
  53. 53. Structure <ul><ul><li>* Syntax </li></ul></ul><ul><ul><li>DATA BEGIN OF wa. </li></ul></ul><ul><ul><li>DATA id LIKE customers-id . </li></ul></ul><ul><ul><li>DATA name LIKE customers-name . </li></ul></ul><ul><ul><li>DATA city LIKE customers-city . </li></ul></ul><ul><ul><li>DATA END OF wa. </li></ul></ul><ul><ul><li>MOVE 9 TO wa-id. </li></ul></ul><ul><ul><li>WRITE wa-id. </li></ul></ul>id city wa 00000000 name
  54. 54. Defining Structure (Include Structure) <ul><ul><li>* Include Structure </li></ul></ul><ul><ul><li>DATA BEGIN OF wa. </li></ul></ul><ul><ul><li>INCLUDE STRUCTURE customers. </li></ul></ul><ul><ul><li>DATA tel(7). </li></ul></ul><ul><ul><li>DATA END OF wa. </li></ul></ul>
  55. 55. Defining Structure <ul><ul><li>* LIKE option </li></ul></ul><ul><ul><li>DATA wa LIKE customers. </li></ul></ul><ul><ul><li>wa-id = 1. </li></ul></ul><ul><ul><li>wa-name = ‘John’. </li></ul></ul><ul><ul><li>WRITE: wa-id, wa-name. </li></ul></ul>
  56. 56. ABAP Practice ต้องการให้สร้าง Structure ชื่อ myname โดยมีฟิลด์ firstname และ lastname โดยให้ค่าชื่อของคุณกับฟิลด์ firstname และนามสกุลของคุณให้กับฟิลด์ lastname พร้อมทั้งแสดงค่าข้อมูลของ Structure ที่ชื่อ myname ทั้งฟิลด์ firstname และ lastname ออกมาที่หน้าจอ
  57. 57. Constants
  58. 58. Constants <ul><ul><li>* Constant variable </li></ul></ul><ul><ul><li>CONSTANTS max_no TYPE I VALUE 999. </li></ul></ul><ul><ul><li>DATA counter TYPE I VALUE max_no. </li></ul></ul><ul><ul><li>WRITE: max_no, counter. </li></ul></ul>
  59. 59. Constants Using Example <ul><ul><li>* Constant variable </li></ul></ul><ul><ul><li>CONSTANTS ctext(11) TYPE C VALUE ‘Hello World’. </li></ul></ul><ul><ul><li>WRITE ctext. </li></ul></ul><ul><ul><li>WRITE ctext. </li></ul></ul><ul><ul><li>WRITE ctext. </li></ul></ul><ul><ul><li>WRITE ctext. </li></ul></ul><ul><ul><li>WRITE ctext. </li></ul></ul>
  60. 60. System Fields <ul><li>The system fields (structure syst) are filled by the runtime environment. You can use them to query the system status in an ABAP program </li></ul><ul><li>You should access them only for reading </li></ul><ul><ul><li>sy-datum = Current date of application server </li></ul></ul><ul><ul><li>sy-uzeit = Current time of application server </li></ul></ul><ul><ul><li>sy-datlo = Current date of SAP GUI </li></ul></ul><ul><ul><li>sy-timlo = Current time of SAP GUI </li></ul></ul><ul><ul><li>sy-mandt = Current client logon </li></ul></ul><ul><ul><li>sy-subrc = Return value of ABAP statement </li></ul></ul>syst-datum
  61. 61. ABAP System Fields : Structure SYST (SE11)
  62. 62. DATE * Fixed Length 8 * Include Representation ‘ YYYYMMDD ’ DATA today TYPE D. today = sy-datum. WRITE today. today = ‘19991231’. WRITE today.
  63. 63. TIME <ul><ul><li>* Fixed Length 6 </li></ul></ul><ul><ul><li>* Format ‘HHMMSS’ </li></ul></ul><ul><ul><li>DATA times TYPE T. </li></ul></ul><ul><ul><li>times = sy-uzeit. </li></ul></ul><ul><ul><li>WRITE times. </li></ul></ul>HHMMSS
  64. 64. MOVE Statement DATA wa LIKE customers . DATA vender LIKE customers. wa -id = ‘1234’. wa -name = ‘Test#1’. MOVE wa TO vender. WRITE: wa -id, vender-name. “ vender = wa.
  65. 65. MOVE-CORRESPONDING Statement DATA: begin of wa1, f1,f2,f4, end of wa1 . DATA: begin of wa2, f2,f1,f3, end of wa2 . … MOVE -CORRESPONDING wa1 TO wa2 . WRITE: wa1-f1 , wa2-f1 .
  66. 66. Field-symbols
  67. 67. Field-symbols <ul><ul><li>Data: name (4) Value ‘Test’, </li></ul></ul><ul><ul><li>num Type I Value 10, </li></ul></ul><ul><ul><li>today Type D Value ‘19980429’. </li></ul></ul><ul><ul><li>Field-symbols <temp>. </li></ul></ul><ul><ul><li>Assign name To <temp>. </li></ul></ul><ul><ul><li>Write <temp>. </li></ul></ul><ul><ul><li>Assign num To <temp>. </li></ul></ul><ul><ul><li>Write <temp>. </li></ul></ul><ul><ul><li>Assign today To <temp>. </li></ul></ul><ul><ul><li>Write <temp>. </li></ul></ul>
  68. 68. Field-symbols : UNASSIGN <ul><ul><li>d ata: name (4) Value ‘Test’, </li></ul></ul><ul><ul><li>f ield-symbols <temp>. </li></ul></ul><ul><ul><li>a ssign name To <temp>. </li></ul></ul><ul><ul><li>w rite <temp>. </li></ul></ul><ul><ul><li>una ssign <temp>. </li></ul></ul>
  69. 69. CLEAR Statement <ul><li>Example: </li></ul><ul><ul><ul><li>DATA tmp type i value 9. </li></ul></ul></ul><ul><ul><ul><li>tmp = 10. </li></ul></ul></ul><ul><ul><ul><li>CLEAR tmp. </li></ul></ul></ul>“ Clear statement sets a field to an initial value appropriate for its type” CLEAR < data object >.
  70. 70. CLEAR Structure <ul><ul><ul><li>DATA wa like customers. </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><ul><ul><li>CLEAR wa. </li></ul></ul></ul>
  71. 71. ABAP Report : Program Structure <ul><li>Report ztest. </li></ul><ul><li>*Data objects declaration </li></ul><ul><li>data ... </li></ul><ul><li>data begin of ... </li></ul><ul><li>*Program Logic(Data objects processing) </li></ul><ul><li>… </li></ul><ul><li>write …. </li></ul>
  72. 72. ABAP Practice
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×