SlideShare a Scribd company logo
1 of 72
ABAP ProgrammingABAP Programming OverviewOverview
ABAP Course Outline
 Chapter 1 : Introduction to ABAP
 Chapter 2 : List Processing in ABAP
 Chapter 3 : Open SQL & Internal Table
 Chapter 4 : Event-driven Programming &
Selection Screen
 Chapter 5 : Modularization & Catch Statement
 Chapter 6 : Message, Debugging, File Transfer
and Type Group
ABAP Chapter 1
 Introduction to SAP Architecture
 ABAP Overview
 Data Object in ABAP
SAP System : 3 Tier Client/ServerSAP System : 3 Tier Client/Server
DB Server
SAP
Application
Server
SAP GUI Presentation
Server
SAP GUISAP GUI
SAP SYSTEM (3 Tier Architecture)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
Dialog Processing
Database Server
Application Server
Dispatcher
Request
Queue
D D D D…
SAP Buffer
Program
Table
…
1
3
4
5
68
9
10
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
Reques
t List
2 Search for
free WP
Store request
to queue
Send request
to WP
SAP GUI
SAP System : Dialog Processing
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
ABAP Programming Overview
ABAP Overview
DATA ...DATA ...
WRITE ..WRITE ..
..
IF ...IF ...MOVE …MOVE …
WHILE...WHILE...
*Comment...*Comment...
SEARCH ...SEARCH ...
SELECT ...SELECT ...
LOOP AT ...LOOP AT ...DO ...DO ...
ABAPABAP
AAdvanced
BBusiness
AApplication
PProgramming
ABAP FeatureABAP Feature
 Declaring data with various types and structure
 Operational elements for data manipulation
 Control elements for controlling the program
flow
 Event elements for reacting to external events
ABAPABAP
 Operating/Database system-independent
programming
 ABAP contains a subset of SQL called Open SQLOpen SQL
for comfortable database access for variousvarious
databasedatabase
ABAP ProgrammingABAP Programming
 ABAP Report
 Dialog Programming(Transaction)
ABAP Program : ReportABAP Program : Report
Data
Report Program
: attribute type 1
(executable)
Reading
Database
 Reading dataReading data
Types of ABAP Report
1. Report Listing
2. Drill-down Report
3. Control-break Report
4. ALV Report
1
3
4
ABAP Program : Dialog ProgramABAP Program : Dialog Program
Data
Dialog Program
: attribute type M
(Module Pool)
Reading
Database
 Reading and changing dataReading and changing data
Writing
Dialog Program : Transaction
ABAP Programming
How to create ABAP program
Transaction Code : SE38
Transaction : SE38
Program Attribute
ABAP Editor
The Structure of the LanguageThe Structure of the Language
 Each statement must end with a period
DATA tmp TYPE I.
WRITE ‘Hello World’. WRITE ‘OK’.
LiteralLiteral
DATA tmp TYPE I.
WRITE ‘Hello World’.
WRITE ’10’.
MOVE 9 TO tmp.
Text Literal
Numeric Literal
Text Literal
Chained Statements
 Successive statements that have the same string
segment can be combined to form a single
chained statement
 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 (.)
 At runtime, a chained statement is treated like an
equivalent sequence of individual ABAP
statements
Chained StatementsChained Statements
WRITE ‘Hello World’.
WRITE ‘OK’.
=
WRITE: ‘Hello World’, ‘OK’.
DATA tmp1 TYPE I.
DATA tmp2 TYPE C.
=
DATA: tmp1 TYPE I,
tmp2 TYPE C.
Chained StatementChained Statement
MOVE sy-subrc TO tmp1.
MOVE sy-subrc TO tmp2.
MOVE sy-subrc TO tmp3.
=
MOVE sy-subrc TO: tmp1,
tmp2,
tmp3.
Chained StatementChained Statement
PERFORM cal_1 USING a1 a2.
PERFORM cal_1 USING a3 a4.
=
PERFORM cal_1 USING: a1 a2,
a3 a4.
CommentsComments
* This is full line comment
WRITE ‘Hello World’. “ Write data (partial line comment)
WRITE ‘Test’.
ABAP Command : Case SensitivityABAP Command : Case Sensitivity
WRITE ‘Hello World’.
WriTe ‘Hello World’.
wRiTE ‘Hello World’.
 ABAP command is not case sensitive
Data Objects in ABAP
Data Objects in ABAPData Objects in ABAP
Memory Space
Structure
Table Structure Internal Table
Variable
Constants <Field-symbols>
Variable
VariableVariable
 Variables can be declared at any point in a program
 Variables can be up to 30 characters in length
