ABAP Syntaxes1
ABAP Syntaxes1
ABAP Editor:
Every line in ABAP editor contains either a commented line or an executable statement.
Comment: This is to provide useful information to specify the purpose of the block of code.
To comment line – Use * at column 1 of each line or place the cursor anywhere on the line and use
CTRL + <
To uncomment line – Remove * at column 1 or place the cursor anywhere on the line and use CTRL +
>
To comment line partially – Place the cursor from where you want to comment and use “
To comment block of lines – Select all the lines and use CTRL with <
To uncomment block of lines – Select all the lines and use CTRL with >
Executable statement:
Code can be N of lines but until full stop it considers as a single statement.
Ex. EKKO is a structure and EBELN, BUKRS, BSART are the fields inside this structure then if I have to
refer EBELN only then we need to write as EKKO-EBELN.
Either we can refer to a data type with length or we can refer to a data element.
Either we can refer to a local TYPES or we can refer to a global (SE11) structure.
END OF gty_vbakx.
Either we can refer to a local TYPES or we can refer to a global (SE11) structure or table type.
END OF gty_vbakx.
INSERT: It inserts new record, if already a record exist with same key fields then it goes to dump or
gives you error.
UPDATE: It updates only if the matching record found using key fields.
To print output:
*** All fixed values must be declared using CONSTANTS keyword or using single quotes.