WP05 - ACT 01 - Development 1909
WP05 - ACT 01 - Development 1909
WP05 - ACT 01 - Development 1909
2
INTRODUCTION
This document has the scope to explain you the steps required to complete all the activities planned for the
current work-package.
By executing the steps described in this document you will be able to understand the main procedures
required to select and activate Fiori Applications in your implementation project.
Note that the steps described in this document refer only to the technical activation steps, additional functional
activation steps may be needed depending on the application scope. The required functional steps are
described in the Fiori Apps Library.
3
EXTENSIBILITY AND DEVELOPMENT
For this topic, you can select the exercises you are most interested in and may use the available installation of
ABAP Developer Tools in Eclipse and WebIDE in the system image.
UI Adaptation
In this exercise you will learn how to modify the screens of a standard SAP Fiori application along with the
addition of custom fields with no need of creating custom code.
You can find the step-by-step exercise in this document in the next chapter.
You can find the step-by-step exercise in this document in the third chapter.
You can find the step-by-step exercise description in the file: ABAP ProgrammingModel Fiori.docx
4
UI Adaptation
In this exercise we will explain how to modify a standard SAP Fiori application with In-App
extensibility features available in S/4HANA.
5
Comment Screenshot
https://fioriappslibrary.hana.ondemand.com/sap/fix/externalViewer/
#/multiSelect/?appId=%252FAIF%252FCUST,%252FAIF%252FE
DCHANGES,%252FAIF%252FIFB,%252FAIF%252FIFMON,%252
FAIF%252FIFTEST,%252FAIF%252FLFA_UPLOAD_FILE,%252F
AIF%252FMYRECIPIENTS,%252FAIF%252FOD_MYRECIPIENT
S,%252FAIF%252FOD_RECIPIENTS,%252FAIF%252FRECIPIEN
TS,%252FAIF%252FVMAP,%252FAIFX%252FWDA_MSG_MONI
TOR%2520(%252FAIFX%252FWDAC_MSG_MONITOR),APOC_
WD_BRF_DEC_TAB_MAINTAIN%2520(),F0510,F0510A,F0617,F
0617A,F0618,F0618A,F0627,F0627A,F0756A,F1240,F1259,F1306
,F1434,F1474,F1481,F1487,F1561,F1561A,F1589,F1590,F1712,F
1866,F1939,F1994,F2057,F2058,F2102,F2131,F2220,F2279,F228
8,F2392,F2569,F2587,F2705,F2761,F2894,F3248,F3438,F3505,F
3814,F3815,F4016,F4158,FDT_WD_WORKBENCH_SIMPLIFIED
%2520(FDT_WD_WB_SIMPLIFIED_EXT_AC),ILM_AUDIT_AREA
%2520(ILM_AUDIT_AREA),SP01_SIMPLE,SRALCONFIG%2520(
SRALCONFIG),SWF_FLEX_I18N_TR_WEB,SWI2_ADM1_CLOU
D,SWI_ADM_CLOUD,SWI_HC_CLOUD,SWI_PR_CLOUD&releas
eId=S15OP
6
Comment Screenshot
7
Comment Screenshot
8
Comment Screenshot
9
Comment Screenshot
10
Comment Screenshot
11
Comment Screenshot
12
Comment Screenshot
https://fioriappslibrary.hana.ondemand.com/sap/fix/ex
ternalViewer/ - /detail/Apps('F2424')/S15OP
13
Comment Screenshot
14
Comment Screenshot
32. Open your newly customized app. You will Custom version:
notice no variants are available and the
simple change you have performed is visible
in the app.
Standard version:
15
Comment Screenshot
Created by
Creation Indicator
16
Comment Screenshot
17
Comment Screenshot
18
Introduction to ABAP in Eclipse
The ABAP Development Tools (ADT) for SAP NetWeaver, also known as "ABAP in Eclipse", is the
recommended IDE for developing ABAP applications. It is available from SAP NetWeaver 7.31 SP4
onwards and it integrates seamlessly into your existing ABAP development systems.
In this series of exercises, you will get an introduction to the powerful tools delivered with ADT and
experience the advantages of using ABAP in Eclipse for your ABAP developments.
All the solutions to the exercises are provided as a reference - this way you can also see the solutions
for the exercises you did not finish. Feel free to experiment with the IDE yourself. These exercises are
only a guideline.
The exercises are based on the demo tables of the SAP NetWeaver EPM Model (you can find details
in the SCN http://scn.sap.com/docs/DOC-31458 ). So you can reiterate the exercises on any SAP
NetWeaver 7.40 or later systems.
Objective
In this exercise you will learn how to use ABAP in Eclipse. You will create an ABAP Project, use the Data
Preview and SQL Console and implement and run an ABAP Application. You will also learn how to use Quick
Assists to speed up your development.
Exercise Description
19
Open ABAP in Eclipse
Explanation Screenshot
1. Start Eclipse
20
Explanation Screenshot
21
Project Explorer View
Provides a hierarchical view of your ABAP Projects. From here you can
After starting the IDE and browse the ABAP Development Objects in the ABAP system (similar to
opening the ABAP perspective, the Repository Browser in the Object Navigator (SE80)) and open your
the ABAP tools are ideally ABAP Development Objects in the corresponding editor.
Editors Area
positioned in the IDE to The editors for the ABAP Development Objects are opened in the area
facilitate your development reserved in the centre of the IDE.
tasks. Nevertheless you are Outline View
free to rearrange all views and This view displays a structured overview of the ABAP Development
editors to your personel needs. Object that is currently open in the editor area. The contents of the
outline view are editor-specific.
Feature Explorer View
Project Explorer View This view provides you with an interactive tutorial to help you get familiar
with the basic features in ABAP in Eclipse.
Provides a hierarchical view of your Other Views
ABAP Projects. From here you can Several other useful views are stacked underneath the editor area in a
browse the ABAP Development tabbed container. Two of the most commonly used views are the:
Objects in the ABAP system (similar to
the Repository Browser in the Object
• Problems View: This view displays the syntax errors, warnings
or other information associated with an ABAP Development
Navigator (SE80)) and open your
Object (typically opened in the editor area)
ABAP Development Objects in the
corresponding editor. • Properties View: This view displays the basic properties of the
ABAP Development Object that is currently open in the editor
Editors Area area, e.g.: "Last changed by", "Created on", etc.
The editors for the ABAP
Development Objects are opened in
the area reserved in the centre of the
IDE.
Outline View
This view displays a structured
overview of the ABAP Development
Object that is currently open in the
editor area. The contents of the outline
view are editor-specific.
Feature Explorer View
This view provides you with an
interactive tutorial to help you get
familiar with the basic features in
ABAP in Eclipse.
Other Views
Several other useful views are stacked
underneath the editor area in a tabbed
container like transport organizer,
bookmarks, tasks and so on.
22
Explanation Screenshot
8. Click New
9. Click the ABAP
Project
10. Select the
system
connection from
the list or define
a new
connection (by
clicking on „new
system
connection“) if
your system is
not in the list.
23
Explanation Screenshot
12. Enter 5STEPS2FIORI in
the User: * box.
24
Use the Data Preview & the SQL Console
Explanation Screenshot
2. Enter snwd_so_inv_item in
the search field.
4. Press to open
the Data Preview.
25
Explanation Screenshot
6. First click Deselect All.
8. and CURRENCY_CODE.
9. Press to confirm
your selection.
11. choose
CURRENCY_CODE.
26
Explanation Screenshot
13. to open
the SQL Console.
27
Explanation Screenshot
18. Check that the output on
the right hand side contains the
payment status.
22. Click .
28
Create and run an ABAP Program
Explanation Screenshot
1. Right click on Logical
Objects ($TMP)
menu item.
3. Enter
Z_INVOICE_ITMES_EURO_<
NN> in the Name: * box.
Please refer to the Setup-
Information and exchange
_<NN> with your user number.
5. Click Finish .
29
Explanation Screenshot
8. Adjust the name of the local
class to lcl_main using inline
editing.
30
Explanation Screenshot
31
Create a global ABAP Class for data retrieval
In this part of the exercise you will replace the write statement in your report with data retrieval logic
based on the select statement created before in the SQL Console. Then you will display the retrieved
data using the SAP ABAP List Viewer (ALV). In order to separate concerns properly and to show you
a wider toolset the data retrieval logic will be encapsulated in a global ABAP class.
Explanation Screenshot
1. First remove the write
statement. Place the cursor
somewhere in the write
statement and use the shortcut
Ctrl+D to delete the whole line.
4. Enter
ZCL_INVOICE_RETRIEVAL_
NN in the Name: * box.
Replace NN with your user
number.
6. Click Finish .
32
Explanation Screenshot
A new editor will be
opened showing the created class.
33
Explanation Screenshot
12. A method definition and...
34
Explanation Screenshot
17. Paste the statement into
the method implementation of
get_items_from_db. Add the
ABAP statement terminator
(period character) at the end of
the statement to ensure that it
is syntactically correct.
36
Explanation Screenshot
37
Explanation Screenshot
38
Explanation Screenshot
press Ctrl+Space to get code
completion proposals.
39
Explanation Screenshot
45. Finally, call the display
method of alv_table.
40
Explanation Screenshot
Summary
You have completed the exercise!
41
5. Using Core Data Services
Overview
Estimated time: 30 minutes
Objective
In the following exercise you will learn how to use the new Core Data Services (CDS) tools in ABAP in
Eclipse. CDS is an extension of the ABAP Dictionary that allows you to define semantically rich data
models in the database and to use these data models in your ABAP programs. CDS is a central part
of enabling Code Pushdown in ABAP applications.
You will learn to define a new CDS view in a DDL source and to consume the CDS view in the SAP
List Viewer with Integrated Data Access (ALV with IDA). Using ALV with IDA it is possible to display
views and tables that contain very large quantities of data in the UI. You will also learn about some
of the CDS enhanced view-building capabilities such as associations and annotations.
You can find more information about CDS and ALV with IDA in the SAP Help Portal
(help.sap.com) and the SAP Community Network (scn.sap.com).
Exercise Description
Explanation Screenshot
1. In the context menu of your
Local Objects $TMP package
select New and then click
Other ABAP Repository
Object.
42
Explanation Screenshot
2. Enter ddl in the text field and
click Data Definition.
3. Click .
5. Enter
Z_INVOICE_ITEMS_NN in the
Name: * box. Replace NN with
your user number.
7. Click Next .
8. Click Next .
43
Explanation Screenshot
9. Select the Define View
template by clicking Define
View
11. Enter
ZINVOICEITEMS_NN for the
SQL view name. Replace NN
with your user number.
13. Double-click on
44
Explanation Screenshot
45
Explanation Screenshot
46
Explanation Screenshot
23. Open the Data Preview for
your CDS view. Press F8.
Explanation Screenshot
1. In the context menu of the
program
Z_INVOICE_ITEMS_EURO<N
N> click Duplicate....
47
2. Give the duplicated program
a name. Enter
Z_INVOICE_ITEMS_CDS_NN
in the field Name: *. Replace
NN with your user number.
3. Click Finish .
cl_salv_gui_table_ida=>create_for
_cds_view(
'Z_INVOICE_ITEMS_NN' ).
alv_display->fullscreen( )->display(
).
48
Explanation Screenshot
7. Click .
49
Explanation Screenshot
9. Set the filter values. Click
.
11. Click .
50
Explanation Screenshot
13. Click the [FXX]
Z_INVOICE_ITEMS_NN
tab to
open the DDL editor.
51
Explanation Screenshot
Summary
You have completed the exercise!
52
www.sap.com/contactsap
The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product
specifications may vary.
These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if
any. Nothing herein should be construed as constituting an additional warranty.
In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release any functionality mentioned therein. This
document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products, and/or platform directions and functionality are all subject to change and may be changed by
SAP SE or its affiliated companies at any time for any reason without notice. The information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-
looking statements are subject to various risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements, and
they should not be relied upon in making purchasing decisions.
SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product
and service names mentioned are the trademarks of their respective companies. See http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.