SlideShare a Scribd company logo
List of T-codes related to ABAP :-
se38 ---> Abap editor
se11 ---> Dictionary objects
se16 --> data browser
se80 ---> Object Navigator
se37 ---> Function Builder
se41 ----> Menu Painter
se51 ---> Screen Painter
se71 ----> Form painter
se91 ---> Message class
se93 ---> Creating T-codes
sm35 ---> Session object
se36 ----> Logical databases
sm36 ---> Define Background Job
sm37 ---> Background job overview
se78 ---> Graphics upload
se76 ---> Language Translation
smartforms ---> smartforms

Abap Programming rules :-
1. . (period)
2. abap statements are not case sensitive.
  eg: write
        WRITE
3.
4. abap is space sensitive
  eg: c=a+b. (wrong)
       c = a + b.(correct)
5. * (or) " for commenting
 * ---> at the begining of the line
 " --> middle of the line


ECC 6.0
ABAP/4


1. Repository objects
2. Dictionary objects



Repository objects :- (se38)

1. Executable program
2. Include program
3. Module pool
4. function pool
5. subroutine pool
6. type pool
7. class pool
8. interface pool
9. XSLT programs
Dictionary objects :- (se11)

1. Tables
2. Views
3. Data elements
4. Domains
5. Search help
6. Lock objects
7. Type groups
8. Structures
9. Table Types

Example :-

menu bar
standard toolbar
title bar
application toolbar
status bar (below)


int a,b,c;
a=10;
b=20;
c=a+b;
printf("%d",c);

syntax :-

data [:] <variable> type <datatype> [ value <value>].

[ ] ---> optional
< > ---> mandatory

example :-

data x type i.
data y type i.
data z type i.
x = 10.
y = 20.
z = x + y.
write z.

example :-

data : x type i,
     y type i,
     z type i.
x = 10.
y = 20.
z = x + y.
write z.
example :-

data : x type i,
     y type i,
     z type i.
x = 10.
y = 20.
z = x + y.
write : 'sum is',z.
write :/ 'sum is',z LEFT-JUSTIFIED.

example : parameter

PARAMETER : x type i,
        y type i.
data z type i.
z = x + y.
write :/ 'sum is ',z.

example : default values

PARAMETER : x type i DEFAULT 10,
        y type i DEFAULT 20.
data z type i.
z = x + y.
write :/ 'sum is ',z.

example : Declaring and Initializing the variables

data : x type i value 10,
     y type i value 20,
     z type i.
z = x + y.
write :/ 'sum is ',z.
x = 23.
y = 34.
z = x + y.
write :/ 'sum is ',z.

example :- constants

CONSTANTS : x type i VALUE 10,
                     y type i value 20.
data z type i.
z = x + y.
write :/ 'sum is ',z.

example : characters and strings

data x type c.
x = 'genesis'.
write x.
data y(10) type c.
y = 'genesis software systems'.
write / y.
data z type string.
z = 'genesis software systems'.
write :/ z.

Creating Package :-

ddmmyyyy
27082009
09202708

storage : yyyymmdd
output : ddmmyyyy

sy-datum :- date
sy-uzeit :- time

example : Date and time datatypes

data x type d value '27082009'.
write :/ 'Value of x is ',x.
x = '20090827'.
write :/ 'Value of x is ',x.
write :/ 'formatted date :',x
           using EDIT MASK '________'.


write :/ 'formatted date :',(10) x using EDIT MASK
'________'.

data y type t value '093503'.
write :/ y.
write :/ 'formatted time ',(8) y using EDIT MASK '__:__:__'.

write :/ 'system date is ',sy-datum.
write :/ 'system time is ',sy-uzeit.

example : Packed data type

DATA x type i.
x = '123.45'.
write x.
data y type p.
y = '123.45'.
write :/ y.
data z type p DECIMALS 2.
z = '123.456'.
write :/ z.

Conditional statements :-
1. if - else
2. case - endcase
syntax : if-else

if <condition>.
   statements.
elseif <condition2>.
   statements.
---
endif.

syntax : case-endcase

case <condition>.
  when <value 1>.
       statements.
  when <value 2>.
        statements.
  ------
  when <others>.
         statements.
endcase.

looping statements :-

