New ABAP - Statements
With the introduction of the new commands since 7.40 and the first cloud systems, a lot has happened in the ABAP language. Many new commands were added, old ones were set to obsolete and new technologies made available (CDS, BOPF, Gateway).
This changes the complete picture of the language a little more in the direction of Java, there are also more functions available and the scope of the language syntax continues to grow. Here it is time to say goodbye to old thought patterns and commands and to focus on the new things. For you as a developer, it will make your work easier and reduce your ABAP vocabulary a little.
We provide you with the list of statements to make your daily work more manageable at a glance and to show you the new alternatives.
New vs Old
This is followed by a list of the ABAP commands that are out of date or have been replaced by new alternatives. Some of the old commands are now also marked as obsolete and you should only use the new ones. When switching to SAP cloud platform, you should continue to switch to the new commands in order to benefit from the better performance and availability.
|ADD||+ or +=||Link|
|SUBSTRACT||- or -=||Link|
|MULTIPLY||* or *=||Link|
|DIVIDE||/ or /=||Link|
|DESCRIBE TABLE LINES||LINES||Link|
|MOVE-CORRESPONDING||CORRESPONDING #( )||Link|
|?=||CAST #( )||Link|
|WRITE ... TO|||<TEXT>|||Link|
|CREATE OBJECT||NEW #( )||Link|
|CALL METHOD||<METHOD>( )||Link|
|READ TABLE||[ ]||Link|
|CONDENSE ... NO-GAPS||REPLACE( )||Link|
|TRANSLATE ... TO UPPER||TO_LOWER( )||Link|
|TRANSLATE ... TO LOWER||TO_UPPER( )||Link|
|'X' oder ' '||ABAP_TRUE oder ABAP_FALSE||Link|
|GET REFERENCE OF||REF #( )||Link|
|IF ... IS NOT INITIAL||Predicative Method Call||Link|
|EQ, NE, GT, GE, LT, LE||=, <>, >, >=, <, <=||Link|
|SYST oder SY||CL_ABAP_CONTEXT_INFO||Link|
|SELECT ... ENDSELECT||SELECT ... INTO TABLE||Link|
Here is the list of new commands that do not necessarily replace old commands, but represent a simple alternative for many scenarios.
|VALUE #( )||Link|
|CONV #( )||Link|
|SWITCH #( )||Link|
|COND #( )||Link|
|XSDBOOL #( )||Link|
|FOR #( )||Link|
|REDUCE #( )||Link|
|IS INSTANCE OF||Link|
|FILTER #( )||Link|
|INSERT FROM SELECT||Link|
|CASE TYPE OF||Link|
Last but not least, the overview of the completely omitted statements, which you can slowly forget and can implement differently with the examples.
|ADD ... UNITL||Link|
Hint: The lists are updated again and again and enriched with blog articles to give you a better picture of the effect and use. If you would like to help us to complete the list or if you have any comments on the individual statements, simply contact us.