Tip of the Day #ABAP
Arun Kumar Solaiyan
SAP ABAP | S4 HANA | RAP | BTP | Integration suite CPI and PI
Table types in Modern ABAP inline declaration
(Inline declaration - new way of declaring variables, field symbols, Internal tables on the fly)
The data type of the new data object is constructed in accordance with the structure of the results set defined after?SELECT and
Select ebeln,bsart,lifnr from ekko
into table @data(lt_ekko)
where aedat ge 20210101
and lifnr eq '10000001'.
Inline declaration "into table @data(itab)" declares a?STANDARD TABLE?itab with an empty table key.
Inline declaration provides an easy way to declare internal tables and preferred by developers in Modern ABAP. Developers should always keep in mind about volume of data handled by the internal table in production system and create internal tables by declaring SORTED or HASHED table type explicitly if required. This will avoid potential performance issues as SORTED or HASHED tables provides better performance over standard table type.
Reference link : SELECT - INTO, APPENDING - ABAP Keyword Documentation (sap.com)
ABAP TIP of the Day: I will be sharing my learnings in ABAP and Modern ABAP through the series ABAP TIP of the Day. Hope this helps our developer community. Let's share and learn together!!
SAP ABAP | S4 HANA | RAP | BTP | Integration suite CPI and PI
1 年ABAP Tip of the day #001