1. General Loops
  a) while-endwhile
 syntax :-
        while <condition>.
              statements.
       endwhile.

 b) do-enddo.
  syntax :-
       do <n> times.
            statements.
       enddo.

2. Database loops
  a) select-endselect
  b) loop-endloop

example : radio buttons

PARAMETERS : x type i,
     y type i.
PARAMETERS : r1 RADIOBUTTON GROUP g1,
     r2 RADIOBUTTON GROUP g1,
     r3 RADIOBUTTON GROUP g1,
     r4 RADIOBUTTON GROUP g1.

data res type i.

if r1 = 'X'.
   res = x + y.
   write :/ 'sum is ',res.
elseif r2 = 'X'.
  res = x - y.
if res >= 0.
    write :/ 'Difference is ',res.
 else.
    write :/ 'Difference is -' NO-GAP,res no-SIGN LEFT-JUSTIFIED.
 endif.
elseif r3 = 'X'.
 res = x * y.
 write :/ 'Product is ',res.
elseif r4 = 'X'.
 res = x / y.
 write :/ 'Division is ',res.
endif.

example : checkboxes

PARAMETERS : x type i,
     y type i.
PARAMETERS : r1 as CHECKBOX,
     r2 as CHECKBOX,
     r3 as CHECKBOX,
     r4 AS CHECKBOX.

data res type i.

if r1 = 'X'.
   res = x + y.
   write :/ 'sum is ',res.
endif.
if r2 = 'X'.
  res = x - y.
  if res >= 0.
     write :/ 'Difference is ',res.
  else.
     write :/ 'Difference is -' NO-GAP,res no-SIGN LEFT-JUSTIFIED.
  endif.
endif.
if r3 = 'X'.
  res = x * y.
  write :/ 'Product is ',res.
endif.
if r4 = 'X'.
  res = x / y.
  write :/ 'Division is ',res.
endif.

example : case-endcase

PARAMETERS : x type i,
        y type i,
        ch type i.
data res type i.

case ch.
  when 1.
    res = x + y.
    write :/ 'sum is ',res.
when 2.
    res = x - y.
    write :/ 'difference is ',res.
  when 3.
    res = x * y.
    write :/ 'product is ',res.
  when 4.
    res = x / y.
    write :/ 'division is ',res.
  when OTHERS.
    WRITE :/ 'Invalid choice, Please enter 1,2,3,4'.
 endcase.


Database loops

example : while-endwhile

PARAMETERS : x type i.

data : y type i value 1,
    res type i.

while y <= 10.
 res = x * y.
 write :/ x,'*',y,'=',res.
 y = y + 1.
ENDWHILE.


example : do-enddo

data : res type i,
    y type i value 1.

PARAMETERS x type i.

do 10 times.
  res = x * y.
  write :/ x,'*',y,'=',res.
  y = y + 1.
enddo.


example : continue statement

data : res type i,
    y type i value 1.

PARAMETERS x type i.

while y <= 10.
 if y eq 6.
    y = y + 1.
    CONTINUE.
 endif.
res = x * y.
  write :/ x,'*',y,'=',res.
  y = y + 1.
endwhile.


example : exit statement

data : res type i,
    y type i value 1.

PARAMETERS x type i.

while y <= 10.
 if y eq 6.
    exit.
 endif.
  res = x * y.
  write :/ x,'*',y,'=',res.
  y = y + 1.
endwhile.

write :/ 'end of program'.


Operators :-
1. Arithmetic operators :- +, - , *, / , mod
2. Logical operators :- AND, OR, NOT
3. Relational operators
   Symbolic format                  character format
      <                   lt (less than)
      >                   gt (greater than)
      =                   eq (equal to)
     <=                   le (less than or equal to)
     >=                   ge (greater than or equal to)
    <>                    ne (not equal to)

Dictionary objects (se11) :-

sy-datum
sy-uzeit

Standard tables :-

kna1 ---> customer master
vbak ---> sales document header data
vbap ---> sales document item data
ekko --> Purchase document header data
ekpo --> Purchase document item data
lfa1 ---> Vendor master
mara ----> Material master
makt ---> material descriptions

1. client dependent :- 'mandt'
2. client independent
se11 ---> database table (yemployee), create ---> provide description (employee dteails)

