Академический Документы
Профессиональный Документы
Культура Документы
Target Audience
• Developers
• Consultants
2
Remarks before you start
<D All screenshots have been made in an AS ABAP system with System ID (SID)
"HANAABAP" installed in the HANA Database Schema "SAPHANAABAP". Please
consider to adapt this based on the SID and schema of your system .
<D All ABAP Entities have been created in the "$TMP" package of the user
"DEVELOPER".
<D You will need a user on SAP NetWeaver AS ABAP with the following roles assigned:
o SAP_BC_DWB_ABAPDEVELOPER
o SAP_BC_DWB_WBDISPLAY
o /IWFND/RT_DEVELOPER (For Gateway Service Development)
<D A dedicated HANA User is not necessary, however, in case you would like to check
on created artifacts, you need a HANA user with role ABAP_ DEV assigned.
<D The screenshots in this end-to-end guide have been created based on HANA Studio
version 1.00.70 (Build id: 386119) and may differ with respect to other HANA
releases.
<D For more details, information and guides based on SAP NetWeaver AS ABAP and
SAP HANA please visit our SCN Page: http://scn .sap.com/docs/DOC-35518.
3
What's inside this guide?
This document shows you an end-to-end development example from SAP HANA via ABAP
to a Fiori-like application, which will look like:
• Cl X
_Jmo:/lobolld.~n...,-.n ~Jic•~i~.h!.m1 l.:t.J
~ ~ d!I~;~J,COJ«ri•t·f~'l:~~.:!_Jc;_~,;5J-.4.'.~:h._f~r,~,,~~··W•I ~ D- + ft
I Customer Llsl Del'9 led Customer lnformalton
r--------------, r---------------------------------------------~ -
Customers
Talpa 15842570.29
vso
SAP
100000CJ3
1 00000~0 Hanncve..
30625
An der Bretten Wiese
DeiBont Industries
DE
1000 00002
100000003
50000HI26 201.'1-01-06100:00 OO.OOOCJOO 11t49.24 uso
Panorama studios
D
C3tegor; 500001627 20 14-01-0 7100.00 00 0000000 6018.47 tJSO
100000CJ)d.
On the left-hand side of the application, a list of customers is retrieved, showing the name
and the ID of the customers as well as a category which depends on the number of open
invoices.
Selecting one of the customers from the list populates the right-hand side of the application .
In the header part some more detailed information on the selected customer is shown, in
particular the address information as well as the aggregated gross amount of all open
invoices for this customer. In the lower part, the list of sales order invoices with their creation
date and the gross amount per sales order invoice are listed. All gross amounts in the
application are converted to USD.
From a technical point of view, the application is based on a SAP NetWeaver OData Service
comprising the entity sets for the customer list (left-hand side) and the sales order invoice list
(lower right-hand side) and an entity set for the detailed customer information (upper right-
4
What's inside this guide?
hand side). While the customer list entity set is based on a CDS view, the information on the
right-hand side is retrieved from ASAP-managed database procedures (AMDP).
If you now say "never heard from neither CDS nor AMDP" don't worry, you'll get to know
these objects and their features while working yourself through this end-to-end guide ©.
5
Technical Prerequisites
3 Technical Prerequisites
, 1. Install and
30min.
Configure
2. CDS View building
n
i'Omin. Test/Debug Cycles
3. ABAP managed DB
procedures
G
70min. Test/Debug Cycles
4. Gateway Servfc.e
ModelinJ
m
25min. Test/Debug Cyd es
To follow this end-to-end guide you need an Application Server ABAP 7.4 SP5 (or higher) on
SAP HANA SPS7 and an Eclipse-based development environment including ABAP
Development Tools for SAP NetWeaver as well as the Ul Development Toolkit for HTML5
(SAPUI5 Tools).
Concerning the backend system, the easiest method is to set up and run the developer
edition of the AS ABAP 7.4, which is provided as virtual appliance by the SAP Cloud
Appliance Library (see http://scn.sap.com/docs/DOC-52323). Choosing this variant, there are
no additional system configuration steps. If you are working on other backend systems,
please consult the system configuration steps described in the Appendix (System
Configuration & Example Data Generation).
Using the virtual appliance as described in the document above, you can connect to your
frontend image via a remote desktop connection . On the frontend image, you can find a SAP
HANA studio installation including all necessary tools (ABAP development tools, Ul tools). If
you prefer a local Eclipse installation, please see the Appendix (Installation Guides) or the
Additional Information chapter in the mentioned SCN document.
Choo;e lhe oonneclion ~e <Jnd c:hon~ the .iv;lem P<Jtomder; os •eQJited. Oelr:le lhe old d~1ipCion
l yovmnt the SY$lemto I:'OPO*C ode;cr.p!icrt. Button 'Q!C' i; mly ocbve when dl •eCI!Ated .,.,.. doto
~'»<$been ertered.
1
Ccrmeclion Type: ]custom Appac.!Jtion Se1vl!l' •
~ Sysl@mComedion Patamet!llr
2. In the ABAP Perspective of the SAP HANA Studio, check that the ABAP Project for the
backend system mentioned in the previous step exists. The ABAP Project belongs to user
6
Technical Prerequisites
DEVELOPER (client 001) and the passwort is (initially) identical to the master password
of the virtual appliance instance (see http:/lscn.sap.com/docs/DOC-52323).
3. Please also verify that the Ul Development Toolkit for HTML5 (SAPUI5 Tools) are
installed, e.g . via the context menu Help> About SAP HANA Studio, where you should
be able to find the SAP Ul5 development toolkit with version 1.16.6.
fJ A4H_001 _bwdeveloper_en
~,. About SAP HANA studio 1!1~ Ef
t:J A4H_001 _~_en
SAP HANA Studio
(!)J.f V~r<inn: 1.n. mnn
r" About SAP HANA StudiO features 1!1~ Ef
. All Rights Reserved.
About SAP tWo&A studio Features )
licensed under the folowing license terms:
Provider Feature Name Feature ld p://www.apache.orgjlicenses/LICENSE-2.0
1-':'-'='------.l...':.::=="""-...,--.,--...,----'--"='-'-----'-','-"om"'.""sa""'
SAP SAPUIS AIJI>kation Devel. .. p.""
;de-.u-,iS,-.a-pp-:.f-eatu'-e p://www.eclipse.orgforgfdocuments/epl-v10.php
SAP SAPU!S AIJI>kation Devel. .. 1.16.6 com.sep.lde .uiS.epp.featu'e
SAP SAPUIS Featu'e 1.16.6 com.sep.uiS.uihb.feeture
SAP SAPUIS Featu'e 1.16.6 com.s~p .uiS .runtime.fe4b.l'e
7
Scenario Description
4 Scenario Description
The scenario you are going to implement is part of the reference scenario delivered with AS
ASAP 7.4. Based on the open item analysis, the scenario will give you several business
figures like a simple customer classification and open invoice amounts per customer
(including currency conversion).
Table SNWD_ BPA contains the relevant information on the business partner complemented by
a 1:1 relation to the business partner address data given in table SNWD_ AD. The information
on sales order invoices is given in tables SNWD_ so_ INV _ HEAD (header data) and
SNWD_ so_ INV _ I TEM (position/item data). The business partner table can be connected via
a 1:n relation to the invoice header table field BUYER GUID. The invoice header table can
further be connected to the sales order item table in a 1:n relation using fields
SNWD_ SO_ INV _ HEAD . NODE_ KEY to SNWD_ SO_ I NV _I TEM . PARENT _ KEY. One special
feature of the data model is that the invoice items table contains all items of a given invoice
in different currencies.
8
CDS View Building in ABAP
,If"'
3D min.
(A TestjOeb..lg Cycles
fh
20min. Test/Debug Cycles
w
25min. Test/Debug Cycles
~
25min. Test/Debug Cycles
As mentioned in chapter What's inside this guide?, the final application displays a list of
customers including the customer name, the customer ID, and the customer classification
category. While this could be performed by fetching the data into an internal table on the
application server layer and perform all necessary calculation there, we'll follow the code-to-
data paradigm, i.e. we push data-intensive calculation logic to the database layer and only
fetch the (display) relevant data to the application server. More information on the code-to-
data paradigm can be found in
http://scn.sap.com/community/abap/hana/bloq/2014/02/03/abap-for-hana-code-push-down .
The task at hand could be done using advanced functionality of Open SQL (see
http://help.sap.com/abapdocu 740/en/index.htm?file=ASENNEWS-740 SP05-
0PEN SQL.htm). We've chosen an alternative approach; we'll make use of a new feature in
the AS ASAP 7.4, namely a Core Data Services (CDS) view.
In general, Core Data Services (CDS) is an enhancement of SQL which allows a simple and
harmonized way for the definition and consumption of semantically rich data models natively
in HANA applications- independent of the consumption technology. The enhancements
compare to SQL include:
• Annotations to enrich the data models with metadata
• Associations on a conceptual level, replacing joins with simple path expressions
• Expressions used for calcu lations and queries in the data model
You may say: We don't want to create a data model in this end-to-end guide, which is
entirely true. However, we can make use of the advanced ASAP view building capabilities to
define a CDS view, facilitating the query on the data model described in chapter Data Model.
CDS views, like the well-known dictionary views created and maintained in transaction S E ll,
are managed by the ASAP data dictionary. During activation, a database view is created on
the HANA layer, yet only the ASAP CDS view (defined in a so-called DOL source) has to be
transported via the ASAP Change and Transport System (CTS). Moreover, the functionality
provided by CDS views can be used on all SAP supported databases, you don't have to
worry when transporting these objects in a heterogeneous system landscape.
9
CDS View Building in ABAP
For the definition of CDS views in the ABAP data dictionary, an ABAP DOL source object
(R3TR DDLS) has to be created . These new objects can only be created and maintained with
the ABAP Development Tools for SAP NetWeaver, the artist also known as ABAP in Eclipse,
so we'll start the task in the ABAP perspective of our SAP HANA studio:
1\ 1!' . 1> · 0 · 0, ·
the SAP HANA studio, right- ~~~~~~~2~~d·l d;t 9St#IWM~e
click on the $ TMP folder of
your ABAP project and select
New> Other ABAP
Repository Object from the
context menu.
Ba:k I li7¥?
Next ~ fin1sh Cancel
10
CDS View Building in ABAP
a. Name :
f!r'otect:• JA4H..orn ...~vebper.en
ZCDSV OPEN INVOICE PAdia~: • 'JWP
--GD-----------------------r-::-~-~-~:-::-l-,-,,---11~~cM-~-,-~-I
5. You can find the DDL source lC:, ProjectExplorer ~ = 0 (ill (A4H( ZCDSV_OPENJNVOICE ~
q;: ~ laz v
in the project explorer view r-· £J A4H_001_bwdeveloper_en
and an empty CDS editor S·~ A4H_OOI_developet_en [A4H, 001, ~VEI.OPa
9.. ~ Favorite Pad<aoes
window is opened. S·~a:J fiQ!MijiMJI
8 Q;j. Oictiona'Y CDS editor
El··IQ ABAP DOL Sources
;. l!i) ZCOSV_OFEN.)N\IOICE
, 1!1 £B S. EPM. OIA
63 a\ System Libr~rv
@AbapCatalog.sqlViewName: 'ZV_CDS_INVC'
define view zcdsv_open_invoice as select from snwd so inv head
{
key snwd_so_inv_head . buyer_guid,
'C' as category
union all
11
CDS View Building in ABAP
union all
The CDS view is built as union of three distinct select statements. According to the number of open
(not-yet paid) sales orders invoices No_of_Inv, the customers are categorized according to:
Remark: You may ask whether the usage of the HAVING clause and therefore the usage of
the UNION ALL functionality in the CDS view is necessary. The answer is yes, since CDS
currently does not feature a searched CASE functionality like
CASE ... when exp ress i o n ; the n ...",
which would simplify the given task. Let me just say: Stay tuned ©!
6. Activate the view (short cut
,. II
-- -·-- ......
~el.ect fr' : :nvd_so_ i nv _llead .-.._}
-
12
CDS View Building in ABAP
7. You can have a look at the [0 Project Explorer ~ = El II:) (A4H) ZCDSV.OPENJNVOIC
output of the view. Right-click @ AbapCaea lo g . ~qlV
~ Delete d 2.dCk L
Copy ABAP Resource;:.
LJ\
:.:::L' - - - - ,
tAMIMii=-
Get o'here·used LIS< . . Ctr +Shift TG
8. The data preview displays a li1J (A4H) ZCDSV. OPENjNVOICE 4' )A4H ) Data Previtw • ZCDSV.OPENjNVOICE !:!
9. Ready for the second view! fD Proj ect Expl orer 1;3 (A4H)i
Right-click on the ABAP DDL E" Raw D
Sources folder in the project ,·LJ A4H_OOI_bwdeveloper _en r;---
EI ~ A4H_OOI_developer_en [A4H, 001, OEVELOPEf ---
explorer and select New DOL e 'Ci'
Favorite Pack.aoes BUYI
Source from the context l; Sr fa $TMP,• j, · ht-d 'IC k
1 • ng J OE95F38C
menu '
! ! El '?'
e~
Diet l
.. . -
l2. d ick
BC
f l
J3ac
! ; ~. ~ @ New DOL Soorce Y
, ~ ffi S_EPM_OIA
00 a\ System library _ _o_pen
_ _ _ _ _ __
Copy Ctri+C
~ Refresh F5
13
CDS View Building in ABAP
~Ufl-!e -~ EJ
10. Maintain the necessary ' • New DOl
DOl Source
information: Q~~ODL SO._,c.e
a. Name:
ZCDSV CUST CLASSIFI
CATION
b. Description:
A4H: Information about
customer classification
In the CDS view, the business partner table SNWD_ BPA is joined to the previously created CDS view
zcosv_ OPEN_ INVOICE on the customer unique ID, and semantic aliases are given to the business
partner information.
11.Activate the DDL source Fi, Ett. •,~.:.,.,..,tot S-nt" PI-~~~~ fl.o..n <'40...... "it-'-"
['1 • I~ o ' <;) • Q • 9, · '1S'
(ct r l+F3) and check the
output of the view via the
Open Data Preview feature in
the context menu of the DDL
td:«m.l'k'..," d:n::c;9;r
source in the project explorer l~e.w l rttle~
C~mm"~b
G~':f ~o.'h:.rdl~ :<e••
(see step 7) . o,'llsh ~sh Tr~dr11 Um ,,
""
Al.'.AUTl'l,
Al;rt:S~fl'lli
10-I»'XtOJi An,v!~
Okay, you completed the first (or second if you count the configuration) step in this end-to-
end development guide; you used the advanced view building capabilities of the ASAP 7.4
SP5 to create a CDS view.
14
ABAP managed Database Procedures {AMDP)
30 mln.
Wl
20 min. Test/Debug Cycles
~
20 min. Test/Debug Cvcles
fi
25 min. Test/Debug Cycles 25 min. Test/Oeb~.~g Cycles
In the previous chapter you saw the usage of CDS views as one technique - of course Open
SOL would have been another- for push-down of application logic to the database layer.
Now, you'll get to know another techniques for code pushdown in the ABAP 7.4 SP5 namely
ABAP managed Database procedures (AMDPs).
From a technical point of view, an ABAP managed database procedure is "just" a simple
ABAP class methods containing database-specific procedure coding. Thus, an ABAP
developer can write database procedure coding directly in the ABAP and the call of the
database procedure is just a call of the class method.
But- you might guess- AMDPs can do even more; if you are developing an SQLScript-
based AMDP on HANA, the AMDP runtime provides you with a complete syntax check on
the SQLScript coding. And concerning lifecycle, AMDPs as well as the underlying database
procedure are entirely managed by the ABAP server. In particular, only the ABAP class
method has to be transported (using the well-known CTS) while the creation of the database
procedure on the database layer happens at first execution of the class method. This
technique allows- as was the case for CDS views -to transport AMDPs in heterogeneous
system landscapes.
ABAP managed database procedures can only be created and maintained via the ABAP
Development Tools in Eclipse, so we go back (well technically we never left©) to the ABAP
perspective of our SAP HANA studio.
Before we start with the implementation of the AMDP, we'll create structured data types in
the ABAP dictionary (transaction SEll). This will allow a simplified definition of the Gateway
services and the consumption in the Fiori-like application .
15
Creating table structure in SE11
ABAP managed Database Procedures (AMDP)
;
{II' Mbb~se T"ble
~ ~4E1ement
'·· ID OOl Source
'--~ (ll(tOO>-y l>lew
J
i : [P' O<'AMin
i , L l ock ctject
I~
<Back c~ncel
-fdkkl_
[toxt ::..J ~ _Cancel
16
ABAP managed Database Procedures {AMDP)
SNWD SO ID • TI~ $T.u!?L !l! C 21 7UTC TilTS St<tf(l in Len:.! Form (YYYYMI·lr:ct'f
• :S!ilil> C1IAA CODE CUXV s Oa:N: (UitenC.Y Co:l3
• INVOI CE DATE Types • !PM OJ.\ TOTAL AMOW'I' ~V'AA 1S ZEPf\i OJA: Tota1 Amoorrt
TIMESTAMPL
• CURRENCY CODE Types
SNWD CURR CODE
• SUM_GROSS_AMOUNT Types
SEPM- OIA- TOTAL- AMOUNT
r (Ae~oi] ZUNOIC~f.O $t
5. Navigate to the
~ el f
Currency/quantity fields tab OktlonMy: C/J.tn/14 SITudllle
~ ... -rJ U q;l 60 · a;. :~ ,aD 0 Her.-dTtO:J~&.y ~Sin..cb..le•••
and maintain the currency
code for field
S UM GROSS AMOUNT as
liS
reference table T)tirQ """lhxt COmiXJf'lerc l)1;le oac•T • R.e~erce tilbie Ref. ~ ~
• !m?_!_.umctR~ Cl'..ut I
Z I NVO I CE I NFO and
Typu
,,.,....
Type• ·~ OL\R ""
If
reference field · ~Ol>!CUX'f
GJ,.
Zlr-.~-IC-,_-,.-
,.-CUF=o
--CT-_-
,oc-,-.>
• UJ!!_ OU_TI!t'At_ . CWR
CURRENCY CODE
'j
Enhancement Category. l,!tll.tlos
E><tr~
StLUCtlre LonQth•.•
~k'cnmoot • !;lob~ Seorch ...
Atiiii) SJ~stem • ttleraochy DISPlay Ctri+Siift+Fl2
t'Ot> • QB Attrib.Jtes
~ij\'@i] I~JLSe••chHEtp I, A~tNa tbn Type ...
Component Typno Method Cha'lg9j01spiay lab~
T\'PO ~(
17
ABAP managed Database Procedures (AMDP)
category. ......................................................,
......................................................
;
- ----
10. Check that the create object @'Create ObJect Directory Entry x
18
ABAP managed Database Procedures {AMDP)
Itype filtedext
e l<;!. ott~CNtv
l · C§ Dd:obose Proced.re Proxy
' ~ Database Table
t·if:.. Oata Element
' ID 001.sour<e
' ~ Did:i:n:ry View
J
.
i"·if::.
~ Domain
Lockct.ject
i ~·· I I~
! ~-/
___ <_~-~--~-~
-d-1~~ ---·-~--~ Cancel I
SNWD PARTNER ID
- - ~~~~~~ ~!]~~~~~ Preclemed TYlJ<! I 1 I 8
• CUSTOMER_NAME Types Let><;Jth oeci... Short Oesoi:>tiOn
CUSTOMER I D Type• • Sll\JD PARnliR ID 10 OEPM: Busness Partner 10
SNWD COMPANY NAME
- - CUS1'0Mn. JJAKI: Types ..,. S'Ji\1'0 C0)1P.l.JIV JIAM!: 80 OEPM: COOIP"W Nama
• CITY T ype s SNWD_CITY 'l'Y'Pe:s ·~ 40 OEPM: City
Type• • Sll\JD S'mEET 60 OEPM: Street
• STREET Type s SNWD_STREET Types • SU\JD POSTlL COD£ 10 OEPM: Post al Code
• POSTAL_CO DE Type s T'I'P•• • SJl\lD COUNTRY OEPM: CCUltry co:le
Curutt»CY CODE Type• • Sll\JD Curu< CODE OEPM: CL11encv Cede
SNWD POST AL CO DE 1sUM c
- - c.ROSS AMOUNT Types • S'£PM OIA TOTAl AMOUlJT lS 2EPM OIA: Total Amount
• COUNTRY T ypes
SNWD COUNTRY
• CURRENCY CODE Ty p es
SNWD CURR CODE
• SUM_GROSS_ AMOUNT Type s
SEPM- OIA- TOTAL- AMOUNT
19
ABAP managed Database Procedures (AMDP)
,.,..
<;onwnent Type Data T .. Referenc:e table Ref, field ShorttleSaiOtJon
reference field
CURRENC Y CODE
~~
CUSTOIIIR """"
POSTAL CODe;
,.,
,., ....
,.,..
,., ..
• SJM> PART11ER ID CJU.R
• 'liD COilPllif .n_ CBAR
·~
·~
CIWt
CJU.R
• SIND f'OST.I.L COllE CIU.R
-'--
EPM: 9Jsness P.artne1 1D
EPM' Oty
EPM: Street
EPM' Poot<f Ccxlo
COW11tY
C\DISi!UCT COOl ,..,.. • SPD ~ COD! C'IIKY
EPM: Ccurtty Code
!.!tilities
~ CJ 0 Hierarchy Display Append Structure ...
Ic Component
CUSTOMER ID Typ~! ... ~
C Change/Display Iable Type
!;,mancement Category .. .
19. Activate the structure type via L [A4H) ZCUSTO MER_INFO 1;3
the well-known matchstick lMenu ,j (?i
icon.
Dictionary: Chan~ctura
<:- '* ~ ~~ c8 6"1>~ ic. ~ ID D Hiera1
20
ABAP managed Database Procedures {AMDP)
20. Check that the create object @ Create Ob)ect [)rect ory Entry X
OriQnal System
Orignal lan~age
Created On
As mentioned before, we created these structure types since this simplifies the definition of
the Gateway OData service as you will see in chapter GW Service. In general, ASAP
managed database procedures do not require these steps. In principle, the structure types
could have as well been defined in an ASAP interface or in an ASAP class.
• C X
2. In the New ABAP Class AEIAPCiau
dialog window provide: Q'oXe;~"' ~8'-P ci ~Scl
a. Name : &·co...JC.. - I
ZCL CUSTOMER OPEN &Q.'IS$... I
INVOICES
I'IC,• ~L\J..CO;TC<<ER.t<>fN..I'®lCfJ
b. Description : A4H : Qes~l)on: • A.fli : Custcmtr tnform~~
OtUnallar~;Je EN
Customer Information
21
ABAP managed Database Procedures (AMDP)
window opens. The class 2!~~ ZCL_ C USTOI!ER_ OPEN_ I NVOICES de f inic ion
public
definition and final
create publ ic .
implementation skeletons
public sect.ion .
are shown which you'll prot.ect.e d section.
implement in the following privat.e sec t.io n .
~~~~~=~~§ .
steps.
22
ABAP managed Database Procedures {AMDP)
unimplemented methods.
The light-bulb icon indicates
there is a quick fix for this
issue. Click on the icon and
select the quick-fix to - CL ASS
f:NDCLA
implement the methods. .!.l
§lobai Ciass~~·~==:::=:=:::=:=~==Jl~~========~~~u·~r.~b'~~~·w~<~~~·~·~~<'~~~~
~'
g e t _ c u rrent_ c onv_re l e
METHOD gec_invoice_ into .
vent ite ms.
ENDMETHOD .
ENDMETHOD .
ENDCLASS .
23
ABAP managed Database Procedures (AMDP)
( .. Preferent:es 1!1(!] El
8. Before we start the
Itype f ilet ted Colors and Fonts
implementation, configure B· Genera
Cdcws ondFonl:s (? • ,:,ny<N1,:,ctt#. ,. • ony strf'lo):
l 9 Appearance
the background coloring for · · ; ColorsondFQnts l typeUterte>'t
9. Back to the ASAP Class Code snippet: get curr conv relevant items
editor, implement the
g e t _ c u rr_conv_re l evan METHOD get_curr_conv_relevant_items BY DATABASE PROCEDURE
FOR HOB
t _ i t e rns as read-only LANGUAGE SQLSCRIPT
AMDP. This is achieved OPTIONS READ-ONLY
using the language USING snwd_bpa snwd_so_inv_head snwd_so_inv_item .
statement "BY DATABASE
declare a local variable
PROCEDURE" and we'll do declare lv_today date;
an AMDP for the HANA -- get current date for conversion
database (HDB) using select current_date into lv_today from dummy;
SQLScript as language. The -- select relevant invoice items
using clause includes the lt_relevant_items =
ASAP dictionary types that select
will be used to query from. i .client as client,
i . node_key as inv_i_guid ,
h. node_key as inv_guid ,
The method body only bpa . node_key as buyer_guid ,
contains SQLScript coding. bpa . bp_id as customer_id,
h.created_at as invoice_date,
First the actual date is i .gross_amount ,
retrieved, which will be used i. currency_code
as date for the currency from snwd- so_inv_item as i
conversion later.
join snwd- so_inv_head as h
on i .client = h. client
Then, the sales order and i . parent_key = h. node_key
invoice items for a given join snwd _bpa as bpa
business partner (provided on h.client = bpa .client
and h. buyer_guid = bpa . node_key
via the importing parameter where h.client = : iv_client
i v _ b upaid) are selected if and bpa . bp_id = : iv_bupaid
the payment_ s tatus of and h. payment_status = I I ,
'
the sales order is empty
--convert gross amount of items to currency USD 1 1
24
ABAP managed Database Procedures (AMDP)
table .source_unit_column =
output_unit_column =
All these relevant sales
order items in tarset_unit = ·uso· ,
N!ference_date = :lv_today,
client = : iv_client
subject to a currency
conversion routine (using ( gross_anount) ) ;
the CE-function
f~THOO.
<:<~_<:mw<~ r~~ i <m) with
target currency USO and
prcwidtng the rcsuttset for
the exporting parameter
ct_conv_ i terns.
t O.Implement the method Code snippet: qet invoice info
gct_ invoi cc_ info as ME111l0 get_invoice_inf o BY OATA8ASE PROCEOlllE
AMDP and provide the FOR: HOB
LAHGUAGf SQLSCRIPT
ABAP dictionary tables OPtiONS R:EA.O·ONLY
SNWD_ S PA and SNWD_ AD, USING sm.cl_so .snwd_so_inv_head
as well as tho AMOP zcl_custoner_open_invoiccs• >set_curr_conv_relevant_itens.
ZCL CUSTOM!R OP~N !NV
ICBS=>9et_curr_conv_r call
eleva~t items ln thG "ZC l _ CUSTOJIIER_ OPEN_ I HVOI CfS=>GfT_ CURR_ CONV_RELEVANT_ ITEllS"
using clause. (
1v_c11~t => :1v_cl1ent,
iv_boupdd •> : i v_bupaid,
In the me thOd bOdy, the et_conv_itefi'IS => : lt_converted_itellS );
AMOP is called ancl the
resun is retrieved into the --accrecated cross a~nts per sales order invoice
c t _invi nfo •
temporary table select
lt_convert ed_i t ems. customer_id,
so_id as order_id,
1nvo1ce_date,
Then the gross amounts are
currency_code_conv as currency_code,
aggregated per sales order SUI!( «~nv_itefi'IS . cross_anount )
invoice and the information as sum_e:ross_anount
on the sales order I0, the f"on : lt_cet~verted_1tet~s as conv_itens
join snwd_so_inv~ead as h
invoice date are added. on h. cl ient = conv_item.s. client
and h. node_key • conv_items . inv_evid
The result set of the query is join snwd_.so as .so
return via the exporting on so. client = h .client
and so. node_key • h. so_guid
table et i nvi nfo. aroup by cu.stomer_id, so_id, invoi ce_date,
cur-N!ncy_code_conv
o"de,. by so_id asc;
EJIDJUTHOO.
25
ABAP managed Database Procedures (AMDP)
table et_bp!nfo.
b·l I
I ~
26
ABAP managed Database Procedures (AMDP)
__
.. -"·-'>1.-- .. .... ..........
~ ~
.--
."(;iit,..-.... _,_ ..__....
. ..-- .....- ........ -- ..-·-
"""
........ ....•.................. .......... .... .
·- ·-~-·
_ ~
.,
- . __ ,_
~
,
• ...... ... __ _-
... ,..............
_,,
.
.
.
,
Congrats. you just finished the second major step of this end·IO·end development guide; you
defined and implemented ABAP managed database procedures! Now get yourself ready for
the consumption of the CDS views and AMDPs in a SAP NetWeaver Gateway OData
service .. . our next step towards the Fiori-like application.
27
Gateway OData Service
li
lll...... '~41" ......,....,_.
SAP NetWeaver Gateway will play the role of OData service provider in this end·to-end
guide. OData is a standardized protocol, which is used tor the oommuntcation between the
AS ABAP bacftend system and the Fiori-like application running in the browser of your PC or
MobiLe device.
As of SAP NetWeaver release 7.4 SP2, you don't need an additional plugin to use the
Gateway functionality but we have a fully functional Gataway •on board• ©.
In the following, you'll develop the OData service ZE2E_ CUST_I NFO featuring three entity
sets:
• CustomerC&assifications, consuming the CDS view
%COSV_CUST_CLASSI FlCATION
• Customerlnfos, consuming the AMDP get_ cus t omer_ in fo of class
ZCL CUSTOt1ER OPEN l NVOICES
- -
• Openlnvoices. oonsuming the AMDP g e t _ i nvo i c e _ inf o of class
ZCL CUSTOt1ER OPEN I NVOICES
- -
Screen Shot
1. The OData service is
developed In the Gateway
seJVice builder transaction
(transaction code SSGW).
Qrktl l
28
Gateway OData Service
continue.
......,..._
_
............. . ..
~r::: ===="'"
,.;;:;J~)'""
llrn;lo't:a
29
Gateway ODota Service
----•----·
6. In the ODIC lmpon dialog,
choose ZV_CDS_ CUST as
ASAP SlfUCNrO and ho
<etum.
_#___. --~
·-...
..
-·
_,...._~.,.._,....,..
---·- ··"'---
-
J ...
...
0 I •
_, ••,..,. ,_....,_
' ...... ~
.·,•
-- -
Choose ZCU$TOMER_INFO as • •
••• •
ABAP Struc!Uro and hk
retum. --
Cl1ange the Ol>ject Name 10
CtJstomerlnfo and verity the
usage of au fields is set to
Property, excopt lor
CUSTOMER_ I D, Wh~ is used
return.
30
Gateway OData Service
9. Via the conteX1 menu of Data •9 w.o_o.T_Io"' A<-\ &ontrQ/Jiof'll.~ owf:. W l.o tO ; 11;.
• OIIolo -
Medel > Enr;ry Sets. create •A...," r,.p....
the entity sets corresponding
to the entity types defined in
....,.........
. ...(1., _ , . ,
· <>-
/)
......
. o~..........,., >I•J:o
!nYOicelnfos
dick
31
Gateway OData Service
---
related with the C ustomerlnfo
with cardinaJity 1:1.
32
Gateway OData Service
!'a-
,"""""""'
.......
.;"""' -:m~tl
Cu:I.OTCfQx::.. c..:u:r
33
Gateway OData Service
~(Q]~
"""""..... c ~
... -,.,.
• ~ ttz:r_ruST-.tlliro
~ ...............
A4H: .&.
- N¥Te .
·-· ...
20. You receive a list ol m oclel
and servtce dcfinlttons. Just
conti nue with the check-mari( ...___......_ ....·••""-1
_
bunon.
--~
·--
---
~GorooroOOO.U.
tn.zr;u-.nn_,_
m._tt:~.nn_l _
_,~e_rxr
_,~<:
--
~olo»l~,yq~
l~lt:<)li~
lf)dVJQI '.lco'o ~
,.~-
21.tn the Create Object Directory I" •~-'" ~""' T .,. • •· t I" •
34
Gateway OData Service
~·
. <1 8 o 0 e QlllM "'''O)c l:!ll!! Ill&
suooassfuJ, you see the
messages as shown in the
~ ~ ,_.,.."'"
.5' . ,. ~ ~ (&)OI~~@)I?JF,-;;J
.......
screen shot. I '7a ............
1"'"'" ..... _,_,...........
" ,.~ ....... ,..~ ..., 11'11: ~ .......
• d i.<O>- ' _... ...... .... 3-''""'-.
.. ....
o.r.o..- ..-..... ' .!1....•· · - - ..,.,., -.,
·CJ•u-.-·
. ....-, ._-·....
• c.o~ .,, ..... r~
..
1 too:.....,. n
. ....
.:.:
,-,~ ~-··
· Ca ..... ~....,
·u - - - ~J -
~ .~
•••
•
.. · HI e 0 e UJtM ac.:~u m
mode (pencil icon). b~ a.t.-ykwk~ (luilfh,
~ li!:W ,~[;'
r: . ._
· ~n-.l!,.um_u:
: fi'.ciCk
•0
· CJ~~
t l...W.. lfttVt<
t"'"tiO.'.U oJ IIIN::O...:oi!Lo W.-ltfu
35
Gateway OData Service
_____
• •<
.c.:.."
·-- ..,••
··- --
·o--
~:::--
=-~··-
-
-_~1
... ·--
· ·---~ -- ~
·-r::: ·--··-
F'l help to select thB
·a-· .._ ,..,_,...
·=----
ekunents from the given Jist.
·-
·-
··-·
·--·
27. Save the project and
(re-)generate the runtime
objects.
36
Gateway OData Service
-
' 0 RtTUI'le MW'<Y..U
• Os.w:o~ ~ 10 ASAP W(ll<t"f'(h
37
Gateway OData Service
liiY.U:.O.
with the two missing
implementations in the
(~ to tfl~ (l.ln Ull'.) ll'(' UT Urt.lll'!l''UTI(III,
following steps. tl!Hio.U$.
.. ... ·-----"'----
_ _
~ ~ r~ .-.~
·---~---...... - ......-
....-.
('""'" \._
~.
38
Gateway OData Service
output = lv_custoner_id_fil t er .
•create an instance of class zcl_custo.er_open_tnvotces
DATA(lo_cust_info) • HEN zcl_c ustomer_ope~invoices ( ).
•call the ASAP manaced DB procedure respectively the
•ASAP cla:ss method cet_customtr_info
l o_cust_info->get_cust oner_info(
EXPORTDIG
iv_client = sy-nandt
iv_bupaid = lv_custcmer_id_f ilter
DIPORTIJI6
et_bpi nf o = OATA(lt_enti ty)
) .
•only one line ts e•pected to be retrieved
IF lines( l t_entit y ) <> 1 .
RAts£ £XC£PliOH TYP£ /iwbep/c•_"Ww_bu si_uception
EX""'"'IMG
messaae_unlinited = I Preble~ i n Custoner I nfo; { lines ( lt_entity ) } <> 1
textid = / iwbeop/ <)(,JJgw_busi _excepdon=>buslness_e,.rol"'_u-nlimited .
l:NDIF.
•11ap t:M fir-st row of lt_ent:ity to tf'le output
.~~,,~·!~'" a l t_entity[ 1 ).
~~================~
the
34.1mplement invoiceinfos_geLentityset method:
COde •
NETHOO invoiceinfos_aet_entityset .
39
Gateway OData Service
iv_client = sy-nandt
iv_bupaid = lv_cus tcrner_id_fUter
DtPORTINii
et_invinfo = OATA(lt_entityset)
) .
• provide the resultset of the N/ifJIP to the tabular
• tabular output para.eter
et_entitvset = lt_entityset .
ENOM.£TI400.
-·
,._,..,..!1<1'\0.I,IX'o~ UI11UU1' 1ll\l <Ul<> <1><:
oun ""'u.: .
the pretty printeJ remember '"'""'"" ........, ....,.......
shortcut Sh i ft+F1 @, ~':'1-:TD ~C.:ftCII.
l i l t - ..,_ _,,.,,...,."'"'"-"'' ~" lllQll'Ufi'JI(II ,
llii'Wll:4 '"""''~·•nt"•-o-e_,.,,,,~?,...t IIUUIWttl(ff,
"'JYl'll$ III'JCTIIlfl·
OO<~.
OData servioe. Go back to )oo.•• , & • <l A 0 0 11: QIU6 b'..U1fl 1:11!1 $ &
~~-
·--
..._
Do...- -
:.-...
.o 00<1
0» O,Qf;
=
Ooubl<rclick: on SIJIVIc6
Maintainance and then on
RogjsttJt.
·---
··- .... ·M,.._
onr""..-1
O)(I b'- 40ih
.\i'":".:;J
. .....-
37.Confirm the Warning.
(.(r lll!f,J5tel, M<lr(iin~&tOI VJOQ:Iel~t.IO!'IS, \0,1 wl be
'1''--~'~"'iected to tl'l: d:«ed system. Do rou W¥tt to con!T!Jeo?
40
Gateway OData Service
41
GW Testing:
Testing OData Gateway Service:
/IWFND/GW/CLIENT
Gateway OData Service
--
-............
--
.
,.. __ - ... ,.,.....
••
42
Gateway OData Service
~7;:::.,_
• tw • • • C!~"'~' a :r. • •
-f .zi);.,_._, ... F ,
·- ....
Ifill'~.......
.. GO! ••
...._
1!1'~
'
5. Several more SAP GUI
Security information wtndows .... -........- .......
appear. Read them carefuly
e or just click allow (and now, .......
(_...,,.,_ _ _ _ U<Ill'~
---
,. ___ ...
6. If everything went fine, you
should see a successful
HTTP Response (status cocfe
•
----
---------
~- ...
• . . . .. . . . . . rltloiiO Ill: • •
~--
200) and the xml tesult of the ----- -~
_
~·- lir- ·.._,.·-·-U•
____-__
--
OData request
--
--
___
-----··-
--
___ _
__
.. _
.. _...
_,__, ,,
---~=-=:::=::--
~~
--..--
--- ..·---------·
...~-------
_,...
--
--·
--·
---
--·
--· --_ .,-· -
--
---· ·--•..... .-v,._ _ ___ _ .
43
Gateway OData Service
Well done, you finished the implementation and testing of the SAP NetWeaver Gateway
OOata Service and hence the second to last step on our joumey to the F10ri-like application.
If you would like to leam more about SAP NetWeaver Gateway and/or contact the experts,
please visit http://scn.sao.com/oommunitylnetweaver-gateway.
44
Fiori-like Application
8 Fieri-like Application
.,
~. .......
c.ot~~,
_
.....
).txk';\1-a...J ...~
n
-n - -
A.IIIIIIP"'*"'l:ool0l
.,... .... ~.,
b,j
...
•.c:...._$oot\i«<
-.........
to. nn~t:WIIIo/IFf>
~
..,... lo;ft:OO., .......'"""'.......... ,.; ..... ....... ..... y...,• .......
-
Ready for the final step? You'll now create a Fiori-like appltcation to display the list o f
Customer Classification Information and to do a drill-down on the detailed customer and
open sales order information.
In the following, you'll create and d evelop SAPUIS application locally, where locally means
you develop a SAPUIS application in you Edipse installation. The local SAPUIS application
will then be impcxted to the ABAP backend using the SAPUIS repository team provider.
Having provided the application to the ASAP backend, you're ready to run and test your
Faori·like application in the browser.
Deecriflllon ScrwnShot
t. Right-click In the Project
Explorer view and select
New > Otherlrom the
context menu.
·- - ·-- - ·~
-- ...
-
6-·--
·--..
..,.___
~·-
...................
-~ •
... ........
.._ -
-~ 0:0~·-··
"- ··~~--
r '·-· t '·-
-·-·
• ••
~-
--
fli: ¢o.tlo'- l.
.... - -~L•O""•"
...........
--· ··-
45
Fiori-llke Application
-· ................. --
r
~ --·-~ ~~
3. Provide the necessary c:....... .._,_,.... ,...._ .... :;AI'IM
'
.... t_..
'
r s ...:__j
c."'-
.- - >
cr;.. .. tw,
<!! ... ~ I f)oH I L__J~
-
-·
....... Jil(ll:;,o>
• Development Paradigm:
XML (ra<lio·bunon)
I_..._._.,. "'
-·· e:::> ,
~-,_..,..
__
~..-·---
c~.-~.~)
,
·..-·-..........
,_
~-·--""'
"11 ~
r .)l.. ~l ~~
'""
46
Fiori-like Application
--
6 . Implement the i m !1:x. h t.ml file (best thing is to oopylpes.te everything ·~) :
<!DOCTYPE HTML>
<f'lt• l>
<head>
<!leta http-equiv="'X·U.·Ca..potible" content o: "IEc~dg~">
47
Fio ri-llke Application
</I'IUd>
<body class.,•sQPVIBod)'" £2U.,"oppt tcG"tion">
<div id= "cont~,.t"'></div>
</body>
</l'lbll>
_));
....,., ., ..~... '"
-
•o
-·-
B. Open the I'-"•,.:•'""""' u ~""'"' "'- a
..·-_ -·-
E ,.
~ l\
Master . v i ew. xml with a
··-
15 .....>V~o•. . - -......1- ...........
taXI adltor. Right-click on - 1!1-uiii .........)Mo..,.. l - "'· ..........
.: v .._,_ I'IW ~-
··-
.......,..
..
·-~.... ...
"''~'~--.-4~·~.,.
··-
~ --~
It .. I'C'l....
- --__
15'4-·,..-
.., _~
...
.,.
...... " .......,,..
0
:i
. ' "'""""
-·-·~
Q~
-
~- -·
.......-..
~
48
Fiori-like Application
xm l n s : ~Msap.n ·
col'ltr"'llerName= "ze 2e _f 1or1. Master-"
xnl ns: html-''http ://tNW. w).org/1999/xhtnl•>
<n:Page ld="page_Kaster•
cbs s-" sapu i Fi oriObj ect Pa.ge"
Utle="Custoner list• >
<.n:content>
<.n:Lis t
id=" l i st_CuslCl &ssif icauw,"
heat!-erText- "Custoners"
gro..,ill&="lrue•
gro.oJinglflreshol d- • S"
items-" {/Custoner c lassifications ) • >
<m : ObjL~ tl i Stlten
titl~" {Custoner Nane}"
number-=" {Categor·y}•
m.rnbel"\kk it=• Category"
press=" h::mdl ePr·e ss"
type-="Active •>
<m:attributes>
<m:Objc!ctAttribute tcxt•"{Cu:litonerlO}" I>
<1m: attributes>
</m:Objcetlis t l tcn>
..........
the SptitApp. Create a new 111--Qt • t llo:l'l"
·-
(bw~--
49
Fio ri-llke Application
_
~ ~ ..~..... ...-
.,. ,....._ ..t.., ...................... w
..............
-~-
~"
• *~
. .;;,.,..,_
,_. ,. ._.
~--
-.......,
... ........c......::::;, ~
~
, ,...~ I ~
..-_
··-...··-
-- -·-··· ...
12.0pon the ..
" .... ,
. .; ...._,
~
ouail. v i e to. x::nl file
with the Text Editor via the
oorrtext menu Open With >
Text Editor
. .~-··-"
-~--
. . . -. -- ...-... :l...e. ._
~·
"
- --
_.._.....,......_
·~ '"'
<ObjectHeader
1d=" head_ It~vo1c::es •
title-· (Ctls tomel'Harte) •
nunber="{SumGrossAnOur'lt}"'
nt.rnbef"\kd t-"{CurrencyC()c!e}" >
<attri butes>
<Obje<:tAttdbute text=" {CustOIU'!f' ID}" I>
<ODjectAtt ribute t ext-''{Ci t)'}" / >
<Obje<:t Allribule te.x l:" {Poslal Code}" I>
<ODject Attribute t ext-''{St ru t )" I>
<Obje<:t Allribule te.xl="{COufllry}· />
</ attl"ibtltes>
</Obj e~UMC~dCr >
50
Fiori-like Application
r==~<<T!~ab~l~
e ~~~~
>•• P~
ath~
1S ~~~.~
- ~~~
••~~==-
-- >============~
id-"tbl. Invoice s·
items ="{ p3th : · ro t nvoi cd nto·r
noonar ext-"No data available - Please select a <ustoner·
gN>wiJI&="true•
g~~i n3Thresho ld - "28~ >
<colulllllS>
<(0}1.11111>
<lu:ader><label tex t="OI*dt:1· to• /></header>
</Col utm>
< CU l urW~ hAli gn:•center" >
dt~ad e r > <labe l text -"C~at ion Date" 1>< /h.~aden
</Col utm>
<C0l unw1 hAli gn:•Rt ghl" >
< h.~ade r > <lab~ l text- "Gross Nlount• /></Mader >
</CU lum >
</ col uiTI'I S>
<i tl."ttiS )
<Col umnlist l t en>
<ccl h>
<Obj e<t i dent l fier t i t le ="{Order iO} ~ />
< T~:x t tr.xta • { Invoi ct.~t~:} "/>
<Obj e<tN.,' "ber nl.lflber=-" {SuttGrossAftount}" nufl'tle runit= ~ { Curre~c ytod e } • />
</cclh>
</Columnli~tltr.n>
</itums>
</Tal>lo>
</ content>
</Page>
</cor e :View>
14.Adcfitionally, a file tor the
Detail controller is required..
B i 'tJ ~o.tcr~ !UfJ~
1)> ~~\'((II !(W lEa_FIOIU '
.. (oCon~~,.) (
""l'·"' . v-~Con () . (iiOOt
Ill :t s.r...~<:es •I:!Hdvhr-eu:
Create a new file via the
oontext menu of the
2e2e_t1o ri iOider by
..... ..
!tl ·k~ll-
e .- . . ~- )
• '"
O(tll I 0
~~-·
....
'""
G ~t(IT
"'
·~IIID'•::::IIIIII~~~~~~·
.~..,.
~}'I
~~~~
~ ~+:;NI..W
·-- .
""'
~ ~-~-..
"""'
..... ~ foil"~
"""
......
"
.. .....
51
Fiori-llke Application
>
15.1n the New File wtzard,
••. ,_,_.,.,_
provide the file name '
llet~i l . (:tll'l.t'.t\.,llet. xml
~ ·~
>
---
.... .. ............ ...
~-~···
o :~
--
f> \!: . ... . -
,...... .'"'
..l>.,(l;o.((!(WI)t.t)(
·....,.,
~
.;...,,...,_
~,. .;. ....,__
-
...._.._......~- /§
_.,_.,r
---
I
1 ~-=.J
16.1mpklmcnt the ouail. controller. j s:
"'
Code snippet: Detail . controller. j e
sap.u!.controller(• te2e_f1or!.Detail" , {
,..•Called wMn a controller is instantiated and its Vi ew controls (if
• availabl e) are already cr eated. C.n be used t o nodi fy the View bef ore it
• is displayed. to bind event 1\andlel's and do ot her OM- UIW 1n1t1al1ut1on.
.,
• @"r~b~rOf zele_fiori .Detail
on I nit : f unction() {
II handle data loaded events
v-ar o8us • ll4!W sap.ui.aetCore().aet.Event8us();
oeus. substr1boe{"e2e_app'", "Re&dyl'oFetctiDetaUs" ,
this.handleFetchOetails, this );
),
tlandleFetchDetail s : funct ion(sca.n.nellO, sEvtid, ooata) {
var ocontext : OOilta.oCtx;
i f (oContext) (
II 81nd obje<t header to the OOata model
var oHeader • th is .byid( ' he~Invoices' );
var sODataHlterP-ath = oCont-e xt. sPath + 'IToCustOrllerinfo' ;
oHeader.bindElement(sODataFilterPath);
II sind the ~vieation properties of the ooata service to the
II UI table control
this.getview() . setSindingContext(OCOntext);
),
));
52
Fiori-llke Application
53
Fiori-llke Application
···--- ----
Description Screen Shot
1. Select Team> Share
· ~- - ··- -~
• -...... ~ -·
Project from the context
menu of the Zl::?.l:! e'!OHl
application project
-
• l" -~
·~-
c ~-
~-
-
..
.,••.,:.
•
#..:•-
.......
-· --·
·~
~··
.-. . .....
•.c........ '
..........
... .....-
" '
. ::..... u ...
-..~
......... _,
-
~~ '
-~ ~- ~·--*'
"'"""'....,
<Uo ,9"'-V. . .ft ,o
••• ................
-•.or.v••••··•
-
-·~
-·-;-:._:----t~~~~~
-
2. In lhc Share Project dlaJog,
seleo< SAPU/5 ABAP !lh ..... """''""
,..,., ...- . . ................ -.."""".......t>oo ......,..;,.....,
ReposlrOty
,Gf}
54
Fiori-like Application
--..•-----r..
._........
___.,., _._....,. --
I
~~-~l
SAP Logon application
-·-
~-= ~::::::::::::::::::::::::::::::~1
... , m
,.. ~--
r
55
Fiori-llke Application
.. . .
'
A4H: End-to_encl F10ri
Application
• Package: $TMP
- -.
.
··-.·· .. '¥
---
........ .- ..........
., • +
-- : ... . ;,". .. •
•¥•~
-:~":~
-
" .... .. - ~
............ .....
-.- --
--~
-
-, .,_
...
· 1oM(_____
.........
~.,.._ ,
_............ ..
...,_.
_._.,.__.....,,..............·-·
..,..,., ,............,... .,..
.!.:- &fl ·-
6. The ·No transport req uest~
Information Is shown.
Continue with Finish, which
- '
~ ,.,~_
,
...................__
......... ... _..,..
I I
-- _ ___
.........,........ _..... ""-_
...,_
_
!0!....- l t N - ! O tU
!.'::'~i.Z.";:C:.~.;.:.~:.!.
_
._..._
.....
.._... _.,..,_,........_-.........
- ... ~-
.. __
...
""'
<! .....·------~-~-
_ ..._ )
~-
,
I·,
__J
I ~' I ,\··~ s .
56
Fiori-like Application
............._.J&i""""''·-- ...
..
• 0
!0 .\ ..
.,,._
'·
.... - -- . . . ....
......................... .,...-... ...
.............
- -- .... -
the SAP\JI5 ABAP "~~~·-·"'-
.. ...,........ I
Repository and you can now .....
.. :r . . . ___ "' ...
... -~ · .....
- ~ .... =· ................
submit the application to the ...............
....... ..........
...
-......... -
~
.....
Fa this purpose, choose
Team> Submit from the
context menu of the
··----- ......- .....
c ~,.!';':..'! ~.-. ~~~ -
---
that will be submitted to the
repository, check the list and
oontinue with Finish.
••
!:i- -··.
Iii I ! ! _ > "-___
8 . .. _ .., ......... ' ..
I'Jf
• ··
-·
-~
es- -...' " "'
s.--
Ii - --
e • ..- ....~- ..- - . ..."- ·-
e •~
&! Iii _ _ _.... .............
IO! Iil _ __ _...
-
.-.
._,
~
·-
ll a -
11 8- . - -
--
- ----
Jlppee!
You have successfully created the FtOri·like application! But. ..
57
Fiori-llke Application
--....-.....
.....
+ · -..·--··..· · - · - - -
-
••1.10...~............. "'"'
'·"""'"' 150412570 f2 -
~· 1
-··
s
-
.....
- • "' -~ O) _......-.)
58
Appendix
Appendix
Installation Guides
Install Eclipse
In the following I assume that you are 'WOrking on Windows. In this case, download the 32·bit
Version of Eclipse Kepler from (www.ecliose.om) . extract the zip file to a folder of your
choice. and run the eclipse.exe application.
.n,
Install needed
Screen Shot
1. Open the Help menu and
choose Install new
Software . .. If:::_ ~~~~: ~:.·:..
F~. ... ltJ' ~"""
li
'4 ~-..........
~ij wt.<c..W.~...WTU .,_~
(ly-.
(M.-...
r.,-n.;..~o..
' ~~ ..t -
<-.-·-
~ <-~w.--.
"'"""'
_. ,-
-·---~-
..,~ ....
2. Click on Add... to add the
needed updato Sites lor the
Plug· Ins
·-· _._
- ..... ~
--
: --~
d.com/keoler
1-· f/#~1-
. .,...,_,.....••, _.....ot{loof....
('[! 1
~kHef~ I ,_.
SAP
59
Appendix
. . ___.. _
4. Install the plugins:
• ASAP Development Tools
for SAP NetWeaver
._.
--·----·
__ __- - _
... __ __.... __... - .,.
• SAP HANA Tools
• Ul Development Tooll<it
for HTMLS
-*----·-..
··--
-
.....,.
- ·--
·--
-·-- --
.....
~""'"]
l
=
5 . Check the installation
details ---
-··-·
---- - _...._
•_.,... ____
..---
·---
- ~~~~~--···
---- - "•••'
-.........-
·---
·--..
·--
·-----
·-------
·---- ..
..·-------
..,
----
__.._,_ ---........
....
....
,....
"""
---
------
--
------
---
-......_._..
-
6. Accept the terms of the
license agreements flnaize
the installation.
~:§:;;:;"""""'"""";------,-;
. ..••::-:.;
...- -.- -
.....,uru
Note: D uring the i nstallation -~(-
process you'll be asked to
confirm security warnings
and to restart the Eclipse.
Please do the needy here
@.
-·
60
Appendix
--·---..,--
...... ....... ...
~
_
,_ ...
•-r,.._,. __ ,_.._..,. ""'-"--
_
Addtcss or System alias It
maintained in the
---
----- .-
C :\Wi ndows\SystemJ2\
drive rs\ etc\ hosu file .....-.-.
(as ls the case for Wtual
appliances).
-·
-- •
,·-
------------
3. Go to the ASAP pe"!>ectiVO
ot your Eclipse installation.
( _,..,,...,.....
s... ,~. , ...
P.c.c~. P..,~•M.
(boo """-"'•
c:.... AJ ,.,........ .
"....,_..
61
Appendix
'
.. ~
1 m~, ,
&M~""""""
··.,-__
9'cot~1
~-·__,
,,! ..•.:t
hf.-,t i)U l -.,O><IIY
•
,_
...
·· ~A . . . . ..,.-
flo....•;
...., ,_,.....,.,
Ot~~
c.: I c.-... I
'""'-~
....
......
.-·-·
,, ;; r..'*"""'"¥<1
J ~-hojo«
....·I"' f •• "'!....
.... ,.,.,••• I ;"8 ,!>...........
__,...,..,.4:..~"--"''
.-·
a ..,, ( .,_..
........ .
III~PI\IjHJ-
It: _
-)<;..........,..._
...,.••..,.~
Cl<· -'IN'I· J
~-·
62
Appendix
P' stFM,.OG.OI.I
.. _.._..
i _ _ )_._,.._
®
C¥5...)
"' I[
,_. I
3 . Configure the data II' IAAHI SfYt.t_OO_W. !:!
generator aooording to the
screenshot and please read
H~ • 0 v
• 1!1 e~e IP
the axp&anation beklw. £PH: RI!PQrl to sblrl O.t• GIJn~r•tor CIMnnel fiir I
~IS>
"Explanation beloW'
The transaction will generate the all data necessary to run the described scenario and show you the
benefit of the SAP HANA. We recommend you to run the data generation as a background job
because it takes a wtlile to generate the data.
The values as shown on the screenshot will generate 1.000.000 Sales Orders with approximately
6.000.000 Sales Order ttems, the according Invoices and the corresponding m aster data.
Press :;9 to execute the program as a background job or :~s ot the execute button to run the program
1(not '
63
Appendix
To ~
64
Appendix
ICF Configuration
For SAP Gateway services, SAP UIS and ASAP Oocu you will need to activate special nodes
on the ABAP ICF Server.
Daacilptlon ScraenShot
-
-·
1. Run transaction ~;rce· f:: -NU;> ~.-....
(short cut i\ l L-+F U and 1.$foPPo~ ""11..001.~to ~WI, I.:t\11(10ta,l.t<j ·I, '
select ~ace')
, ,.,...,. -,.,,....w-tt-.MJP~tpn... lltjo<t· •
....
MnW")~
""''
Q ,._! HIM. M ll~llllt
, Wllft~ll
r 11C.ntc.~
~
0 9(flf(JHOW .
' ~,. .... U~(Oo'ltf\lotled,
"-""
~~;l
® I c...~
•
screen just press
execute I""'" ·I $ • « Q t~ C! e
N~lntaln Services
~ Ill
~(Hf~r,.,.
;J' ••mchy Q!J
!OUVIcl
,,._,.... u....
'
65
Appendix
&'! '':'"'-''"""-'1···"'''''" )~
)• S}ap
' «8 A_lle'N_ItiTAJ
"' ~ IK 11(1£ (IIASts IUfCTIOtiS)
• S:!J t:llt
"' ~ lfl'/fOI.rtlllil!iOn ASAP
~ SUb-Oeornent
Qeo!jy St:1'11Ct:
Odeto: So:IVC:o:
!en:~me St'M:II
!"' ""\..;;;;;.=:=.J
!est Lo;d i!<I~CJ'IIl
sererttM:es to Sef\'ICe
QbJ. llw«tocy £ntr(
tut
{00'1'
e~.
66
Appendix
-·- ....____ __
(short cut 1\ LL-+FU and
select :;t•Ro).
-.---....____
•':.
.
~
_
.
,
2. Click on the Button SAP ,
·lA<»~·...· - - - -
Reference IMG and open ." .......,_
. "'
the folders as shows on the .._
--,.
screen shot
" . . .__.........____.
·~- ,.........,......
~==~=
...
,.....,.........
--
..................
·lll9h-..----.. ......_,._,. _ _
... --- . -
~w-
·~~--·-(looot..........
·\11~--·
> - ......
. __ ->ff'H-.-... ...,.
__ ___
......... ,...._
. "--~
- ~~--r;:
.·~~---
"~·----.,.
.,.
.. ----
-- --~
...- -
,__ t:::
.·~-..-
67
Appendix
~-
-·····~
..._,_.,....._,.((ooo.- -
click the create icon [lJ]
and insert the values as
shown on the screen ~
-- ...-~r=:!!:t;
...................
!:::::: • "·~ , .._
..... q _
1111:
shot.
--
.,.., "'"
...... ·~ ·
--
•..
·---
..........
Oo ... ~ ......
,_.,_.
'
·-·('.0. . . .
--·-- ... --·- ~.
...................... ,......
~·-
·-- ·I
~··
Gateway Settings. Click M f teJGI11(Jl'"..$T •
•
New Entries and enler
the values.
68
Appendix
Help
F1 ASAP keyword documentation
F2 Show code element information
Ctrl+3 Search for commands & views
Clri+Shllt+L List all keyboard shortcuts
Navigate
F3 Open definition
Alt+Lelt Backward h lstOI)'
AJt+Right Forward h lstOI)'
Ctrl+T Quick hierarchy
F4 Open Type Hierarchy
Ctri+O Quick outline
Ctri+Shift+G Where-used list
Run, Debug
F8 Run current ABAP object
Alt+F8 Select & run ABAP application
ctri+Shilt+B Toggle breakpoint
F5, F6, F7, F8 Step into, ove~ , return, resume
69
Appendix
70
www.......com
01!1'1'1.-<110 ...,_,.._....
Soli'-
-----·----
- e -.... ··--·-··""!>" - -
--
s.-' .-:L 1"!~.....,__,-.,_...,.."""'
..,..__ _ __ _.._a.;:~~
_Gitdt_..."""-"'-. . . . . .--
---·-CIIIoo!ll-··----
..--.....- .....---
~1 - ~
-~---~
d-0.......-'" 11-nr.,...-... ~
............. -
~..... ~ ..... ~ ..... ~!0:!1..&
..
~"'"'"~to4!ot~'i,WWIO~t...u('""'~'"'""""'h,t\••
~~ ~- ............."'
.........t...,..,.,...,!l'·
_______
•-, .. .__.,~,.h\ ,,~w"
__
..... ,.....oil'
d-o ...~,.._...
,__ .. ____ ... __ #
,...,...,..,""',.
__
~ ...-
.-.,_,_ ,..,- .
__ ..._______ __
-~eo.-.--._
""~- --
....tl-4 ...
............
.. ____ ...-.--
.... ~-~-·-~
., -~d
~-...,..
-·-~-
_ _ ... _ _ _.,....,...,._
1""~..,..,.,
-~ .....·-----~
. _. -...-·-·-..,.-.rg......_.
··.....-v~-
·~
··""'----.·.,. . . --01