Abap 7.4 Quick Referece PDF
Abap 7.4 Quick Referece PDF
com/2015/10/25/abap-740-quick-reference/
Jeffrey Towell
more by this author
ABAP Development
share
0 share
18 tweet share
0
Follow
1 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
What you need is a quick reference guide which gives you the essentials
you need and shows you how the code you are familiar with can be
improved with ABAP 7.40.
It gives examples of “classic” ABAP and its 740 equivalent. It goes into more
details on the more difficult topics normally via examples. This allows the
reader to dive in to the level they desire. While this document does not
contain everything pertaining to ABAP 740 it certainly covers the most
useful parts in the experience of the author.
Credit also goes to Naimesh Patel for his useful explanations and examples
on ABAP 7.40. Here is his example of the “FOR iteration expression” which I
leaned on (links to his other 740 articles can be found at the bottom of the
link):
http://zevolving.com/2015/05/abap-740-for-iteration-expression/
I compiled the below document to make the transition to using ABAP 740
easier for myself and my project team. It has worked well for us and I hope it
will do the same for you.
Regards,
Jeff Towell
2 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
41 Comments
You must be Logged on to comment or reply to a post.
3 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
4 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
5 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
6 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
7 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
8 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
9 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
10 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
Nevertheless this is the first example I found, where the advantage of meshes can be
seen.
All the best
Michael
The amazing thing is that the code is a copy and paste from a working
program I wrote and still have. I’ve noticed the “<” and “>” get stripped
off my field symbols in this document before. My theory is that when it
gets converted to HTML that the field symbols sometimes look like
HTML tags because they are between the <>. As such they are
sometimes stripped out by this conversion to HTML.
Thanks again.
Michael Calekta
Sorry to interrupt again, but it was not only the <> missing,
which you have corrected, but also the ls_ which is still
missing. I don’t think this can get lost by an html-
conversion-error. Perhaps a missing definition and value
assignment from the original coding.
I have copied the example and tried it, and it really works
fine, once I could eliminate the syntax-errors because of the
missing letters.
11 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
12 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
13 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
<fs>–pers_for_user = wa_touser–low.
ENDLOOP.
Hi Konstantin,
DATA(rt_config_pers_data) =
( pers_for_user = wa_touser–low
component = rs_config_pers_data–component
viewname = rs_config_pers_data–viewname
role_key = rs_config_pers_data–role_key
component_usage = rs_config_pers_data–component_usage
object_type = rs_config_pers_data–object_type
object_sub_type = rs_config_pers_data–object_sub_type
changed_by = rs_config_pers_data–changed_by
changed_at = rs_config_pers_data–changed_at
config = rs_config_pers_data–config
14 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
15 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
16 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
17 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
18 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
[WITHOUT MEMBERS]
ENDLOOP.]
ENDLOOP.
II. Explanation
The outer loop will do one iteration per key. So if 3 records match the key there
will only be one iteration for these 3 records. The structure “group” (or
“<group>” ) is unusual in that it can be looped over using the “LOOP AT
GROUP” statement. This will loop over the 3 records (members) of the group.
The
structure “group” also contains the current key as well as the size of the group
and index of the group ( if GROUP SIZE and GROUP INDEX have been
assigned a field name). This is best understood by an example.
19 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
III. Example
With 7.40
age TYPE i,
END OF ty_employee,
ASCENDING
ASSIGNING FIELD-SYMBOL(<group>).
CLEAR: gv_tot_age.
20 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
With 7.40
ENDLOOP.
“Average age
SKIP.
ENDLOOP.
IV. Output
11. Classes/Methods
Before 7.40
ls_lfa1 = My_Class=>get_lfa1( ).
21 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
Before 7.40
lv_name1 = ls_lfa1–name1.
With 7.40
Before 7.40
IF My_Class=>return_boolean( ) = abap_true.
…
ENDIF.
With 7.40
IF My_Class=>return_boolean( ).
…
ENDIF.
NB: The type “BOOLEAN” is not a true Boolean but a char1 with allowed
values X,- and <blank>.
Using type “FLAG” or “WDY_BOOLEAN” works just as well.
Before 7.40
With 7.40
12. Meshes
Allows an association to be set up between related data groups.
22 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
I. Problem
Given the following 2 internal tables:
END OF t_manager,
END OF t_developer,
name.
Populated as follows:
1 Jason 3000
2 Thomas 3200
Get the details of Jerry’s manager and all developers managed by Thomas.
II. Solution
With 7.40
23 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
With 7.40
III. Output
Jerry’s manager: Jason Salary: 3000
Thomas’ developers:
13. Filter
24 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
I. Definition
… FILTER type( itab [EXCEPT] [IN ftab] [USING KEY keyname]
WHERE c1 op f1 [AND c2 op f2 […]] )
II. Problem
Filter an internal table of Flight Schedules (SPFLI) to only those flights
based on a filter table that contains the fields Cityfrom and CityTo.
III. Solution
With 7.40
Note: using the keyword “EXCEPT” (see definition above) would have
returned the exact opposite records i.e all records EXCEPT for those those
25 of 26 08-03-2018, 16:57
ABAP 7.40 Quick Reference | SAP Blogs https://blogs.sap.com/2015/10/25/abap-740-quick-reference/
returned above.
Alert Moderator
26 of 26 08-03-2018, 16:57