ABAP Language 7.4 bring a lot of brand new functionality, this article will focus on the large number of new features that have been introduced into ABAP 7.4. These features are divided into the following categories database access, creating data, string processing, calling function, conditional logic, internal table, OOP, etc.

1.ABAP Language 7.4 Database Access.

a.CASE statement in SQL Queries

One of the new features of ABAP 7.4 is the ability to insert CASE statements into SQL Queries. Please check ABAP Code below.

@ symbols is to let SAP System know you are not talking about field in the database, @DATA(li_Vbeln) is means SAP System will create internal table LI_VBELN directly so you dont need declare before.

case-statement-abap-740

b. INNER JOIN Improvement

If you ever used Inner Join in ABAP  you must to list field one by one from the main table , this improvement you can list all of the fields. Please check out this ABAP Code.

Before ABAP 7.4

ABAP 7.4

The symbol * ( asterisk ) it acts just like the wildcard SELECT * , and for this sample you will get all fields in VBAK table.

inner-join-improvement-abap74

If you double click column A ( Flat Structure ) in Debugger, you will see all field in VBAK table.

c.Ommiting Data Type Declarations

In ABAP 7.4 has made it less important to declare variables at the start of your routine or method, the ABAP Compiler knows what data type it should be, instead of declaring it yourself and can save you several lines of code.

Before ABAP 7.4

ABAP 7.4

d.NEW keyword for Creating Objects

Normally in Java you need to use NEW to create instances of objects, but in the ABAP 7.4 , you can use NEW to instances object instead of use CREATE OBJECT.

Before ABAP 7.4

ABAP 7.4

e.New String Features in ABAP 7.4

Normally you can use the CONCATENATE statement to concatenate two or more string. but start from ABAP 7.02 you can use pipes and curly bracket to concatenate two or more string.

Before ABAP 7.02 and ABAP 7.04

ABAP 7.03 and ABAP 7.04

You can simpler ABAP Code for two lines before like this

In ABAP 7.40 You don’t need use CONVERSION_EXIT_ALPHA_INPUT and CONVERSION_EXIT_ALPHA_OUTPUT , you just need ALPHA keyword formatting option with OUT or IN.

f.Avoiding Type Mismatch Dump when Calling Function Module

Normally to call function module you need to pass some variable to function module parameter, the dump error occured when we declare different type our variable than parameter of function module.

In ABAP 7.40 you can declaring the variable from method /function module at the start of the routine but the rather at the instant they have their values filled by the method.

This approach has several advantages, fewer code lines, and avoid type mismatch error.

g. Using SWITCH statement as replacement for CASE

Using CASE you need to keep mentioning what variable you’re filling in every branch in CASE Statement.

If you use SWITCH statement, you dont need mention LV_DAY variable in every branch.

h. COND statement as replacement for IF/ELSE

You can use IF/ELSE conditional in more compact using COND.

Incoming search terms:

Leave a Reply

Your email address will not be published. Required fields are marked *