Tutorial by Examples

In certain situations, data declarations can be performed inline. LOOP AT lt_sflight INTO DATA(ls_sflight). WRITE ls_sflight-carrid. ENDLOOP.
DATA begda TYPE sy-datum.
DATA: begda TYPE sy-datum, endda TYPE sy-datum.
When using an inline data declaration inside of a SELECT...ENDSELECT block or SELECT SINGLE statement, the @ character must be used as an escape character for the DATA(lv_cityto) expression. Once the escape character has been used, all further host variables must also be escaped (as is the case with...
Different types of variables may be declared with special options. DATA: lv_string TYPE string, " standard declaration lv_char TYPE c, " declares a character variable of length 1 lv_char5(5) TYPE c, " declares a character variable of length 5 l_pa...

Page 1 of 1