What’s New In ABAP Series Introduction.
Oh! you are here. Welcome to new series ‘What’s New In ABAP’ a place where we talk about all new features added in ABAP 7.40 + & ABAP 7.50 +. I know it is bit late to come up with this series, but as Nicholas Sparks said “It is never too late to do the right thing!” :). I see lot of folks yet to get their hands-on ABAP 7.40 new features, this is for them.
I came across ABAP new syntax s last year when I was working for a project (secret ;)) where latest ABAP system 7.40, running with HANA as back end. Initially I was lazy to learn new syntax s to write ABAP code.
After a while I got to know how comfortable & flexible it is, especially for a lazy guy like me. To start writing code with new ABAP 7.40 features I read some of the existing standard code & from my colleagues. Later I have searched on internet, went through SAP Help documentation, different blogs & articles. I must say those were awesome.
Then, I have decided to keep everything here in our blog to save your time. I am going to share almost every new feature from ABAP 7.40 + to 7.50 +. Everything’s here!
Why should I learn?
First thing, you can show off to your colleagues & friends by writing something which they do not understand at a glance 😉 just kidding(no I’m not). The main reason is you can save your time, you can use new ready-made functions, moreover you can interact with HANA using ABAP 7.40. i.e. CDS Views, AMDP. Yes, ABAP on HANA!
Just like you I’m a learner, if any of you folks think something is missing or anything misleading the readers, in any episode of this series, kindly do not shoot me with eggs ;). Kindly Let us and the readers know. I am looking forward to learn from you guys too. Cheers to all!
Enough about my boring speech :D, Let’s start!
ABAP 7.4 – Inline Declarations: Hello coders, Welcome to new series ‘What’s New In ABAP‘ completely dedicated to focus on all the new ABAP 7.40 + and ABAP 7.50 + features. In Each episode we discuss different features step by step. In This episode 01 we talk about the new way of declarations in ABAP 7.40 + called Inline Declarations, new syntax s in ABAP. Let’s roll. […]
This episode we are going to learn the constructor operators, introduced with the release of ABAP 7.40 . It can be used in constructor expressions to create a result that can be used at operand positions. sounds confusing? I know that feeling don’t worry we will first see the general syntax and how it looks in our examples.General Syntax:operator type(…)Simple isn’t .[…]
Squeezing ABAP Code Hello there, The first 2 episodes in ‘What’s New In ABAP’ series we have seen some of the new abap syntaxes introduced with ABAP 7.40. So before you squeezing ABAP Code (old), probably you must have a look at the first two episodes. Because You cannot start watching a famous series like Narcos, Suits or GOT from episode 3 directly ? .Okay jokes apa[…]
Table Expressions:If I have to say what are table expressions in aassan bhashaa mein, they are a clone to ‘Read Statement’. Whatever you can do with ‘Read’ you do it in a very short form of expressions. General Syntax:.. itab[ .. ] ..It is new way of accessing the internal table lines. If the line is not found it will raise an exception CX_SY_ITAB_LINE_NOT_FOUND. Kee […]
Internal Table Functions:In the last episode 05 we have talked about table expressions to avoid ‘READ’ statements. If you observe that we were not doing any sy-subrc check, since they are not allowed with table expressions.What if there is a situation where you need to find out the if a line is present in itab or if you want to get know the index of the present line i[…]
Strings on Me! Hello everyone, with the release of ABAP 7.30 + there are some new features came to light to deal with strings. The new operators, chaining operator ‘&&’ and literal operator ‘&’. These two operators can replace with the old CONCATINATE and we discuss about them at the end of this episode. Before that we are going to see about string templates & more i[…]
Iteration Expression: To define iteration expression you can use the iteration operator ‘FOR’. Along with this there is another operator ‘REDUCE’ depends on the iteration expressions. When we use ‘FOR’ operator it works just like a loop at itab. It assigns a value to work area or field-symbols for each loop. This can be used with VALUE to populate data. General Syntax[…]
Let Expression: As per SAP help document, a LET expression defines variables var1, var2, … or field symbols , , … as local helper fields in an expression and assigns values to them. When declared, the auxiliary fields can be used in the operand positions of the expression. There is no way of accessing an auxiliary field statically outside its expression. An[…]
Filter It! FILTER is one of the constructor expressions which creates a result of a table type specified using ‘type’ in the below syntax. General syntax: … FILTER type( itab [ EXCEPT ] [ IN ftab ] [ USING KEY keyname ] WHERE c1 op f1 [ AND c2 op f2 […] ] ) …
According to the where condition specified the rows are taken from the existing internal table ‘itab’ and co[…]
LOOP AT .. GROUP BY: The addition of ‘GROUP BY ‘with ‘LOOP AT’, groups the rows of the internal table and executes a loop across the groups. Alright, I don’t know about you when I read this I have no clue what does it do. Let me get you to the actual point, first have look at the syntax. General Syntax: LOOP AT itab result [ cond ] GROUP BY group_key [ ASCENDING|DESCENDING [AS TEXT] ] [WITHOUT MEMBERS ] [ group_result ]..[ LOOP AT GROUP …..ENDLOOP. ]..ENDLOOP..[…]