REPORT ZTEST.
DATA firstname TYPE STRING.
firstname = ‘John’.
Predefined ABAP Data TypesPredefined 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
Defining Variable with DATA StatementDefining Variable with DATA Statement
* Syntax
DATA var[(length)] [Type type] [Decimals number].
DATA var LIKE Table-Field [VALUE initial value].
Defining Variable with DATA StatementDefining 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.
Defining Variable with DATA StatementDefining 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.
ABAP Predefined Data Types
ABAP Predefined Data Types
Complete Types
(I,F,D,T,STRING and XSTRING)
Incomplete Types
(C,N,P and X)
Variable
 Data Type C,N and X length between 1 – 65535
(Default 1)
 Data Type P length between 1 – 16 (Default 8) and
decimals length between 0 – 31
 Data Type I value between – 231
to 231
– 1
or –2,147,483,648 to 2,147,483,647
DATA tmp(10) TYPE C.
DATA tmp(5) TYPE P DECIMALS 2.
DATA tmp TYPE I.
tmp = 1000000.
Data type N
data tmp(5) type N.
tmp = ‘Xca9yy23K6’.
ABAP Error
ABAP Error
Syntax
Error
Runtime
Error
System Runtime
Error
User Runtime
Error
Time Exceed
(10 Minutes)
Cannot Allocate
Space
User Runtime Error
DATA result TYPE i.
result = 10 / 0.
System Runtime Error : Space Allocation
System Runtime Error : Time Exceed
Non-elementary TypeNon-elementary Type
* Data Declaration
TYPES tname(30) TYPE c.
DATA: customer_name TYPE tname,
firstname TYPE tname.
Value AssignmentValue 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.
Value AssignmentValue Assignment
* Value assignment
DATA: tmp1 TYPE i,
tmp2 TYPE i.
tmp1 = tmp2 = 10.
ABAP Practice
การให้สร้างตัวแปรชื่อ firstname และ lastname โดยให้ค่าชื่อขอ
ปร firstname และนามสกุลของคุณให้กับตัวแปร lastname พร้อม
อมูล firstname กับ lastname ออกมาที่หน้าจอ
Structure
StructureStructure
* Syntax
DATA BEGIN OF <structure name>.
DATA field1.
DATA field2.
…
…
DATA END OF <structure name>.
StructureStructure
* Syntax
DATA BEGIN OF wa.
DATA id LIKE customers-id.
DATA name LIKE customers-name.
DATA city LIKE customers-city.
DATA END OF wa.
MOVE 9 TO wa-id.
WRITE wa-id.
id city
wa
00000000
name
Defining Structure (Include Structure)Defining Structure (Include Structure)
* Include Structure
DATA BEGIN OF wa.
INCLUDE STRUCTURE customers.
DATA tel(7).
DATA END OF wa.
Defining StructureDefining Structure
* LIKE option
DATA wa LIKE customers.
wa-id = 1.
wa-name = ‘John’.
WRITE: wa-id, wa-name.
ABAP Practice
รให้สร้าง Structure ชื่อ myname โดยมีฟิลด์ firstname และ last
ค่าชื่อของคุณกับฟิลด์ firstname และนามสกุลของคุณให้กับฟิลด์ l
งแสดงค่าข้อมูลของ Structure ที่ชื่อ myname ทั้งฟิลด์ firstname
me ออกมาที่หน้าจอ
Constants
ConstantsConstants
* Constant variable
CONSTANTS max_no TYPE I VALUE 999.
DATA counter TYPE I VALUE max_no.
WRITE: max_no, counter.
Constants Using ExampleConstants Using Example
* Constant variable
CONSTANTS ctext(11) TYPE C VALUE ‘Hello World’.
WRITE ctext.
WRITE ctext.
WRITE ctext.
WRITE ctext.
WRITE ctext.
System Fields
 The system fields (structure syst) are filled by
the runtime environment. You can use them
to query the system status in an ABAP
program
 You should access them only for reading
 sy-datum = Current date of application server
 sy-uzeit = Current time of application server
 sy-datlo = Current date of SAP GUI
 sy-timlo = Current time of SAP GUI
 sy-mandt = Current client logon
 sy-subrc = Return value of ABAP statement