Delivery and maintainance :-

Delivery class ---> A
Data browser/Table view maintainance --->           Display/Maintainace allowed

Fields :-
Field name       Datatype               length
empno            int4            10
ename            char            20
empaddress       char            30

Technical settings :-
data class                       ---> APPL0
sizecategory            ---> 0

More Related Content

DOCX
PL/SQL Blocks
PDF
How to count money using PHP and not lose money
PDF
Et si on en finissait avec CRUD ?
ODT
linieaire regressie
TXT
PDF
Object Calisthenics Adapted for PHP
KEY
循環参照のはなし
PPTX
Uniface Lectures Webinar - Uniface 10 Technical Deep Dive
PL/SQL Blocks
How to count money using PHP and not lose money
Et si on en finissait avec CRUD ?
linieaire regressie
Object Calisthenics Adapted for PHP
循環参照のはなし
Uniface Lectures Webinar - Uniface 10 Technical Deep Dive

What's hot (20)

KEY
Decent exposure: Controladores sin @ivars
DOC
The Truth About Lambdas in PHP
PDF
Data Types Master
PPTX
Introduction to c
PDF
Unittests für Dummies
PDF
Desymfony2013.gonzalo123
PDF
PHP object calisthenics
PDF
What's New in Perl? v5.10 - v5.16
KEY
My Development Story
PDF
AskTom Office Hours about Database Migrations
PPSX
Php using variables-operators
PDF
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
RTF
PDF
Latihan modul prak basis data full
PPTX
cafeteria info management system
PDF
Functional programming with php7
PPTX
PHP Basics
ODP
Tips for using Firebird system tables
PDF
PPTX
Oracle select statment
Decent exposure: Controladores sin @ivars
The Truth About Lambdas in PHP
Data Types Master
Introduction to c
Unittests für Dummies
Desymfony2013.gonzalo123
PHP object calisthenics
What's New in Perl? v5.10 - v5.16
My Development Story
AskTom Office Hours about Database Migrations
Php using variables-operators
PHP「参照渡しできるよ」(君の考えている参照渡しと同じとは言ってない)
Latihan modul prak basis data full
cafeteria info management system
Functional programming with php7
PHP Basics
Tips for using Firebird system tables
Oracle select statment
Ad

Similar to Abap basics 01 (20)

PDF
Ruby Language - A quick tour
DOCX
Some Examples in R- [Data Visualization--R graphics]
PDF
Morel, a Functional Query Language
PPT
1582627
PPT
List Processing in ABAP
PDF
Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014
PDF
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
PPT
Lecture 4 - Comm Lab: Web @ ITP
PPTX
Basic programming
PDF
iRODS Rule Language Cheat Sheet
PPTX
introduction to c programming and C History.pptx
KEY
Achieving Parsing Sanity In Erlang
PDF
Hacking parse.y (RubyKansai38)
PDF
Hacking Parse.y with ujihisa
PDF
Python Cheat Sheet 2.0.pdf
PDF
Python_Basics_CheatSheet for Python Engineers
PPT
Abapprogrammingoverview 090715081305-phpapp02
PPT
Chapter 1abapprogrammingoverview-091205081953-phpapp01
PPT
ABAP Programming Overview
PPT
chapter-1abapprogrammingoverview-091205081953-phpapp01
Ruby Language - A quick tour
Some Examples in R- [Data Visualization--R graphics]
Morel, a Functional Query Language
1582627
List Processing in ABAP
Eric Redmond – Distributed Search on Riak 2.0 - NoSQL matters Barcelona 2014
Rails-like JavaScript Using CoffeeScript, Backbone.js and Jasmine
Lecture 4 - Comm Lab: Web @ ITP
Basic programming
iRODS Rule Language Cheat Sheet
introduction to c programming and C History.pptx
Achieving Parsing Sanity In Erlang
Hacking parse.y (RubyKansai38)
Hacking Parse.y with ujihisa
Python Cheat Sheet 2.0.pdf
Python_Basics_CheatSheet for Python Engineers
Abapprogrammingoverview 090715081305-phpapp02
Chapter 1abapprogrammingoverview-091205081953-phpapp01
ABAP Programming Overview
chapter-1abapprogrammingoverview-091205081953-phpapp01
Ad

