Professional Documents
Culture Documents
ABAP Quick Reference 2
ABAP Quick Reference 2
ABAP
http://help.sap.com
http://www.goudden.com
Quick Reference
D ata
T ype
Numeric
I
4
F
8
P
8
Character types
V a lid
F ie ld
Le ngt h
Init ia l
V a lue
4
8
1-16
0
0
0
M e a ning
1 - 65535
''
'00000000'
'000000'
Hexadecimal type
X
Hexadecimal field
Using Variable
CONSTANTS: MyConst LIKE TableT-Field VALUE 'MOM'.
DATA: MyVariable LIKE TableT-Field.
Meaning
<oper at or >
Adition
Multiplication
DIV
**
Exponentiation
Substraction
equal to
equal to
NE
not equal to
<>
not equal to
LT
less than
<
less than
LE
<=
GT
greater than
>
greater than
>=
CASE My_var.
WHEN 'aa' .
"statements here
WHEN 'bb' .
"statements here
WHEN OTHERS .
"statements here
ENDCASE.
DO.
"Statements here...
sy-index. "LOOP Counter
IF <abort_condition> .
EXIT.
ENDIF.
ENDDO.
DO n TIMES.
"statements here...
sy-index. "loop counter
IF <abort_condition>.
EXIT.
ENDIF.
ENDDO.
Divide
EQ
GE
IF gv_var > 0.
" statements here
ELSEIF gv_var = 0.
" statements here
ELSE.
" statements here
ENDIF.
<oper at or >
JUDGMENTS
MESSAGE
[identify the message in table T100] - [Message Maintenance - SE91]
Type
s
i
Meaning
Behavior
Message appears in
Warning
Context dependent
Status bar
Error
Context dependent
Status bar
Termination
Program Aborted
Short dump
Short dump
Messages on help.sap.com
Common Transactions
co mmand
transaction
System Fields
transaction
/oXXX
/nXXX
/o
/nend
/nex
/:
/ns000
"internal subroutines
PERFORM <MyPerf_name>
"external subroutines
PERFORM MyPerf_name('MYPROGRAM') TABLES iTable1 iTable2
USING Value1 Value2
CHANGING Value3
IF FOUND.
"implementation
FORM MyPerf_name TABLES iTable1 iTable2
USING VALUE Value1 Value2
CHANGING Value3.
"statements here...
ENDFORM.
FIELD-SYMBOLS
FIELD-SYMBOLS <FS> [<type>|STRUCTURE <s> DEFAULT <wa>].
ASSIGNING <fs_object>.
Inner join produces only the set of records that match in both
Table A and Table B.
Programs to remember
Full outer join produces the set of all records in Table A and
Table B, with matching records from both sides where available. If
there is no match, the missing side will contain null.
Subroutines
OpenSQL
program
description
Reptran
RPINCL10
EWK1
RSTXSCRP