syst-
datum
ABAP System Fields : Structure SYST
(SE11)
DATEDATE
* Fixed Length 8
* Include Representation ‘YYYYMMDD’
DATA today TYPE D.
today = sy-datum.
WRITE today.
today = ‘19991231’.
WRITE today.
TIMETIME
* Fixed Length 6
* Format ‘HHMMSS’
DATA times TYPE T.
times = sy-uzeit.
WRITE times.
HHMMSS
MOVE StatementMOVE 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.
MOVE-CORRESPONDING StatementMOVE-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 .
Field-symbols
Field-symbolsField-symbols
Data: name(4) Value ‘Test’,
num Type I Value 10,
today Type D Value ‘19980429’.
Field-symbols <temp>.
Assign name To <temp>.
Write <temp>.
Assign num To <temp>.
Write <temp>.
Assign today To <temp>.
Write <temp>.
Field-symbols : UNASSIGNField-symbols : UNASSIGN
data: name(4) Value ‘Test’,
field-symbols <temp>.
assign name To <temp>.
write <temp>.
unassign <temp>.
CLEAR StatementCLEAR Statement
Example:
DATA tmp type i value 9.
tmp = 10.
CLEAR tmp.
tement sets a field to an initial value appropriate fo
CLEAR <data object>.
CLEAR StructureCLEAR Structure
DATA wa like customers.
…
CLEAR wa.
ABAP Report : Program Structure
Report ztest.
*Data objects declaration
data ...
data begin of ...
*Program Logic(Data objects processing)
…
write ….
ABAP Practice

More Related Content

What's hot

Modular Programming in C
Modular Programming in CModular Programming in C
Modular Programming in Cbhawna kol
 
Functions in c language
Functions in c language Functions in c language
Functions in c language tanmaymodi4
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statementsapdocs. info
 
News in abap concepts to further increase the power of abap development 2
News in abap   concepts to further increase the power of abap development  2News in abap   concepts to further increase the power of abap development  2
News in abap concepts to further increase the power of abap development 2Alexander Talac
 
Reactive cocoa cocoaheadsbe_2014
Reactive cocoa cocoaheadsbe_2014Reactive cocoa cocoaheadsbe_2014
Reactive cocoa cocoaheadsbe_2014Werner Ramaekers
 
Compiler in System Programming/Code Optimization techniques in System Program...
Compiler in System Programming/Code Optimization techniques in System Program...Compiler in System Programming/Code Optimization techniques in System Program...
Compiler in System Programming/Code Optimization techniques in System Program...Janki Shah
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Bilal Amjad
 
09 implementing+subprograms
09 implementing+subprograms09 implementing+subprograms
09 implementing+subprogramsbaran19901990
 
Assembly language 8086 intermediate
Assembly language 8086 intermediateAssembly language 8086 intermediate
Assembly language 8086 intermediateJohn Cutajar
 
Skillwise - Cobol Programming Basics
Skillwise - Cobol Programming BasicsSkillwise - Cobol Programming Basics
Skillwise - Cobol Programming BasicsSkillwise Group
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsAlexander Yakushev
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local namesVarsha Kumar
 

What's hot (18)

Modular Programming in C
Modular Programming in CModular Programming in C
Modular Programming in C
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
Modularization & Catch Statement
Modularization & Catch StatementModularization & Catch Statement
Modularization & Catch Statement
 
News in abap concepts to further increase the power of abap development 2
News in abap   concepts to further increase the power of abap development  2News in abap   concepts to further increase the power of abap development  2
News in abap concepts to further increase the power of abap development 2
 
Reactive cocoa cocoaheadsbe_2014
Reactive cocoa cocoaheadsbe_2014Reactive cocoa cocoaheadsbe_2014
Reactive cocoa cocoaheadsbe_2014
 
Compiler in System Programming/Code Optimization techniques in System Program...
Compiler in System Programming/Code Optimization techniques in System Program...Compiler in System Programming/Code Optimization techniques in System Program...
Compiler in System Programming/Code Optimization techniques in System Program...
 
