Inline Declaration

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 19

Inline Declaration in ABAP

Agenda ● Inline Declaration


Inline Declaration in ABAP

● Inline declaration make it possible to define variable and work areas on the fly. There is no need to write a
separate lines for variable declaration.

E.g. DATA(wa_data) or @DATA(it_data) statements.

● Inline Declaration reduces the of lines of code.


DATA: Used to Declares a Object of any data type.
● OLD SYNTAX:

● NEW SYNTAX:
Loop at into work area
● OLD SYNTAX:

● NEW SYNTAX:
Call method:
● OLD SYNTAX:

● NEW SYNTAX:
Loop at assigning
● OLD SYNTAX:

● NEW SYNTAX:
Read assigning
● OLD SYNTAX:

● NEW SYNTAX:
Select into table
● OLD SYNTAX:

● NEW SYNTAX:
Read Table Index:
● OLD SYNTAX:

● NEW SYNTAX:
Read Table using key
● OLD SYNTAX:

● NEW SYNTAX:
Read Table with key
● OLD SYNTAX:

● NEW SYNTAX:
Read Table with key components
● OLD SYNTAX:

● NEW SYNTAX:
Does record exist:
● OLD SYNTAX:

● NEW SYNTAX:
Get table Index
● OLD SYNTAX:

● NEW SYNTAX:
Corresponding Operator:
● OLD SYNTAX:

If we use corresponding then don’t


Have to worry about field position.

● NEW SYNTAX:
Concatenation:
● OLD SYNTAX:

● NEW SYNTAX:
Mapping:Used to copy the Data from one internal table to another internal table.

● IT_EMP is the table in which we copied the data from IT_EMP_DATA.


Except:Used to copy the Data from one internal table to another internal table except
some fields.

● ITAB is the table in which we copied the data from IT_EMP_DATA except EMP_SAL ,
EMP_NAME

You might also like