0% found this document useful (0 votes)
22 views5 pages

Abap

Uploaded by

Shan Vel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Abap

Uploaded by

Shan Vel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Inline Declarations

ABAP 7.4

 Introduced inline declarations using DATA(...) for variables directly in expressions.


 Example:

abap
Copy code
LOOP AT lt_table INTO DATA(ls_table).
WRITE: / ls_table-field.
ENDLOOP.

ABAP 7.5

 Extended inline declarations to work with FIELD-SYMBOLS(...) and CONSTANTS(...).


 Example:

abap
Copy code
LOOP AT lt_table ASSIGNING FIELD-SYMBOL(<ls_table>).
WRITE: / <ls_table>-field.
ENDLOOP.

CONSTANTS(my_const) TYPE i VALUE 10.

2. Constructor Operators

ABAP 7.4

 Added constructor operators like VALUE, CONV, and CORRESPONDING to simplify data
handling.
 Example:

abap
Copy code
DATA(result) = VALUE string( `Hello ABAP 7.4` ).

ABAP 7.5

 Introduced new constructor operator REF for creating references dynamically.


 Example:

abap
Copy code
DATA(ref_table) = REF #( lt_table ).
3. String Templates

ABAP 7.4

 Allowed embedding variables in strings using |...| templates.


 Example:

abap
Copy code
DATA(name) = 'John'.
WRITE: |Hello, { name }!|.

ABAP 7.5

 Enhanced string templates with control structures like loops and conditions directly
inside templates.
 Example:

abap
Copy code
DATA(count) = 5.
WRITE: |You have { count > 1 ? 'items' : 'item' } in your cart.|.

4. Table Expressions

ABAP 7.4

 Introduced expressions to read or modify internal table entries using [].


 Example:

abap
Copy code
DATA(value) = lt_table[ id = '001' ]-field.

ABAP 7.5

 Allowed dynamic table key specifications in table expressions.


 Example:

abap
Copy code
DATA(value) = lt_table[ (dynamic_key) ]-field.

5. New Syntax for Loops and Conditions

ABAP 7.4
 Enhanced LOOP with GROUP BY for grouped processing.
 Example:

abap
Copy code
LOOP AT lt_table INTO DATA(ls_table) GROUP BY ls_table-category INTO
DATA(group).
WRITE: / group.
ENDLOOP.

ABAP 7.5

 Introduced a cleaner syntax for control structures like IF, CASE, and LOOP.
 Example:

abap
Copy code
LOOP AT lt_table INTO DATA(ls_table) WHERE ls_table-active = 'X'.
WRITE: / ls_table-field.
ENDLOOP.

6. Enhanced Type Declarations

ABAP 7.4

 Allowed TYPES to define table types inline.


 Example:

abap
Copy code
TYPES: BEGIN OF ty_structure,
field1 TYPE i,
field2 TYPE string,
END OF ty_structure.

TYPES: ty_table TYPE TABLE OF ty_structure WITH EMPTY KEY.

ABAP 7.5

 Introduced the TYPE TABLE OF ... WITH EMPTY KEY syntax for internal tables with no
keys.
 Example:

abap
Copy code
DATA(lt_table) = VALUE TABLE OF ty_structure( ).

7. New Control Keywords


ABAP 7.4

 No significant changes to control keywords.

ABAP 7.5

 Introduced FOR as an iteration expression in constructors and templates.


 Example:

abap
Copy code
DATA(lt_numbers) = VALUE #( FOR i = 1 THEN i + 1 UNTIL i > 10 ( i ) ).

8. CDS and AMDP Integration

ABAP 7.4

 ABAP 7.4 focused on CDS Views and ABAP Managed Database Procedures
(AMDP).
 Example:

sql
Copy code
DEFINE VIEW ZCDS_VIEW AS SELECT FROM scarr
{
key carrid,
carrname
}

ABAP 7.5

 Further integrated CDS views with annotations and introduced CDS Table Functions.
 Example:

sql
Copy code
DEFINE TABLE FUNCTION ZCDS_FUNC
RETURNS
{
field1 : abap.string(30),
field2 : abap.int4
}

9. Reduced Obsolete Statements

ABAP 7.4
 Continued support for many legacy keywords but recommended using modern
constructs.

ABAP 7.5

 Marked more keywords as obsolete, encouraging the use of cleaner alternatives:


o Use SELECT ... INTO TABLE instead of SELECT ... APPENDING TABLE.
o Use inline declarations instead of explicit DATA statements.

Summary Table of Differences

Feature ABAP 7.4 ABAP 7.5


Inline Declarations DATA(...) FIELD-SYMBOL(...), CONSTANTS(...)
Constructor Operators VALUE, CONV, CORRESPONDING REF
String Templates Basic Interpolation Conditional Logic
Table Expressions Static Key Expressions Dynamic Key Expressions
New Loop Syntax GROUP BY Enhanced WHERE
Control Keywords Standard Control Structures FOR Loops in Constructors
CDS Enhancements CDS Views, AMDP CDS Table Functions

You might also like