Cpp functions
Cpp functionsCpp functions
Cpp functions
 
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
Assembly Language Programming By Ytha Yu, Charles Marut Chap 6 (Flow Control ...
 
Hadoop job chaining
Hadoop job chainingHadoop job chaining
Hadoop job chaining
 
Run time
Run timeRun time
Run time
 
09 implementing+subprograms
09 implementing+subprograms09 implementing+subprograms
09 implementing+subprograms
 
Ch7
Ch7Ch7
Ch7
 
Assembly language 8086 intermediate
Assembly language 8086 intermediateAssembly language 8086 intermediate
Assembly language 8086 intermediate
 
C functions
C functionsC functions
C functions
 
Run time administration
Run time administrationRun time administration
Run time administration
 
Skillwise - Cobol Programming Basics
Skillwise - Cobol Programming BasicsSkillwise - Cobol Programming Basics
Skillwise - Cobol Programming Basics
 
Virtual Machine for Regular Expressions
Virtual Machine for Regular ExpressionsVirtual Machine for Regular Expressions
Virtual Machine for Regular Expressions
 
Access to non local names
Access to non local namesAccess to non local names
Access to non local names
 

Viewers also liked

Crown Of Noida - Premia Corporate City 2
Crown Of Noida - Premia Corporate City 2Crown Of Noida - Premia Corporate City 2
Crown Of Noida - Premia Corporate City 2Premia Group
 
Artists detail
Artists detailArtists detail
Artists detailtoralsoni
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpromanojdhir
 
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5prakash185645
 

Viewers also liked (7)

Sheregesh
SheregeshSheregesh
Sheregesh
 
Sci152
Sci152Sci152
Sci152
 
Abap slides set1
Abap slides set1Abap slides set1
Abap slides set1
 
Crown Of Noida - Premia Corporate City 2
Crown Of Noida - Premia Corporate City 2Crown Of Noida - Premia Corporate City 2
Crown Of Noida - Premia Corporate City 2
 
Artists detail
Artists detailArtists detail
Artists detail
 
Abap web dynpro
Abap   web dynproAbap   web dynpro
Abap web dynpro
 
Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5Oo abap-sap-1206973306636228-5
Oo abap-sap-1206973306636228-5
 

Similar to Abap programming overview

ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01tabish
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewAshish Kumar
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02tabish
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02wingsrai
 
Complete reference to_abap_basics
Complete reference to_abap_basicsComplete reference to_abap_basics
Complete reference to_abap_basicsAbhishek Dixit
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAPsapdocs. info
 
Oracle D2K reports
Oracle D2K reports Oracle D2K reports
Oracle D2K reports Rajesh Ch
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query ExecutionJ Singh
 
Data Warehousing with Python
Data Warehousing with PythonData Warehousing with Python
Data Warehousing with PythonMartin Loetzsch
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2rowensCap
 
Lsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishnaLsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishnaHari Krishna
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPatrick Allaert
 
C programming language
C programming languageC programming language
C programming languageAbin Rimal
 

Similar to Abap programming overview (20)

ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
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
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Complete reference to_abap_basics
Complete reference to_abap_basicsComplete reference to_abap_basics
Complete reference to_abap_basics
 
Ab ap faq
Ab ap faqAb ap faq
Ab ap faq
 
Introduction to ABAP
Introduction to ABAPIntroduction to ABAP
Introduction to ABAP
 
Oracle D2K reports
Oracle D2K reports Oracle D2K reports
Oracle D2K reports
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query Execution
 
Data Warehousing with Python
Data Warehousing with PythonData Warehousing with Python
Data Warehousing with Python
 
Abap Questions
Abap QuestionsAbap Questions
Abap Questions
 
Abap
AbapAbap
Abap
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
 
Lsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishnaLsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishna
 
SAS_and_R.pdf
SAS_and_R.pdfSAS_and_R.pdf
SAS_and_R.pdf
 
PHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & PinbaPHP applications/environments monitoring: APM & Pinba
PHP applications/environments monitoring: APM & Pinba
 
oracle-reports6i
oracle-reports6ioracle-reports6i
oracle-reports6i
 
C programming language
C programming languageC programming language
C programming language
 

Recently uploaded

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 

Recently uploaded (20)

Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 

Abap programming overview

  • 2. ABAP Course Outline  Chapter 1 : Introduction to ABAP  Chapter 2 : List Processing in ABAP  Chapter 3 : Open SQL & Internal Table  Chapter 4 : Event-driven Programming & Selection Screen  Chapter 5 : Modularization & Catch Statement  Chapter 6 : Message, Debugging, File Transfer and Type Group
  • 3. ABAP Chapter 1  Introduction to SAP Architecture  ABAP Overview  Data Object in ABAP
  • 4. SAP System : 3 Tier Client/ServerSAP System : 3 Tier Client/Server DB Server SAP Application Server SAP GUI Presentation Server SAP GUISAP GUI
  • 5. SAP SYSTEM (3 Tier Architecture)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
  • 7. Database Server Application Server Dispatcher Request Queue D D D D… SAP Buffer Program Table … 1 3 4 5 68 9 10 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 Reques t List 2 Search for free WP Store request to queue Send request to WP SAP GUI SAP System : Dialog Processing
  • 8. 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
  • 10. ABAP Overview DATA ...DATA ... WRITE ..WRITE .. .. IF ...IF ...MOVE …MOVE … WHILE...WHILE... *Comment...*Comment... SEARCH ...SEARCH ... SELECT ...SELECT ... LOOP AT ...LOOP AT ...DO ...DO ...
  • 12. ABAP FeatureABAP Feature  Declaring data with various types and structure  Operational elements for data manipulation  Control elements for controlling the program flow  Event elements for reacting to external events
  • 13. ABAPABAP  Operating/Database system-independent programming  ABAP contains a subset of SQL called Open SQLOpen SQL for comfortable database access for variousvarious databasedatabase
  • 14. ABAP ProgrammingABAP Programming  ABAP Report  Dialog Programming(Transaction)
  • 15. ABAP Program : ReportABAP Program : Report Data Report Program : attribute type 1 (executable) Reading Database  Reading dataReading data
  • 16. Types of ABAP Report 1. Report Listing 2. Drill-down Report 3. Control-break Report 4. ALV Report 1 3 4
  • 17. ABAP Program : Dialog ProgramABAP Program : Dialog Program Data Dialog Program : attribute type M (Module Pool) Reading Database  Reading and changing dataReading and changing data Writing
  • 18. Dialog Program : Transaction
  • 20. How to create ABAP program Transaction Code : SE38
  • 24. The Structure of the LanguageThe Structure of the Language  Each statement must end with a period DATA tmp TYPE I. WRITE ‘Hello World’. WRITE ‘OK’.
  • 25. LiteralLiteral DATA tmp TYPE I. WRITE ‘Hello World’. WRITE ’10’. MOVE 9 TO tmp. Text Literal Numeric Literal Text Literal
  • 26. Chained Statements  Successive statements that have the same string segment can be combined to form a single chained statement  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 (.)  At runtime, a chained statement is treated like an equivalent sequence of individual ABAP statements
  • 27. Chained StatementsChained Statements WRITE ‘Hello World’. WRITE ‘OK’. = WRITE: ‘Hello World’, ‘OK’. DATA tmp1 TYPE I. DATA tmp2 TYPE C. = DATA: tmp1 TYPE I, tmp2 TYPE C.
  • 28. Chained StatementChained Statement MOVE sy-subrc TO tmp1. MOVE sy-subrc TO tmp2. MOVE sy-subrc TO tmp3. = MOVE sy-subrc TO: tmp1, tmp2, tmp3.
  • 29. Chained StatementChained Statement PERFORM cal_1 USING a1 a2. PERFORM cal_1 USING a3 a4. = PERFORM cal_1 USING: a1 a2, a3 a4.
  • 30. CommentsComments * This is full line comment WRITE ‘Hello World’. “ Write data (partial line comment) WRITE ‘Test’.
  • 31. ABAP Command : Case SensitivityABAP Command : Case Sensitivity WRITE ‘Hello World’. WriTe ‘Hello World’. wRiTE ‘Hello World’.  ABAP command is not case sensitive
  • 33. Data Objects in ABAPData Objects in ABAP Memory Space Structure Table Structure Internal Table Variable Constants <Field-symbols>
  • 35. VariableVariable  Variables can be declared at any point in a program  Variables can be up to 30 characters in length REPORT ZTEST. DATA firstname TYPE STRING. firstname = ‘John’.
  • 36. Predefined ABAP Data TypesPredefined 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. Defining Variable with DATA StatementDefining Variable with DATA Statement * Syntax DATA var[(length)] [Type type] [Decimals number]. DATA var LIKE Table-Field [VALUE initial value].
  • 38. Defining Variable with DATA StatementDefining 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. Defining Variable with DATA StatementDefining 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. 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. Variable  Data Type C,N and X length between 1 – 65535 (Default 1)  Data Type P length between 1 – 16 (Default 8) and decimals length between 0 – 31  Data Type I value between – 231 to 231 – 1 or –2,147,483,648 to 2,147,483,647 DATA tmp(10) TYPE C. DATA tmp(5) TYPE P DECIMALS 2. DATA tmp TYPE I. tmp = 1000000.
  • 42. Data type N data tmp(5) type N. tmp = ‘Xca9yy23K6’.
  • 43. ABAP Error ABAP Error Syntax Error Runtime Error System Runtime Error User Runtime Error Time Exceed (10 Minutes) Cannot Allocate Space
  • 44. User Runtime Error DATA result TYPE i. result = 10 / 0.
  • 45. System Runtime Error : Space Allocation
  • 46. System Runtime Error : Time Exceed
  • 47. Non-elementary TypeNon-elementary Type * Data Declaration TYPES tname(30) TYPE c. DATA: customer_name TYPE tname, firstname TYPE tname.
  • 48. Value AssignmentValue 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. Value AssignmentValue Assignment * Value assignment DATA: tmp1 TYPE i, tmp2 TYPE i. tmp1 = tmp2 = 10.
  • 50. ABAP Practice การให้สร้างตัวแปรชื่อ firstname และ lastname โดยให้ค่าชื่อขอ ปร firstname และนามสกุลของคุณให้กับตัวแปร lastname พร้อม อมูล firstname กับ lastname ออกมาที่หน้าจอ
  • 52. StructureStructure * Syntax DATA BEGIN OF <structure name>. DATA field1. DATA field2. … … DATA END OF <structure name>.
  • 53. StructureStructure * Syntax DATA BEGIN OF wa. DATA id LIKE customers-id. DATA name LIKE customers-name. DATA city LIKE customers-city. DATA END OF wa. MOVE 9 TO wa-id. WRITE wa-id. id city wa 00000000 name
  • 54. Defining Structure (Include Structure)Defining Structure (Include Structure) * Include Structure DATA BEGIN OF wa. INCLUDE STRUCTURE customers. DATA tel(7). DATA END OF wa.
  • 55. Defining StructureDefining Structure * LIKE option DATA wa LIKE customers. wa-id = 1. wa-name = ‘John’. WRITE: wa-id, wa-name.
  • 56. ABAP Practice รให้สร้าง Structure ชื่อ myname โดยมีฟิลด์ firstname และ last ค่าชื่อของคุณกับฟิลด์ firstname และนามสกุลของคุณให้กับฟิลด์ l งแสดงค่าข้อมูลของ Structure ที่ชื่อ myname ทั้งฟิลด์ firstname me ออกมาที่หน้าจอ
  • 58. ConstantsConstants * Constant variable CONSTANTS max_no TYPE I VALUE 999. DATA counter TYPE I VALUE max_no. WRITE: max_no, counter.
  • 59. Constants Using ExampleConstants Using Example * Constant variable CONSTANTS ctext(11) TYPE C VALUE ‘Hello World’. WRITE ctext. WRITE ctext. WRITE ctext. WRITE ctext. WRITE ctext.
  • 60. System Fields  The system fields (structure syst) are filled by the runtime environment. You can use them to query the system status in an ABAP program  You should access them only for reading  sy-datum = Current date of application server  sy-uzeit = Current time of application server  sy-datlo = Current date of SAP GUI  sy-timlo = Current time of SAP GUI  sy-mandt = Current client logon  sy-subrc = Return value of ABAP statement syst- datum
  • 61. ABAP System Fields : Structure SYST (SE11)
  • 62. DATEDATE * Fixed Length 8 * Include Representation ‘YYYYMMDD’ DATA today TYPE D. today = sy-datum. WRITE today. today = ‘19991231’. WRITE today.
  • 63. TIMETIME * Fixed Length 6 * Format ‘HHMMSS’ DATA times TYPE T. times = sy-uzeit. WRITE times. HHMMSS
  • 64. MOVE StatementMOVE 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. MOVE-CORRESPONDING StatementMOVE-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 .
  • 67. Field-symbolsField-symbols Data: name(4) Value ‘Test’, num Type I Value 10, today Type D Value ‘19980429’. Field-symbols <temp>. Assign name To <temp>. Write <temp>. Assign num To <temp>. Write <temp>. Assign today To <temp>. Write <temp>.
  • 68. Field-symbols : UNASSIGNField-symbols : UNASSIGN data: name(4) Value ‘Test’, field-symbols <temp>. assign name To <temp>. write <temp>. unassign <temp>.
  • 69. CLEAR StatementCLEAR Statement Example: DATA tmp type i value 9. tmp = 10. CLEAR tmp. tement sets a field to an initial value appropriate fo CLEAR <data object>.
  • 70. CLEAR StructureCLEAR Structure DATA wa like customers. … CLEAR wa.
  • 71. ABAP Report : Program Structure Report ztest. *Data objects declaration data ... data begin of ... *Program Logic(Data objects processing) … write ….