Recently uploaded (20)

PPTX
Pharma ospi slides which help in ospi learning
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
RMMM.pdf make it easy to upload and study
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Basic Mud Logging Guide for educational purpose
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Pre independence Education in Inndia.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharma ospi slides which help in ospi learning
Anesthesia in Laparoscopic Surgery in India
Renaissance Architecture: A Journey from Faith to Humanism
Module 4: Burden of Disease Tutorial Slides S2 2025
RMMM.pdf make it easy to upload and study
PPH.pptx obstetrics and gynecology in nursing
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Basic Mud Logging Guide for educational purpose
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Pre independence Education in Inndia.pdf
Computing-Curriculum for Schools in Ghana
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

Abap basics 01

  • 1. List of T-codes related to ABAP :- se38 ---> Abap editor se11 ---> Dictionary objects se16 --> data browser se80 ---> Object Navigator se37 ---> Function Builder se41 ----> Menu Painter se51 ---> Screen Painter se71 ----> Form painter se91 ---> Message class se93 ---> Creating T-codes sm35 ---> Session object se36 ----> Logical databases sm36 ---> Define Background Job sm37 ---> Background job overview se78 ---> Graphics upload se76 ---> Language Translation smartforms ---> smartforms Abap Programming rules :- 1. . (period) 2. abap statements are not case sensitive. eg: write WRITE 3. 4. abap is space sensitive eg: c=a+b. (wrong) c = a + b.(correct) 5. * (or) " for commenting * ---> at the begining of the line " --> middle of the line ECC 6.0 ABAP/4 1. Repository objects 2. Dictionary objects Repository objects :- (se38) 1. Executable program 2. Include program 3. Module pool 4. function pool 5. subroutine pool 6. type pool 7. class pool 8. interface pool 9. XSLT programs
  • 2. Dictionary objects :- (se11) 1. Tables 2. Views 3. Data elements 4. Domains 5. Search help 6. Lock objects 7. Type groups 8. Structures 9. Table Types Example :- menu bar standard toolbar title bar application toolbar status bar (below) int a,b,c; a=10; b=20; c=a+b; printf("%d",c); syntax :- data [:] <variable> type <datatype> [ value <value>]. [ ] ---> optional < > ---> mandatory example :- data x type i. data y type i. data z type i. x = 10. y = 20. z = x + y. write z. example :- data : x type i, y type i, z type i. x = 10. y = 20. z = x + y. write z.
  • 3. example :- data : x type i, y type i, z type i. x = 10. y = 20. z = x + y. write : 'sum is',z. write :/ 'sum is',z LEFT-JUSTIFIED. example : parameter PARAMETER : x type i, y type i. data z type i. z = x + y. write :/ 'sum is ',z. example : default values PARAMETER : x type i DEFAULT 10, y type i DEFAULT 20. data z type i. z = x + y. write :/ 'sum is ',z. example : Declaring and Initializing the variables data : x type i value 10, y type i value 20, z type i. z = x + y. write :/ 'sum is ',z. x = 23. y = 34. z = x + y. write :/ 'sum is ',z. example :- constants CONSTANTS : x type i VALUE 10, y type i value 20. data z type i. z = x + y. write :/ 'sum is ',z. example : characters and strings data x type c. x = 'genesis'. write x. data y(10) type c. y = 'genesis software systems'. write / y. data z type string.
  • 4. z = 'genesis software systems'. write :/ z. Creating Package :- ddmmyyyy 27082009 09202708 storage : yyyymmdd output : ddmmyyyy sy-datum :- date sy-uzeit :- time example : Date and time datatypes data x type d value '27082009'. write :/ 'Value of x is ',x. x = '20090827'. write :/ 'Value of x is ',x. write :/ 'formatted date :',x using EDIT MASK '________'. write :/ 'formatted date :',(10) x using EDIT MASK '________'. data y type t value '093503'. write :/ y. write :/ 'formatted time ',(8) y using EDIT MASK '__:__:__'. write :/ 'system date is ',sy-datum. write :/ 'system time is ',sy-uzeit. example : Packed data type DATA x type i. x = '123.45'. write x. data y type p. y = '123.45'. write :/ y. data z type p DECIMALS 2. z = '123.456'. write :/ z. Conditional statements :- 1. if - else 2. case - endcase
  • 5. syntax : if-else if <condition>. statements. elseif <condition2>. statements. --- endif. syntax : case-endcase case <condition>. when <value 1>. statements. when <value 2>. statements. ------ when <others>. statements. endcase. looping statements :- 1. General Loops a) while-endwhile syntax :- while <condition>. statements. endwhile. b) do-enddo. syntax :- do <n> times. statements. enddo. 2. Database loops a) select-endselect b) loop-endloop example : radio buttons PARAMETERS : x type i, y type i. PARAMETERS : r1 RADIOBUTTON GROUP g1, r2 RADIOBUTTON GROUP g1, r3 RADIOBUTTON GROUP g1, r4 RADIOBUTTON GROUP g1. data res type i. if r1 = 'X'. res = x + y. write :/ 'sum is ',res. elseif r2 = 'X'. res = x - y.
  • 6. if res >= 0. write :/ 'Difference is ',res. else. write :/ 'Difference is -' NO-GAP,res no-SIGN LEFT-JUSTIFIED. endif. elseif r3 = 'X'. res = x * y. write :/ 'Product is ',res. elseif r4 = 'X'. res = x / y. write :/ 'Division is ',res. endif. example : checkboxes PARAMETERS : x type i, y type i. PARAMETERS : r1 as CHECKBOX, r2 as CHECKBOX, r3 as CHECKBOX, r4 AS CHECKBOX. data res type i. if r1 = 'X'. res = x + y. write :/ 'sum is ',res. endif. if r2 = 'X'. res = x - y. if res >= 0. write :/ 'Difference is ',res. else. write :/ 'Difference is -' NO-GAP,res no-SIGN LEFT-JUSTIFIED. endif. endif. if r3 = 'X'. res = x * y. write :/ 'Product is ',res. endif. if r4 = 'X'. res = x / y. write :/ 'Division is ',res. endif. example : case-endcase PARAMETERS : x type i, y type i, ch type i. data res type i. case ch. when 1. res = x + y. write :/ 'sum is ',res.
  • 7. when 2. res = x - y. write :/ 'difference is ',res. when 3. res = x * y. write :/ 'product is ',res. when 4. res = x / y. write :/ 'division is ',res. when OTHERS. WRITE :/ 'Invalid choice, Please enter 1,2,3,4'. endcase. Database loops example : while-endwhile PARAMETERS : x type i. data : y type i value 1, res type i. while y <= 10. res = x * y. write :/ x,'*',y,'=',res. y = y + 1. ENDWHILE. example : do-enddo data : res type i, y type i value 1. PARAMETERS x type i. do 10 times. res = x * y. write :/ x,'*',y,'=',res. y = y + 1. enddo. example : continue statement data : res type i, y type i value 1. PARAMETERS x type i. while y <= 10. if y eq 6. y = y + 1. CONTINUE. endif.
  • 8. res = x * y. write :/ x,'*',y,'=',res. y = y + 1. endwhile. example : exit statement data : res type i, y type i value 1. PARAMETERS x type i. while y <= 10. if y eq 6. exit. endif. res = x * y. write :/ x,'*',y,'=',res. y = y + 1. endwhile. write :/ 'end of program'. Operators :- 1. Arithmetic operators :- +, - , *, / , mod 2. Logical operators :- AND, OR, NOT 3. Relational operators Symbolic format character format < lt (less than) > gt (greater than) = eq (equal to) <= le (less than or equal to) >= ge (greater than or equal to) <> ne (not equal to) Dictionary objects (se11) :- sy-datum sy-uzeit Standard tables :- kna1 ---> customer master vbak ---> sales document header data vbap ---> sales document item data ekko --> Purchase document header data ekpo --> Purchase document item data lfa1 ---> Vendor master mara ----> Material master makt ---> material descriptions 1. client dependent :- 'mandt' 2. client independent
  • 9. se11 ---> database table (yemployee), create ---> provide description (employee dteails) Delivery and maintainance :- Delivery class ---> A Data browser/Table view maintainance ---> Display/Maintainace allowed Fields :- Field name Datatype length empno int4 10 ename char 20 empaddress char 30 Technical settings :- data class ---> APPL0 sizecategory ---> 0