Documente Academic
Documente Profesional
Documente Cultură
PURPOSE: The goal of this e/ercise is to allow the *artici*ants to 0reate a $eb 1yn*ro com*onent for sim*le flight boo%ing with a single +iew. PREREQUISITES: Logon to the !" system and start !#!" $or%bench & E'(). Logon data is *ro+ided by your instructor. DEVELOPMENT OBJECTIVES: This e/ercise demonstrates the usage of #!"Is and how to im*lement a +iew with in*ut fields and a result table. PROCEDURE: 1. 0reate a $eb 1yn*ro 0om*onent and a 2iew. 3. 0reate a er+ice 0all for #!"I BAPI_FLIGHT_GETLIST. 4. 1efine the 0onte/t .a**ing 4. 1efine In*ut Fields and a #utton on the 2iew 5. 1efine an !ction and 0orres*onding !ction 5andler 6. 1efine the Table on the 2iew 7. Embedd the 2iew into the $indow '. !cti+ation, 0reation of a $eb 1yn*ro !**lication and E/ecution
Page 1
Page
"ress Continue. 3. 0hoice of 0ontroller =n the second dialog window of the wi<ard, you can choose whether the ser+ice call is to be embedded in an e/isting controller or whether a new controller is to be created for this *ur*ose. er+ice calls can only always be embedded in global controllers > that is, in the com*onent controller or in additionally created custom controllers. It is not *ossible, to embed ser+ice calls in +iew controllers. a) elect radio button U e E!i tent Controller
b) 1o not change the default entry for com*onent: 889((9#!"IFLI:5T c) Enter for controller 0=."=?E?T0=?T@=LLE@ d) "ress Continue. e) Aou now select, which ser+ice ty*e should be used for this ser+ice call. elect radio button Function "o#ule. Lea+e 1estination blan%. "ress Continue. 4. er+ice Ty*e and er+ice election a) Aou now select, which ser+ice ty*e should be used for this ser+ice call. elect radio button Function "o#ule. Lea+e 1estination blan%. "ress Continue. b) elect the ser+ice: for Function .odule enter BAPI_FLIGHT_GETLIST. "ress Continue.
Page +
Furthermore, in the method list there is a new method EXECUTE_BAPI_FLIGHT_GETLIST, which contains the coding to read the conte/t nodes 1E TI?!T=?9F@=. and 1E TI?!TI=?9T= and their underlying conte/t attributes, calls the #!"I and assigns the resulting table to conte/t node FLI:5T9LI T.
Page ,
0onfirm the dialoges whether you want to co*y or ma* the different conte/t nodes. The result should loo% li%e this:
Page /
3.
a+e your changes. Aou ha+e now ma**ed the com*onent controller conte/t elements to the +iew conte/t of FLI:5TLI T2IE$.
Page 1
4. 0lic% on the Conte!t button and create a binding with conte/t node $ESTI%ATI&%_F'&" by double; clic%ing it.
Page 2
5.
elect the attributes CIT/ and C&U%T' and lea+e the tandard 0ell Editor as I%PUTFIEL$.
@e*eat the same *rocedure &3;5) to create an DI element G'&UP_0, bind it with conte/t node $ESTI%ATI&%_T& and select again the attributes CIT/ and C&U%T'.
Page 3
6. !dditionally, create a button within G'&UP_0, by right clic%ing the G'&UP_0 element below the '&&TUIELE"E%TC&%TAI%E' and select In ert Ele.ent from conte/t menu. 0hoose ty*e #utton as DI element and name it BUTT&%_0. The button will be *laced in the grou* container. 7. et the *ro*erty Te!t of #DTT=?91 to +alue Searc1 Fli21t .
Page 4
The code editor will o*en automatically. 3. ?ow the e+ent handler for action :ET9FLI:5T , which is method =?!0TI=?:ET9FLI:5T , needs to be modified to ma%e a call to the controller method EEE0DTE9#!"I9FLI:5T9:ETLI T. In order to do this, in+o%e the $eb 1yn*ro 0ode $i<ard and choose o*tion "et1o# Call in U e# Controller.
Page 15
4.
elect Continue 3Enter4. The generated coding will loo% li%e this.
Page 11
3.
4. 0reate the data binding of DI element TABLE with conte/t node FLIGHT_LIST.
Page 1
tandard 0ell Editor should be of ty*e TE+TVIEW. !cti+ate binding for all conte/t attributes.
Page 1+
Page 1,
Page 1/
RESULT : Aou ha+e now created a sim*le $eb 1yn*ro com*onent which uses a #!"I call for data collection. Aou ha+e seen how to use the ser+ice call wi<ard to easily create a ser+ice call from a function module.
Page 11