Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Create Efficient Code using renewed ABAP

$
0
0

Hi friends,

 

I am writing this just to share what I had learned from the TECH ED 203 Bangalore.

 

The renewed ABAP has come up with efficient coding or increasing the productivity and readable code.

 

Here is a few examples of he same.

 

Old Method for declaring

 

Field Symbols

 

FIELD-SYMBOLS <line> LIKE LINE of itab.

 

LOOP AT itab ASSIGING  <line>.

....

END LOOP.

 

New Method for declaring

 

LOOP AT itab Assigning SYMBOL(<line>).

 

....

ENDLOOP.

 

Constructor ExpressionsNEW()

 

Old

DATA oref TYPE REF to class.

CREATE OBJECT oref Exporting...

 

New way

 

DATA (oref) = NEW class(....).

DATA oref TYPE REF to class.

oref = NEW#(....).

 

Table Expressions


Old Method

 

READ TABLE itab INDEX idx INTO wa.

 

New Merhod

 

wa = itab [ dix ].

 

There are many more this is how much I could remember and will start including all as I go through the notes and examples.


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>