Education Presentation ABAP Week-3
Education Presentation ABAP Week-3
Su DECLERATION
03
Su Values Assignment
07
3rd Week Session Goals
• Text-Based Editor • ABAP Data Types and Constants Fixed Data Objects
• Source Code Editor • Predefined ABAP Types Literals
• Bookmarks Quick Navigation • Incomplete/Complete Data Types Numeric Literals:
• Session Breakpoint • TYPES keyword Text Literals or Character Literals
• Line Number • User defined data types Text Symbols
• Changed Lines Inactive • Default Value of Predefined Types Assigning values to Text Symbols
• Entire line as comment • Structured data types Translate Text Symbols
• Part of the line • Constants Statement REPORT
• Block that Can be Compressed • DATA keyword Reporting Events
• Page Heading Line Size • TYPE keyword INITIALIZATION
• Different Color of: keywords variable literals • LIKE keyword START-OF-SELECTION
Comments • Structured Variable END-OF-SELECTION.
• Auto Completion Ctrl-Space Help • Default Data Type. Assigning values to ABAP variables
• Position of Cursor • ABAP System Variables MOVE keyword
• User-Specific Settings Editor • Write System Variables • keyword CLEAR
FLOW OF AN EXECUTABLE
ABAP EDITOR 1st Day DECLERATION 2nd Day 3rd Day
PROGRAM/REPORT
1 Day Session Goals:
st
• Text-Based Editor
• Source Code Editor
• Bookmarks Quick Navigation
100 Minutes • Session Breakpoint
• Line Number
Segment
There are several editors you can use to develop ABAP programs,
depending on the release and Support Package level. The choice
of editor is user-specific and is made in the Object Navigator by
following the menu path
Features of
User-Specific Settings
In User-Specific Settings there are following options in ABAP Editor
Tab which we need to configure to make Editor performance
better
Editor
Source Code-based Editor
Pretty Printer
Convert Upper Case / Lower Case
TEXT-BASED
EDITOR
Page Heading
Line Size Different Color of: keywords
Bookmarks Part of the variable literals Comments
line
Entire line as
Session
comment
Breakpoint
Auto
Completion
Auto Completion
Changed Lines Ctrl-Space Help
Inactive
Position of User-Specific
Cursor Settings
REPORT z00_testing NO STANDARD PAGE HEADING LINE-SIZE 43.
START-OF-SELECTION.
*Processing
MOVE gv_input TO gv_result.
DO 10 TIMES.
ADD 1 TO gv_result.
gv_result = gv_result + 1.
MULTIPLY gv_result BY 2.
ENDDO.
END-OF-SELECTION.
* OutPut
WRITE: 'INPUT',
gv_input.
NEW-LINE.
ULINE.
SKIP.
ULINE.
SKIP.
ULINE.
WRITE:/20(6)'RESULT', 40(2) gv_result.
ULINE. SE38: Test Program Code
Thank you!
FLOW OF AN EXECUTABLE
ABAP EDITOR 1st Day DECLERATION 2nd Day 3rd Day
PROGRAM/REPORT
2 Day Session Goals:
nd
• LIKE keyword
• Structured Variable
• Default Data Type.
100 Minutes • ABAP System Variables
• Write System Variables
Segment
Data Type
Data Types
Elementary Types ABAP Standard predefined types :
Fixed Types They are divided into two groups: Complete and incomplete types.
C The following implemented ABAP standard types are complete. This means that
they already contain a type-specific, fixed length specification:
N
D Complete ABAP Standard:
Fixed Length The following standard types do not contain a fixed length (incomplete). When they
are used to define data objects, you therefore still need to specify the length of the
String variable.
XString
Incomplete ABAP Standard Types:
Complex Types
Types which fixed length is to be specified:
Structure Type
C
Table Type N
X
P
Data Type ABAP Standard predefined types :
Data Types
Elementary Types They are divided into two groups: Complete and incomplete types.
Fixed Types Complete ABAP Standard:
C D Type for date(D), format: YYYYMMDD, length 8 (fixed)
N T Type for time (T), format: HHMMSS, length 6 (fixed)
I Type for integer (I), length 4 (fixed)
D F Type for floating point number (F), length 8 (fixed)
DECFLOAT16 Type for Decimal Floating point number, length 8
T DECFLOAT34 Type for Decimal Floating point number, length 16
STRING Type for dynamic length character string
X XSTRING Type for dynamic length byte sequence (Hexadecimal string)
P
Incomplete ABAP Standard Types:
I
F Types which fixed length is to be specified:
C
Fixed Length
N
X
String P
XString Data Type Description Default Length Default Value
C Character 1 ‘‘
Complex Types N Numeric 1 0
D Date 8 0
Structure Type T Time 6 0
X Hexadecimal 1 X’0′
Table Type
I Integer 4 0
P Packed 8 0
F Float 8 0
LOCAL DATA TYPES
Elementary Types
C
Structured data type is grouping of several simple N
data types under one name.
D
Structure Type
Table Type
DECLERATION
Each individual field of the structured variable can be accessed using hyphen Only use chained statements where appropriate
(-). For example, uname field of the system variable structure can be
accessed using sy-uname. Use chained statements mainly for declarations. They should always
be used for related declarations of type TYPES BEGIN OF ... TYPES
END OF ....
Roll Numbers Roll No.
ABAP-E-3-2-110
Student Name
Muhammad Nawaz
ABAP-E-3-2-259 Asma Shahzad
ABAP-E-3-2-459 Hamza Qayoom
ABAP-E-3-2-144 Muhammad Ismail Zia
ABAP-E-3-2-37 Adeel Saeed
ABAP-E-3-2-343 Saad Mehmood
ABAP-E-3-2-159 Muhammad Awais Aleem
ABAP-E-3-2-168 Muhammad Ayub
ABAP-E-3-2-452 Muhammad Farooq
ABAP-E-3-2-191 Arslan Mazhar
ABAP-E-3-2-451 Waqar Hussain Shahid
ABAP-E-3-2-197 Danish Gul
ABAP-E-3-2-340 Qayyum Ahsan
ABAP-E-3-2-254 Hafiz Muhammad Abubkar
ABAP-E-3-2-397 Umar Farooq
ABAP-E-3-2-398 Mateen Munir
ABAP-E-3-2-400 Fahad Khalid
ABAP-E-3-2-401 Zain ulabdeen
ABAP-E-3-2-357 Muhammad Abubakar Saeed
ABAP-E-3-2-377 Aniya Raees
ABAP-E-3-2-413 Abdul Ahad
ABAP-E-3-2-204 Muhammad Ubaidullah
ABAP-E-3-2-418 Hassan Zulfiqar
ABAP-E-3-2-349 Syed Zia Ud Din Ahmed
ABAP-E-3-2-407 Wajid Yousaf
Roll Numbers Roll No.
ABAP-M-2-1-12
Student Name
Muhammad Jhanzaib
ABAP-M-2-1-208 Taimur Ul Hassan Ghouri
ABAP-M-2-1-294 Maryam Arshad
ABAP-M-2-1-310 Faisal Yasin
ABAP-M-2-1-461 Malik Omer
ABAP-M-2-1-1 Syed Ali Mubashar Kazmi
ABAP-M-2-1-85 Mughees Ahmed Mirza
ABAP-M-2-1-9 Sher Ali
ABAP-M-2-1-31 Muhammad Hamid
ABAP-M-2-1-35 Umer Munir
ABAP-M-2-1-447 Kamil Humayun Mirza
ABAP-M-2-1-148 Nadeem Saleem
ABAP-M-2-1-332 Usman Anwar
ABAP-M-2-1-43 Hafiz Muhammad Ishtiaq
ABAP-M-2-1-47 Zain Khawar
ABAP-M-2-1-50 Hamza Amjad
ABAP-M-2-1-52 Muhammad Raza Liaqat
ABAP-M-2-1-62 Hassan Arif
ABAP-M-2-1-82 Rizwan Saeed Khawaja
ABAP-M-2-1-226 Usama Azeem
ABAP-M-2-1-211 Muhammad Faizan Razzaq
ABAP-M-2-1-104 Safi Ur Rehman
ABAP-M-2-1-84 Hafiz Muhammad Naveed
ABAP-M-2-1-330 Muhammad Sumair
ABAP-M-2-1-395 Muhammad Hussain
For feedback, please write at
Thank you!
FLOW OF AN EXECUTABLE
ABAP EDITOR 1st Day DECLERATION 2nd Day 3rd Day
PROGRAM/REPORT
3 Day Session Goals:
rd
• START-OF-SELECTION
• END-OF-SELECTION.
• Assigning values to ABAP variables
100 Minutes • MOVE keyword
• keyword CLEAR
Segment
ELEMENTARY DATA
OBJECTS
A text symbol has the data type c and the length defined in the text Go to Text Element or press F5 to maintain text symbol
elements by mlen. ABAP Editor, choose Goto → Text Elements → Text Symbols
A text symbol behaves like a constant and can be specified in reading Text symbols each belong to a particular program and can be used in
positions using its names as follows: it directly. They are stored outside the source code in their own
Repository object
Click Here
It must be
Active
Introductory statement of a
program
Reporting Events
The following are event key words for reporting events (in order)
which are trigger in an ABAP report program:
LOAD-OF-PROGRAM.
INITIALIZATION.
AT SELECTION-SCREEN.
AT SELECTION-SCREEN ON BLOCK.
AT SELECTION-SCREEN OUTPUT.
START-OF-SELECTION.
GET node (obsolete, for logical databases only).
END-OF-SELECTION (obsolete, for logical databases only).
Reporting events are raised in a predefined order and only in executable programs
started using SUBMIT. In general, every executable program is started implicitly
using SUBMIT. Only starts using regular transaction codes (not reporting
transactions) or external calls of their procedures do not raise SUBMITs.
INITIALIZATION
This event keyword defines an event block for initializing an
executable program.
--------------------------------------------------
PARAMETERS p_langu TYPE pgl_langu.
INITIALIZATION.
p_langu = sy-langu.
--------------------------------------------------
Reporting Events
START-OF-SELECTION
This event keyword defines the standard processing block of an
executable program.
--------------------------------------------------
DATA text TYPE string.
START-OF-SELECTION.
text = `Hello World!`.
WRITE text.
--------------------------------------------------
Value Assignments
Thank you!