Send some values from the data (buffered in the

Page 1

3-3

Send some values from the data (buffered in the internal tables it_scarr, it_spfli and it_sflight) to your tree model instance as column entries. To do this, extend the existing subroutine add_nodes that you call from the init_tree_processing_0100 module as follows: 3-3-1 Change the type of the work area for the node entry l_wa_node to treemcnodt. Define a local internal table for the column entries (suggested name: l_it_items). 3-3-2 Adapt the interface of the add_node method. Instead of the node texts pass the internal table l_it_items with the column entries. If errors occur, terminate processing and display the message 012. 3-3-3 The internal table must be filled with the column entries for the current node to be added. To do this, define a subroutine (suggested name fill_itemtab), that fills the internal table with passed texts. In this subroutine, define a local work area for a column entry (suggested name: l_wa_item) with the line type of the table you want to change. First initialize the entry table. For each column entry fill the field for the technical column name, for the entry type, and for the entry text, in the work area. Then insert the filled work area in the entry table. 3-3-4 Call your subroutine fill_itemtab now before calling the add_node method for the first time. Fill only the first column with meaningful texts, up to the penultimate hierarchy level. (Base your texts on those entered until now.) For the flight connection nodes add the flight date, price, currency code, airplane type, and number of free seats. You must first calculate the last of these. If an error occurs, end processing with the termination message 075. Make sure you format the price as you did with the date.

Š SAP AG

BC412

8-60


([HUFLVH 2SWLRQDO

8QLW 7UHH &RQWURO

7RSLF

,FRQV DV FROXPQ HQWULHV

At the conclusion of this unit, you will be able to: • Display icons in a column tree model instance.

Extend the column tree control to include an icon column. Make the program display a “red light” if a flight is full, and a green light if there are stills seats available on the flight.

3URJUDP

&RS\ WHPSODWH

0RGHO VROXWLRQ

ZBC412_##_TRM_EX3_OPT SAPBC412_TRMS_EXERCISE_ SAPBC412_TRMS_EXERCISE_ B237

where ## is the JURXS QXPEHU 3-4

Copy your solution from the previous exercise (ZBC412_##_TRM_EX3) or the appropriate model solution (SAPBC412_TRMS_EXERCISE_1) to the name =%& B B750B(; B237. Get to know how your copy of the program works.

3-5

Extend the add_columns subroutine: Add an ’ICON’ column with a width of 6 between the ’PLANETYPE’ and ’SEATSFREE’ columns. Do not give it a header.

3-6

Extend the fill_itemtab subroutine: If your parameter for free seats is not initial, you can assume that the entries for a flight connection must be set. If you typed this parameter as a string, the ’0’ value is QRW initial. In this case, check whether or not the flight is fully booked: Using the comparison operator CO, query whether the parameter contains only the ’ ’ and ’0’ characters. Then set the icon value to icon_red_light or icon_green_light. (To use the icon names, you also need to load the type group icon).

© SAP AG

BC412

8-61


7UHH &RQWURO 6ROXWLRQ 8QLW 7UHH &RQWURO

7RSLF 'LVSOD\LQJ 'DWD LQ D 6LPSOH 7UHH 0RGHO

0RGHO VROXWLRQ 6$3%& B7506B(;(5&,6(B

6FUHHQ IORZ ORJLF

6&5((1 PROCESS BEFORE OUTPUT. MODULE status_0100. MODULE init_container_processing_0100. MODULE init_tree_processing_0100.

PROCESS AFTER INPUT. MODULE exit_command_0100 AT EXIT-COMMAND. MODULE copy_ok_code. MODULE user_command_0100.

$%$3 SURJUDP REPORT

'DWD 'HFODUDWLRQV

sapbc412_trms_exercise_1 MESSAGE-ID bc412.

DATA: * screen-specific: ok_code TYPE sy-ucomm, copy_ok LIKE ok_code, * application data: it_scarr TYPE SORTED TABLE OF scarr WITH UNIQUE KEY carrid, it_spfli TYPE SORTED TABLE OF spfli WITH UNIQUE KEY carrid connid, it_sflight TYPE SORTED TABLE OF sflight

© SAP AG

BC412

8-62


WITH UNIQUE KEY carrid connid fldate, wa_scarr LIKE LINE OF it_scarr, wa_spfli LIKE LINE OF it_spfli, wa_sflight LIKE LINE OF it_sflight, * container: ref_cont_left

TYPE REF TO cl_gui_docking_container,

* content: UHIBWUHHBPRGHO 7<3( 5() 72 FOBVLPSOHBWUHHBPRGHO

$%$3 3URJUDP (YHQW %ORFNV

* get application data: SELECT * FROM scarr

INTO TABLE it_scarr. IF sy-subrc <> 0. MESSAGE a060. ENDIF. SELECT * FROM spfli INTO TABLE it_spfli. IF sy-subrc <> 0. MESSAGE a060. ENDIF. SELECT * FROM sflight INTO TABLE it_sflight. IF sy-subrc <> 0. MESSAGE a060. ENDIF. CALL SCREEN 100.

© SAP AG

BC412

8-63


0RGXOHV

*&--------------------------------------------------------------------* *&

Module

STATUS_0100

OUTPUT

*&--------------------------------------------------------------------* *

Set GUI title and GUI status for screen 100.

*---------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS ’NORM_0100’. SET TITLEBAR ’TITLE_1’. ENDMODULE.

" STATUS_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

INIT_CONTROL_PROCESSING

OUTPUT

*&--------------------------------------------------------------------* *

Start control handling.

*

create container object

*---------------------------------------------------------------------* MODULE init_container_processing_0100 OUTPUT. IF ref_cont_left IS INITIAL. CREATE OBJECT ref_cont_left EXPORTING ratio

= 35

EXCEPTIONS others

= 1.

IF sy-subrc NE 0. MESSAGE a010. ENDIF. ENDIF. ENDMODULE.

© SAP AG

" INIT_CONTROL_PROCESSING

BC412

OUTPUT

8-64


*&--------------------------------------------------------------------* *&

Module

init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create tree object, link to container and fill with data

*---------------------------------------------------------------------* MODULE init_tree_processing_0100 OUTPUT. ,) UHIBWUHHBPRGHO ,6 ,1,7,$/ &5($7( 2%-(&7 UHIBWUHHBPRGHO (;3257,1*

QRGHBVHOHFWLRQBPRGH FOBVLPSOHBWUHHBPRGHO !QRGHBVHOBPRGHBVLQJOH (;&(37,216

RWKHUV ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBWUHHBPRGHO !FUHDWHBWUHHBFRQWURO (;3257,1*

SDUHQW UHIBFRQWBOHIW (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

3(5)250 DGGBQRGHV 86,1* UHIBWUHHBPRGHO (1',) ENDMODULE.

" init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

EXIT_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’E’ for screen 100.

*---------------------------------------------------------------------* MODULE exit_command_0100 INPUT. CASE ok_code. WHEN ’CANCEL’.

" Cancel screen processing

PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN ’EXIT’.

© SAP AG

" Exit program

BC412

8-65


PERFORM free_control_ressources. LEAVE PROGRAM. WHEN OTHERS. ENDCASE. ENDMODULE.

" EXIT_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *&

Module

COPY_OK_CODE

INPUT

*&--------------------------------------------------------------------* *

Save the current user command in order to

*

prevent unintended field transport for the screen field ok_code

*

for next screen processing (ENTER)

*---------------------------------------------------------------------* MODULE copy_ok_code INPUT. copy_ok = ok_code. CLEAR ok_code. ENDMODULE.

" COPY_FCODE

INPUT

*&--------------------------------------------------------------------* *&

Module

USER_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’ ’ for screen 100.

*---------------------------------------------------------------------* MODULE user_command_0100 INPUT. CASE copy_ok. WHEN ’BACK’.

" Go back to program

PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN OTHERS. ENDCASE. ENDMODULE.

© SAP AG

" USER_COMMAND_0100

BC412

INPUT

8-66


6XEURXWLQHV

*&--------------------------------------------------------------------* *&

Form

FREE_CONTROL_RESSOURCES

*&--------------------------------------------------------------------* *

free control ressources on the presentation server

*

free all reference variables (ABAP object) -> garbage collector

*---------------------------------------------------------------------* *

no interface

*---------------------------------------------------------------------* FORM free_control_ressources. CALL METHOD: ref_cont_left->free. FREE: ref_tree_model, ref_cont_left. ENDFORM.

" FREE_CONTROL_RESSOURCES

*---------------------------------------------------------------------* *

FORM ADD_NODES

*

*---------------------------------------------------------------------* *

build up a hierarchy consisting of

*

*

carriers, connections and flight dates

*

*---------------------------------------------------------------------* *

-->

L_REF_TREE_MODEL

*

*---------------------------------------------------------------------* FORM add_nodes USING l_ref_tree_model TYPE REF TO cl_simple_tree_model. '$7$

OBZDBQRGH 7<3( WUHHPVQRGW GDWHBWH[W 7<3( F

OBZDBQRGH WH[W WH[W FDU

Š SAP AG

BC412

8-67


&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ 5227

*

RELATIVE_NODE_KEY

=

*

RELATIONSHIP

=

LVIROGHU ;

WH[W OBZDBQRGH WH[W H[SDQGHU ;

(;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',)

* scarr-nodes: /223 $7 LWBVFDUU ,172 ZDBVFDUU

&/($5 OBZDBQRGH

OBZDBQRGH QRGHBNH\ ZDBVFDUU FDUULG OBZDBQRGH WH[W ZDBVFDUU FDUUQDPH

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ OBZDBQRGH QRGHBNH\ UHODWLYHBQRGHBNH\ 5227

UHODWLRQVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG LVIROGHU ;

WH[W OBZDBQRGH WH[W H[SDQGHU ;

(;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',) (1'/223

© SAP AG

BC412

8-68


* spfli-nodes: /223 $7 LWBVSIOL ,172 ZDBVSIOL

&/($5 OBZDBQRGH

&21&$7(1$7( ZDBVSIOL FDUULG ZDBVSIOL FRQQLG

,172 OBZDBQRGH QRGHBNH\ 6(3$5$7(' %< VSDFH &21&$7(1$7( ZDBVSIOL FDUULG ZDBVSIOL FRQQLG

ZDBVSIOL FLW\IURP !

ZDBVSIOL FLW\WR

,172 OBZDBQRGH WH[W 6(3$5$7(' %< VSDFH

OBZDBQRGH UHODWNH\ ZDBVSIOL FDUULG

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ OBZDBQRGH QRGHBNH\ UHODWLYHBQRGHBNH\ OBZDBQRGH UHODWNH\

UHODWLRQVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG LVIROGHU ;

WH[W OBZDBQRGH WH[W H[SDQGHU ;

(;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',) (1'/223

© SAP AG

BC412

8-69


* sflight-nodes: /223 $7 LWBVIOLJKW ,172 ZDBVIOLJKW &/($5 OBZDBQRGH

&21&$7(1$7( ZDBVIOLJKW FDUULG ZDBVIOLJKW FRQQLG

ZDBVIOLJKW IOGDWH

,172 OBZDBQRGH QRGHBNH\ 6(3$5$7(' %< VSDFH &21&$7(1$7( ZDBVIOLJKW FDUULG ZDBVIOLJKW FRQQLG

,172 OBZDBQRGH UHODWNH\ 6(3$5$7(' %< VSDFH

:5,7( ZDBVIOLJKW IOGDWH 72 GDWHBWH[W OBZDBQRGH WH[W GDWHBWH[W

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ OBZDBQRGH QRGHBNH\ UHODWLYHBQRGHBNH\ OBZDBQRGH UHODWNH\

UHODWLRQVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG LVIROGHU VSDFH

WH[W OBZDBQRGH WH[W H[SDQGHU VSDFH (;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',) (1'/223 ENDFORM.

© SAP AG

" ADD_NODES

BC412

8-70


6ROXWLRQ 8QLW 7UHH &RQWURO

7RSLFV $SSOLFDWLRQ WRROEDU 3ULQWLQJ DQG )LQGLQJ ,WHPV LQ WKH 7UHH 0RGHO 0RGHO VROXWLRQ ([WUDFWV IURP 6$3%& B7506B(;(5&,6(B

$%$3 SURJUDP REPORT

'DWD 'HFODUDWLRQV

sapbc412_trms_exercise_2 MESSAGE-ID bc412.

7<3( 322/6 LFRQ DATA: * screen-specific: ... * container: ref_cont_left

TYPE REF TO cl_gui_docking_container,

ref_cont_split

TYPE REF TO cl_gui_splitter_container,

ref_cell_top

TYPE REF TO cl_gui_container,

ref_cell_bott

LIKE ref_cell_top,

* content: ref_tree_model TYPE REF TO cl_simple_tree_model, UHIBWRROEDU 7<3( 5() 72 FOBJXLBWRROEDU, * auxiliary: LWBKLWBQRGHV 7<3( WUHHPQRWDE * event registration: LWBHYHQWV 7<3( FQWOBVLPSOHBHYHQWV ZDBHYHQW /,.( /,1( 2) LWBHYHQWV

© SAP AG

BC412

8-71


/RFDO &ODVVHV

*---------------------------------------------------------------------* *

CLASS lcl_event_handler DEFINITION

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21

&/$66 0(7+2'6 RQBIXQFWLRQBVHOHFWHG )25 (9(17 IXQFWLRQBVHOHFWHG 2) FOBJXLBWRROEDU ,03257,1* IFRGH (1'&/$66

*---------------------------------------------------------------------* *

CLASS lcl_event_handler IMPLEMENTATION

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' RQBIXQFWLRQBVHOHFWHG '$7$

OBWLWOHWH[W 7<3( VWULQJ

OBVHDUFKBUHVXOWBW\SH 7<3( L

OBVHDUFKBUHVXOWBQRGHBNH\ 7<3( VWULQJ

&$6( IFRGH

:+(1 35,17 OBWLWOHWH[W WH[W WLW

&$// 0(7+2' UHIBWUHHBPRGHO !SULQWBWUHH (;3257,1*

DOOBQRGHV VSDFH "displayed nodes only WLWOH OBWLWOHWH[W

SUHYLHZ ; "preview mode (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

:+(1 6($5&+ 25 6($5&+1(;7 ,) IFRGH 6($5&+

© SAP AG

BC412

8-72


&$// 0(7+2' UHIBWUHHBPRGHO !XQVHOHFWBDOO *

user dialog for search pattern, then find first occurence: &$// 0(7+2' UHIBWUHHBPRGHO !ILQG

,03257,1*

UHVXOWBW\SH OBVHDUFKBUHVXOWBW\SH

UHVXOWBQRGHBNH\ OBVHDUFKBUHVXOWBQRGHBNH\ &$6( OBVHDUFKBUHVXOWBW\SH

:+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBPDWFK *

store hit in order to be able to continue later ... &/($5 LWBKLWBQRGHV

,16(57 OBVHDUFKBUHVXOWBQRGHBNH\ ,172 7$%/( LWBKLWBQRGHV *

... and select it (coding downwards!)

:+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBQRBPDWFK 0(66$*( V (;,7

:+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBFDQFHOHG *

search dialog canceled: do nothing

(;,7 (1'&$6( (/6(

" fcode = ’SEARCHNEXT’:

*

find next occurence,

*

doesn’t matter which node has been selected: &$// 0(7+2' UHIBWUHHBPRGHO !ILQGBQH[W

,03257,1*

UHVXOWBW\SH OBVHDUFKBUHVXOWBW\SH

UHVXOWBQRGHBNH\ OBVHDUFKBUHVXOWBQRGHBNH\ &$6( OBVHDUFKBUHVXOWBW\SH

:+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBPDWFK *

store hit in order to select it with the others:

,16(57 OBVHDUFKBUHVXOWBQRGHBNH\ ,172 7$%/( LWBKLWBQRGHV :+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBQRBPDWFK 0(66$*( V EF (;,7

:+(1 FOBVLPSOHBWUHHBPRGHO !ILQGBFDQFHOHG *

search dialog canceled: do nothing

(;,7

© SAP AG

BC412

8-73


(1'&$6( (1',) *

select all hits now: &$// 0(7+2' UHIBWUHHBPRGHO !VHOHFWBQRGHV

(;3257,1*

QRGHBNH\BWDEOH LWBKLWBQRGHV (;&(37,216

27+(56 ,) V\ VXEUF !

0(66$*( D EF (1',) (1'&$6( (1'0(7+2' (1'&/$66

0RGXOHV

*&--------------------------------------------------------------------* *&

Module

INIT_CONTAINER_PROCESSING_0100

OUTPUT

*&--------------------------------------------------------------------* *

Start control handling.

*

create container objects

*---------------------------------------------------------------------* MODULE init_container_processing_0100 OUTPUT. IF ref_cont_left IS INITIAL. CREATE OBJECT ref_cont_left EXPORTING ... CREATE OBJECT ref_cont_split EXPORTING parent

= ref_cont_left

rows

= 2

columns

= 1

EXCEPTIONS others

= 1.

IF sy-subrc <> 0. MESSAGE a010.

© SAP AG

BC412

8-74


ENDIF. * configure splitter container ... * Easy Splitter Container unfortunately * not able to be configurable enough: * user should not be able to move border bar! CALL METHOD ref_cont_split->set_border EXPORTING border

= cl_gui_cfw=>false

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. CALL METHOD ref_cont_split->set_row_mode EXPORTING mode *

= cl_gui_splitter_container=>mode_absolute

IMPORTING

*

RESULT

=

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. CALL METHOD ref_cont_split->set_row_height EXPORTING

*

id

=

1

height

= 20

IMPORTING

*

RESULT

=

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. CALL METHOD ref_cont_split->set_row_sash EXPORTING

*

id

=

1

type

= cl_gui_splitter_container=>type_movable

value

= cl_gui_splitter_container=>false

IMPORTING

Š SAP AG

BC412

8-75


*

RESULT

=

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. ************** ref_cell_top = ref_cont_split->get_container( row = 1 column = 1 ). ref_cell_bott = ref_cont_split->get_container( row = 2 column = 1 ). ENDIF. ENDMODULE.

" init_container_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create tree object, link to container and fill with data

*---------------------------------------------------------------------* MODULE init_tree_processing_0100 OUTPUT. IF ref_tree_model IS INITIAL. &5($7( 2%-(&7 UHIBWRROEDU (;3257,1*

SDUHQW UHIBFHOOBWRS (;&(37,216

RWKHUV ,) V\ VXEUF ! 0(66$*( D (1',)

3(5)250 FRQILJXUHBWRROEDU &+$1*,1* UHIBWRROEDU ZDBHYHQW HYHQWLG FOBJXLBWRROEDU !PBLGBIXQFWLRQBVHOHFWHG ,16(57 ZDBHYHQW ,172 7$%/( LWBHYHQWV

&$// 0(7+2' UHIBWRROEDU !VHWBUHJLVWHUHGBHYHQWV (;3257,1*

HYHQWV LWBHYHQWV (;&(37,216

27+(56

© SAP AG

BC412

8-76


,) V\ VXEUF ! 0(66$*( D (1',)

6(7 +$1'/(5 OFOBHYHQWBKDQGOHU !RQBIXQFWLRQBVHOHFWHG )25 UHIBWRROEDU *

more than one node must be selectable in order to enable

*

search functionalities: CREATE OBJECT ref_tree_model EXPORTING

QRGHBVHOHFWLRQBPRGH FOBVLPSOHBWUHHBPRGHO !QRGHBVHOBPRGHBPXOWLSOH EXCEPTIONS others

= 1.

IF sy-subrc <> 0. MESSAGE a043. ENDIF. CALL METHOD ref_tree_model->create_tree_control EXPORTING SDUHQW UHIBFHOOBERWW EXCEPTIONS OTHERS = 1. IF sy-subrc <> 0. MESSAGE a012. ENDIF. PERFORM add_nodes USING ref_tree_model. ENDIF. ENDMODULE.

" init_tree_processing_0100

OUTPUT

6XEURXWLQHV

*&--------------------------------------------------------------------* *&

Form

FREE_CONTROL_RESSOURCES

*&--------------------------------------------------------------------* *

free control ressources on the presentation server

*

free all reference variables (ABAP object) -> garbage collector

*---------------------------------------------------------------------* *

no interface

*---------------------------------------------------------------------* FORM free_control_ressources.

© SAP AG

BC412

8-77


CALL METHOD ref_cont_left->free. FREE: ref_toolbar, ref_tree_model, ref_cont_split, ref_cont_left. ENDFORM.

" FREE_CONTROL_RESSOURCES

*---------------------------------------------------------------------* *

FORM configure_toolbar

*

*---------------------------------------------------------------------* *

-->

P_REF_TOOLBAR

*

*---------------------------------------------------------------------* )250 FRQILJXUHBWRROEDU

&+$1*,1* SBUHIBWRROEDU 7<3( 5() 72 FOBJXLBWRROEDU * print: &$// 0(7+2' SBUHIBWRROEDU !DGGBEXWWRQ (;3257,1*

IFRGH 35,17

LFRQ LFRQBSULQW

EXWQBW\SH FQWEBEW\SHBEXWWRQ TXLFNLQIR WH[W SUL (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

* search: &$// 0(7+2' SBUHIBWRROEDU !DGGBEXWWRQ (;3257,1*

IFRGH 6($5&+

LFRQ LFRQBVHDUFK

EXWQBW\SH FQWEBEW\SHBEXWWRQ TXLFNLQIR WH[W VUF (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D

© SAP AG

BC412

8-78


(1',) * search next: &$// 0(7+2' SBUHIBWRROEDU !DGGBEXWWRQ (;3257,1*

IFRGH 6($5&+1(;7

LFRQ LFRQBVHDUFKBQH[W

EXWQBW\SH FQWEBEW\SHBEXWWRQ TXLFNLQIR WH[W VUQ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) (1')250

© SAP AG

BC412

8-79


6ROXWLRQ 8QLW 7UHH &RQWURO

7RSLF 'LVSOD\LQJ 'DWD LQ D &ROXPQ 7UHH 0RGHO

0RGHO VROXWLRQ ([WUDFWV IURP 6$3%& B7506B(;(5&,6(B

$%$3 SURJUDP REPORT

'DWD 'HFODUDWLRQV

sapbc412_trms_exercise_3 MESSAGE-ID bc412.

... * content: ref_tree_model 7<3( 5() 72 FOBFROXPQBWUHHBPRGHO * auxiliary: ZDBKLHUBKHDGHU 7<3( WUHHPKKGU

0RGXOHV

*&--------------------------------------------------------------------* *&

Module

init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create tree object, link to container and fill with data

*---------------------------------------------------------------------* MODULE init_tree_processing_0100 OUTPUT. IF ref_tree_model IS INITIAL. ZDBKLHUBKHDGHU WBLPDJH LFRQBZVBSODQH ZDBKLHUBKHDGHU KHDGLQJ WH[W KLU ZDBKLHUBKHDGHU ZLGWK

© SAP AG

BC412

8-80


&5($7( 2%-(&7 UHIBWUHHBPRGHO (;3257,1*

QRGHBVHOHFWLRQBPRGH FOBFROXPQBWUHHBPRGHO !QRGHBVHOBPRGHBVLQJOH KLHUDUFK\BFROXPQBQDPH +,(5

KLHUDUFK\BKHDGHU ZDBKLHUBKHDGHU (;&(37,216

RWKHUV ,) V\ VXEUF ! 0(66$*( D (1',)

CALL METHOD ref_tree_model->create_tree_control EXPORTING parent

= ref_cont_left

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a042. ENDIF. 3(5)250 DGGBFROXPQV 86,1* UHIBWUHHBPRGHO 3(5)250 DGGBQRGHV 86,1* UHIBWUHHBPRGHO ENDIF. ENDMODULE.

" init_tree_processing_0100

OUTPUT

6XEURXWLQHV

*&--------------------------------------------------------------------* *&

Form

FREE_CONTROL_RESSOURCES

*&--------------------------------------------------------------------* *

free control ressources on the presentation server

*

free all reference variables (ABAP object) -> garbage collector

*---------------------------------------------------------------------* *

no interface

*---------------------------------------------------------------------* FORM free_control_ressources. CALL METHOD ref_cont_left->free. FREE: ref_tree_model, ref_cont_left.

© SAP AG

BC412

8-81


ENDFORM.

" FREE_CONTROL_RESSOURCES

*---------------------------------------------------------------------* *

FORM add_columns

*

*---------------------------------------------------------------------* *

-->

L_REF_TREE_MODEL

*

*---------------------------------------------------------------------* )250 DGGBFROXPQV 86,1* OBUHIBWUHHBPRGHO

7<3( 5() 72 FOBFROXPQBWUHHBPRGHO &$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBFROXPQ (;3257,1*

QDPH 35,&(

ZLGWK

KHDGHUBWH[W WH[W SUL (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBFROXPQ (;3257,1*

QDPH &855(1&<

ZLGWK

KHDGHUBWH[W WH[W FXU (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

© SAP AG

BC412

8-82


&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBFROXPQ (;3257,1*

QDPH 3/$1(7<3(

ZLGWK

KHDGHUBWH[W WH[W SW\ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBFROXPQ (;3257,1*

QDPH 6($76)5((

ZLGWK

KHDGHUBWH[W WH[W IUH (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) (1')250

© SAP AG

BC412

8-83


*---------------------------------------------------------------------* *

FORM ADD_NODES

*

*---------------------------------------------------------------------* *

build up a hierarchy consisting of

*

*

carriers, connections and

*

*

flight dates with additional data

*

*

*

*---------------------------------------------------------------------* *

-->

L_REF_TREE_MODEL

*

*---------------------------------------------------------------------* FORM add_nodes USING l_ref_tree_model TYPE REF TO cl_column_tree_model. DATA: l_wa_node

7<3( WUHHPFQRGW,

OBLWBLWHPV 7<3( WUHHPFLWDE OBFRQQBWH[W 7<3( F OBGDWHBWH[W 7<3( F OBSULFHBWH[W 7<3( F OBVHDWVBWH[W 7<3( F 3(5)250 ILOOBLWHPWDE 86,1*

WH[W FDU VSDFH VSDFH VSDFH VSDFH &+$1*,1*

OBLWBLWHPV

© SAP AG

BC412

8-84


CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= ’ROOT’

*

RELATIVE_NODE_KEY

=

*

RELATIONSHIP

=

isfolder

= ’X’

expander

= ’X’

LWHPBWDEOH OBLWBLWHPV EXCEPTIONS OTHERS

= 5.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. * scarr-nodes: LOOP AT it_scarr INTO wa_scarr. CLEAR l_wa_node. l_wa_node-node_key = wa_scarr-carrid. 3(5)250 ILOOBLWHPWDE 86,1*

ZDBVFDUU FDUUQDPH VSDFH VSDFH VSDFH VSDFH &+$1*,1*

OBLWBLWHPV CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= l_wa_node-node_key

relative_node_key = ’ROOT’ relationship

= cl_column_tree_model=>relat_last_child

isfolder

= ’X’

expander

= ’X’

LWHPBWDEOH OBLWBLWHPV EXCEPTIONS OTHERS

= 5.

IF sy-subrc <> 0. MESSAGE a012. ENDIF.

© SAP AG

BC412

8-85


ENDLOOP. * spfli-nodes: LOOP AT it_spfli INTO wa_spfli. CLEAR l_wa_node. CONCATENATE wa_spfli-carrid wa_spfli-connid INTO l_wa_node-node_key SEPARATED BY space. l_wa_node-relatkey = wa_spfli-carrid. CONCATENATE wa_spfli-carrid wa_spfli-connid ’:’ wa_spfli-cityfrom ’->’ wa_spfli-cityto INTO l_conn_text SEPARATED BY space. 3(5)250 ILOOBLWHPWDE 86,1*

OBFRQQBWH[W VSDFH VSDFH VSDFH VSDFH &+$1*,1*

OBLWBLWHPV

© SAP AG

BC412

8-86


CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= l_wa_node-node_key

relative_node_key = l_wa_node-relatkey relationship

= cl_column_tree_model=>relat_last_child

isfolder

= ’X’

expander

= ’X’

LWHPBWDEOH OBLWBLWHPV EXCEPTIONS OTHERS

= 5.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. ENDLOOP. * sflight-nodes: LOOP AT it_sflight INTO wa_sflight. CLEAR l_wa_node. CONCATENATE wa_sflight-carrid wa_sflight-connid wa_sflight-fldate INTO l_wa_node-node_key SEPARATED BY space. CONCATENATE wa_sflight-carrid wa_sflight-connid INTO l_wa_node-relatkey SEPARATED BY space. :5,7( ZDBVIOLJKW IOGDWH 72 OBGDWHBWH[W :5,7( ZDBVIOLJKW SULFH 72 OBSULFHBWH[W

&855(1&< ZDBVIOLJKW FXUUHQF\ ,) ZDBVIOLJKW VHDWVPD[ ! ZDBVIOLJKW VHDWVRFF

OBVHDWVBWH[W ZDBVIOLJKW VHDWVPD[ ZDBVIOLJKW VHDWVRFF (/6(

0(66$*( D (1',)

© SAP AG

BC412

8-87


3(5)250 ILOOBLWHPWDE 86,1*

OBGDWHBWH[W

OBSULFHBWH[W

ZDBVIOLJKW FXUUHQF\

ZDBVIOLJKW SODQHW\SH OBVHDWVBWH[W &+$1*,1*

OBLWBLWHPV CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= l_wa_node-node_key

relative_node_key = l_wa_node-relatkey relationship

= cl_column_tree_model=>relat_last_child

isfolder

= space

expander

= space

LWHPBWDEOH OBLWBLWHPV EXCEPTIONS OTHERS

= 5

. IF sy-subrc <> 0. MESSAGE a012. ENDIF. ENDLOOP. ENDFORM.

© SAP AG

" ADD_NODES

BC412

8-88


*---------------------------------------------------------------------* *

FORM fill_itemtab

*

*---------------------------------------------------------------------* *

adds one line into the item table for each column of the tree *

*---------------------------------------------------------------------* *

-->

P_IT_ITEMS

*

*---------------------------------------------------------------------* )250 ILOOBLWHPWDE 86,1* SBKLHUBWH[W 7<3( F SBSULFHBWH[W 7<3( F SBFXUUBWH[W 7<3( F SBSODQHBWH[W 7<3( F SBIUHHBWH[W 7<3( F

&+$1*,1* SBLWBLWHPV 7<3( WUHHPFLWDE '$7$ OBZDBLWHP /,.( /,1( 2) SBLWBLWHPV &/($5 SBLWBLWHPV

OBZDBLWHP FODVV FOBFROXPQBWUHHBPRGHO !LWHPBFODVVBWH[W OBZDBLWHP LWHPBQDPH +,(5

OBZDBLWHP WH[W SBKLHUBWH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV OBZDBLWHP LWHPBQDPH 35,&(

OBZDBLWHP WH[W SBSULFHBWH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV OBZDBLWHP LWHPBQDPH &855(1&<

OBZDBLWHP WH[W SBFXUUBWH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV OBZDBLWHP LWHPBQDPH 3/$1(7<3(

OBZDBLWHP WH[W SBSODQHBWH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV OBZDBLWHP LWHPBQDPH 6($76)5(( OBZDBLWHP WH[W SBIUHHBWH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV (1')250

© SAP AG

BC412

8-89


6ROXWLRQ 2SWLRQDO

8QLW 7UHH &RQWURO

7RSLF

'LVSOD\LQJ ,FRQV LQ D &ROXPQ 7UHH 0RGHO

0RGHO VROXWLRQ ([WUDFWV IURP 6$3%& B7506B(;(5&,6(B B237

$%$3 SURJUDP REPORT

sapbc412_trms_exercise_3_opt MESSAGE-ID bc412.

7<3( 322/6 LFRQ DATA ...

6XEURXWLQHV

*---------------------------------------------------------------------* *

FORM add_columns

*

*---------------------------------------------------------------------* *

-->

L_REF_TREE_MODEL

*

*---------------------------------------------------------------------* FORM add_columns USING l_ref_tree_model TYPE REF TO cl_column_tree_model. ... CALL METHOD l_ref_tree_model->add_column EXPORTING name

= ’PLANETYPE’

width

= 20

header_text

= text-pty

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. &$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBFROXPQ (;3257,1*

QDPH ,&21

ZLGWK

© SAP AG

BC412

8-90


KHDGHUBWH[W VSDFH (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

CALL METHOD l_ref_tree_model->add_column EXPORTING name

= ’SEATSFREE’

width

= 20

header_text

= text-fre

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. ENDFORM.

© SAP AG

BC412

8-91


*---------------------------------------------------------------------* *

FORM fill_itemtab

*

*---------------------------------------------------------------------* *

adds one line into the item table for each column of the tree *

*---------------------------------------------------------------------* *

-->

P_IT_ITEMS

*

*---------------------------------------------------------------------* FORM fill_itemtab USING

p_hier_text

TYPE c

p_price_text TYPE c p_curr_text

TYPE c

p_plane_text TYPE c p_free_text

TYPE c

CHANGING p_it_items TYPE treemcitab. DATA l_wa_item LIKE LINE OF p_it_items. CLEAR p_it_items. l_wa_item-class

= cl_column_tree_model=>item_class_text.

... OBZDBLWHP LWHPBQDPH ,&21 * figure out, which icon is appropriate: ,) 127 SBIUHHBWH[W ,6 ,1,7,$/ ,) SBIUHHBWH[W &2

OBZDBLWHP WBLPDJH LFRQBUHGBOLJKW (/6(

OBZDBLWHP WBLPDJH LFRQBJUHHQBOLJKW (1',) (1',)

&/($5 OBZDBLWHP WH[W

,16(57 OBZDBLWHP ,172 7$%/( SBLWBLWHPV ... ENDFORM.

© SAP AG

BC412

8-92


'UDJ 'URS )XQFWLRQV &RQWHQWV l %HKDYLRU W\SHV l 'DWD WUDQVSRUW

l (YHQW KDQGOHU PHWKRGV l 5XQWLPH RSWLPL]DWLRQ

 SAP AG 2002

© SAP AG

BC412

9-1


'UDJ 'URS )XQFWLRQV 8QLW 2EMHFWLYHV

$W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR l 1DPH WKH XVHV RI 'UDJ 'URS IXQFWLRQV

l 'HVFULEH URXJKO\ WKH WHFKQLFDO VHTXHQFH RI D 'UDJ 'URS SURFHGXUH

l ,PSOHPHQW FRS\LQJ SURFHGXUHV EHWZHHQ GLIIHUHQW FRQWURO REMHFWV RU VXEREMHFWV l ,PSOHPHQW PRYH SURFHGXUHV EHWZHHQ GLIIHUHQW FRQWURO REMHFWV RU VXEREMHFWV

 SAP AG 2002

© SAP AG

BC412

9-2


7KH &RQFHSW RI WKH 'UDJ 'URS 5HODWLRQVKLS 'DWD

ĂŹ

! " # $ % &' ( $ )+* ,-* * .0/ 1 * 2-1 3 * * . * * * * , 4 . .0* * .03 5 * * * * 6 7 . 5 3 3 4 7 2

€ Ü ó

$W OHDVW IRXU LPSOHPHQWDWLRQ VWHSV € &RQWURO W\SHV ó $VVLJQ VXE REMHFWV Ï 'DWD WUDQVSRUW Ü +DQGOHU PHWKRGV

€ Ü

 SAP AG 2002

n

n

To realize a Drag&Drop procedure you need to implement at least the following four steps. These steps also describe how Drag&Drop procedures are put into action by the system: •

When the user carries out a Drag&Drop operation with the mouse, the system checks whether or not this operation can be performed on the control (sub-)objects involved. This means that you must define valid behavior types. You can bundle behavior types together.

•

In the second step, you must have assigned the control (sub-)object to one these EHKDYLRU W\SH JURXSV In this way, these (sub-)objects belong to a specific FRQWURO W\SH that represents the sum of its possible behavior types.

•

Data objects need to be generated for the data that will be transported as part of the Drag&Drop procedure. To this end, you must have defined (local) classes.

•

Finally, you must define at least two handler methods - one for the drag event and one for the drop event of the relevant control. In these handler methods you deal with transporting the data, adapting the relevant control, and any follow-up activities.

In this chapter, we will implement a solution to the following two requirements as an example: The user should be able to drag a customer data record from a SAP Grid Control to a flight connection node in a simple tree control, in order to book this customer on this flight. Secondly the user should be able to drag a booking node from the flight bookings tree to a picture (trash can) to cancel the booking. We will QRW be changing the database to reflect the operations we have performed. Instead, we will limit our example to the control-based aspects of implementation in the context of this course.

Š SAP AG

BC412

9-3


'HILQLQJ &RQWURO 7\SHV 6RXUFH FRQWURO W\SH %HKDYLRU W\SH 'UDJ 'URS (IIHFW VRXUFH WDUJHW %RRN &DQFHO

&RS\ 0RYH

(IIHFW LQWHUQDOO\ 1RQH 1RQH

%RRNLQJ %RRNLQJ SURFHGXUH

7DUJHW FRQWURO W\SH %HKDYLRU W\SH 'UDJ 'URS (IIHFW VRXUFH WDUJHW %RRN &DQFHO

&RS\ 0RYH

(IIHFW LQWHUQDOO\ 1RQH 1RQH

! " # $ % &' ( $ )+* ,-* * .0/ 1 * 2-1 3 * * . * * * * , 4 . .0* * .03 5 * * * * 6 7 . 5 3 3 4 7 2

&DQFHOODWLRQ &DQFHOODWLRQ SURFHGXUH  SAP AG 2002

n

A EHKDYLRU W\SH (also known as a IODYRU) has the following attributes: l

A name for identification (can be anything you like)

l

A flag indicating whether it is the starting point for a drag operation or the destination of a drop operation

l

A flag indicating which mouse operations this flavor should use

l

A flag indicating which mouse operations this flavor should use within the control - if any

n

Single flavors are generally bundled together in tables.

n

Later, individual control (sub-)objects will be assigned to such tables. All the objects grouped together in this way will thus support the same flavors at runtime.

n

Note that the two control types shown above do QRW correspond to the (business) Drag&Drop procedures "Book" and "Cancel". Instead, such a procedure is the result of a SDLU RI WZR LGHQWLFDOO\ QDPHG IODYRUV, which are supported by the relevant control (sub-)objects.

n

You may have noticed that this means that individual control (sub-)objects may be assigned to flavors that they do not need at all. For example, if the trash can is assigned to the "Target" type, it supports not only the "Cancellation target" but also the "Booking target" flavor. It may seem better to define the control types differently. However, it will become clear that the solution proposed here provides the best runtime performance.

Š SAP AG

BC412

9-4


6\QWD[ ([DPSOH 'HILQLQJ &RQWURO 7\SHV '$7$ UHIBIODYBVUF 7<3( 5() 72 FOBGUDJGURS UHIBIODYBWUJ 7<3( 5() 72 FOBGUDJGURS 6LPLODU IRU WKH FRQWURO W\SH &5($7( 2%-(&7 UHIBIODYBVUF UHIBIODYBWUJ 7DUJHW &$// 0(7+2' UHIBIODYBVUF !DGG UHIBIODYBWUJ !DGG (;3257,1* %HKDYLRU W\SH IODYRU %22.

%22.

'URS WDUJHW VSDFH GUDJVUF ;

GURSWDUJHW VSDFH ;

'UDJ VRXUFH HIIHFW FOBGUDJGURS !FRS\ &RS\ FOBGUDJGURS !FRS\ HIIHFWBLQBFWUO FOBGUDJGURS !QRQH 1RQH FOBGUDJGURS !QRQH &$// 0(7+2' UHIBIODYBVUF !DGG UHIBIODYBWUJ !DGG (;3257,1* IODYRU &$1&

&$1&

GUDJVUF ;

VSDFH GURSWDUJHW VSDFH ;

HIIHFW FOBGUDJGURS !PRYH 0RYH FOBGUDJGURS !PRYH HIIHFWBLQBFWUO FOBGUDJGURS !QRQH FOBGUDJGURS !QRQH  SAP AG 2002

n

To create the behavior type tables mentioned above (&RQWURO 7\SHV) you must create a separate instance of the global class CL_DRAGDROP for each control type.

n

You must then insert each behavior type (flavor) by calling the ADD method for each one. When doing so, take into account the identical names of flavors that belong logically together in the different tables.

n

To specify the effects use the predefined constants of the class CL_DRAGDROP: FRS\, PRYH, and QRQH.

© SAP AG

BC412

9-5


$VVLJQLQJ &RQWURO 6XE 2EMHFWV WR &RQWURO 7\SHV 6RXUFH FRQWURO W\SH %HKDYLRU W\SH 'UDJ 'URS (IIHFW VRXUFH WDUJHW %RRN &DQFHO

7DUJHW FRQWURO W\SH %HKDYLRU W\SH 'UDJ 'URS (IIHFW VRXUFH WDUJHW %RRN &DQFHO

&RS\ 0RYH

&RS\ 0RYH

(IIHFW LQWHUQDOO\ 1RQH 1RQH

(IIHFW LQWHUQDOO\ 1RQH 1RQH

! " # $ % &' ( $ )+* ,-* * .0/ 1 * 2-1 3 * * . * * * * , 4 . .0* * .03 5 * * * * 6 7 . 5 3 3 4 7 2

 SAP AG 2002

n

You specify which source-target relationship is valid, and between which objects, by assigning individual control (sub-)objects to the control types.

n

In this example all the lines of the "Customer" grid control should have the control type "Source". Theoretically, this means that each line can be seen as a "Booking source" and a "Cancellation source". Conversely, the flight FRQQHFWLRQ node is a "Booking target". Thus it must have the control type "Target". So theoretically, each node can also be a "Cancellation target". The same applies to the trash can picture. The flight ERRNLQJ node itself must also have the type "Source".

n

For example, if a customer data record in the grid is dragged to a flight connection node in the tree, the following sequence of events takes place: The system finds out what control sub-objects are involved - here the row of the grid and the flight connection node. Then, from the assignments, it finds two flavors to which ERWK FRQWUROV LQYROYHG DUH MRLQWO\ assigned. (Identically-named) The type of mouse operation now establishes which flavor will be used (that is, &RS\ if the Ctrl key is pressed, otherwise 0RYH) You can then query this information later, to carry out different actions.

n

In this example, if the HIIHFWV of the two behavior types "Book" and "Cancel" had been given identical values, there would be no way of distinguishing which mouse operation had been chosen. In such cases, you must specify a runtime which flavor is to be used. For further details, refer to the online documentation.

Š SAP AG

BC412

9-6


6\QWD[ ([DPSOH $VVLJQLQJ &RQWURO 6XE 2EMHFWV WR &RQWURO 7\SHV ,PSOHPHQWDWLRQ '$7$ KDQGOHBVUF 7<3( L KDQGOHBWUJ 7<3( L GHSHQGV RQ WKH FRQWURO FODVV &$// 0(7+2' UHIBIODYBVUF !JHWBKDQGOH ,03257,1* KDQGOH KDQGOHBVUF DVVLJQ KDQGOHBVUF WR &RQWURO HOHPHQWV KHUH JULG DUHD DQG ERRNLQJ QRGHV RI WUHH ZKLOH DGGLQJ WKHP RQ GURS HYHQW

&$// 0(7+2' UHIBIODYBWUJ !JHWBKDQGOH ,03257,1* KDQGOH KDQGOHBWUJ DVVLJQ KDQGOHBWUJ WR &RQWURO HOHPHQWV KHUH IOLJKW GDWH QRWHV ZKLOH FUHDWLQJ KLHUDUFK\

&$// 0(7+2' UHIBELQBSLF !VHWBGUDJGURSBSLFWXUH (;3257,1* GUDJGURS UHIBIODYBWUJ  SAP AG 2002

n

Assigning controls or their subobjects to the previously-defined control types takes place in different ways depending on the control class.

n

In the above example, you must have an identifier returned by the control types. To do this, call the GET_HANDLE method for each instance. Store this identifier in a type i field (here: KDQGOHBVUF and KDQGOHBWUJ).

n

Then you need to assign these identifiers to the control sub-objects. To assign the entire grid area, use the SET_TABLE_FOR_FIRST_DISPLAY method. In the tree, you must fill the attributes of each node appropriately.

n

You can assign the trash can without an identifier, simply by passing a reference directly to the control type. To do this, call the SET_DRAGDROP_PICTURE method.

n

Thus for this step in the implementation, it is DEVROXWHO\ HVVHQWLDO to study the documentation on each control. However, the techniques introduced here cover the usual situations you will encounter.

Š SAP AG

BC412

9-7


7KH 2EMHFW 8VHG IRU 'DWD 7UDQVSRUW 'DWD

7KH REMHFW FDQ EH LQVWDQWLDWHG E\ WKH KDQGOHU PHWKRGV &/$66 OFOBERRNLQJ '(),1,7,21 38%/,& 6(&7,21 '$7$ ZDBFXVWRPHU 7<3( VFXVWRP ZDBQRGH 7<3( WUHHPVQRGW (1'&/$66

 SAP AG 2002

n

In a Drag&Drop procedure, you usually need to transport application data from the source object to the target object.

n

The system keeps a reference that can point to any object.

n

Accordingly, you must define a class in such a way that its instances can include the relevant application data. Within the public section of your class therefore, define the appropriate attributes (data objects). Since this data transport is program-specific, it is usually better to define this class ORFDOO\.

n

Notes on the above example: The program will need to be able to transport both a customer data record (for the booking) and a booking key (for the cancellation). For this reason, we have defined two appropriately-typed structures in the local class OFOBERRNLQJ: ZDBFXVWRPHU for the customer data record and ZDBQRGH for the tree node that in this case contains the booking key as part of the node ID.

Š SAP AG

BC412

9-8


6\QWD[ ([DPSOH 'HILQLWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'UDJ (YHQW 'DWD

&/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21 &/$66 0(7+2'6 KDQGOHBRQGUDJ )25 (9(17 RQGUDJ 2) FOBJXLBDOYBJULG ,03257,1* HBURZ /LQH ,' /LQH ,' HBGUDJGURSREM 5HIHUHQFH WR 5HIHUHQFH WR (1'&/$66 'UDJ 'UDJ 'URS VHUYLFH LQVWDQFH 'URS VHUYLFH LQVWDQFH 6(7 +$1'/(5 OFOBHYHQWBKDQGOHU !KDQGOHBRQGUDJ )25 UHIBDOY

 SAP AG 2002

n

In the above example, you must define a handler method for the drag event of the SAP Grid Control.

n

In the implementation part, you will have to specify ZKLFK customer data record the user wants to "drag". The event will provide an appropriate parameter that must be imported.

n

The reference to the data transport instance must be passed to the "Drag&Drop service instance" that is generated by the system for every Drag&Drop procedure. The event will provide a reference to this "service instance" using an appropriate parameter that must be imported.

n

The "Drag&Drop service instance" also contains other attributes - such as the flavor used for the current Drag&Drop procedure.

n

The technical name of the drag event and the interface parameters are independent of the control class. Thus for this step in the implementation, it is DEVROXWHO\ HVVHQWLDO to take the names from the online documentation or from the &ODVV %XLOGHU.

Š SAP AG

BC412

9-9


6\QWD[ ([DPSOH ,PSOHPHQWDWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'UDJ (YHQW &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' KDQGOHBRQGUDJ '$7$ OBUHIBERRNLQJ 7<3( 5() 72 OFOBERRNLQJ &5($7( 2%-(&7 OBUHIBERRNLQJ 5($' 7$%/( LWBVFXVWRP ,172 OBUHIBERRNLQJ !ZDBFXVWRPHU ,1'(; HBURZ LQGH[ 'DWD WUDQVSRUW REMHFW HBGUDJGURSREM !REMHFW OBUHIBERRNLQJ (1'0(7+2' (1'&/$66

 SAP AG 2002

n

In the above example, the handler method for the drag event of the SAP Grid Control must perform only one task: Transport the application data of the "dragged" row in the grid into the data transport instance.

n

Define a local reference to an instance of your data transport class for this purpose (OBUHIBERRNLQJ in the example above).

n

Create this instance and fill the attribute for the customer data record with the application data that belong to the "dragged" row in the grid.

n

Now point the REMHFW reference of the "Drag&Drop service instance" to the data transport instance you have created. Even after your handler method has ended, the rest of the Drag&Drop procedure can read this data again using this instance.

© SAP AG

BC412

9-10


6\QWD[ ([DPSOH 'HILQLWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'URS (YHQW 'DWD

&/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21 &/$66 0(7+2'6 KDQGOHBGURS )25 (9(17 GURS 2) FOBVLPSOHBWUHHBPRGHO ,03257,1* QRGHBNH\ 1RGH ,' 1RGH ,' GUDJBGURSBREMHFW 5HIHUHQFH WR WKH 'UDJ 'UDJ 'URS 5HIHUHQFH WR WKH (1'&/$66 VHUYLFH LQVWDQFH VHUYLFH LQVWDQFH 6(7 +$1'/(5 OFOBHYHQWBKDQGOHU !KDQGOHBGURS )25 UHIBWUHHBPRGHO

! " # $ % &' ( $ )+* ,-* * .0/ 1 * 2-1 3 * * . * * * * , 4 . .0* * .03 5 * * * * 6 7 . 5 3 3 4 7 2

 SAP AG 2002

n

In the above example, you must define a handler method for the drop event of the simple tree model.

n

In the implementation part, you will have to specify RQ ZKLFK flight connection node the user wants to drop the customer data record. The event will provide an appropriate parameter that must be imported.

n

The "Drag&Drop service instance" provides the reference to the data transport instance. The event will provide a reference to this "service instance" using an appropriate parameter that must be imported.

n

The technical name of the drop event and the interface parameters are independent of the control class. Thus for this step in the implementation, it is DEVROXWHO\ HVVHQWLDO to take the names from the online documentation or from the &ODVV %XLOGHU.

Š SAP AG

BC412

9-11


6\QWD[ ([DPSOH ,PSOHPHQWDWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'URS (YHQW &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' KDQGOHBGURS '$7$ OBUHIBERRNLQJ 7<3( 5() 72 OFOBERRNLQJ OBZDBQHZQRGH 7<3( WUHHPVQRGW ,) GUDJBGURSBREMHFW !IODYRU %22. &$7&+ 6<67(0 (;&(37,216 PRYHBFDVWBHUURU OBUHIBERRNLQJ " GUDJBGURSBREMHFW !REMHFW 'DWD WUDQVSRUW REMHFW (1'&$7&+ ,) V\ VXEUF FUHDWH QHZ ERRNLQJ QRGH DQG PRGLI\ GDWD EDVH HQWU\ IURP OBZDBQHZQRGH DQG OBUHIBERRNLQJ !ZDBFXVWRPHU (/6( PRYH FDVW HUURU RFFXUUHG &$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',) (/6( RWKHU IODYRU (1',) (1'0(7+2' (1'&/$66  SAP AG 2002

n

In the above example, the handler method for the drag event of the SAP Grid Control must perform the following task: If the Drag&Drop procedure in question is a "Booking" event, add an appropriate node to the flight booking tree. To do this, you must read the application data from the data transport instance.

n

Define a local reference (OBUHIBERRNLQJ in the above example) to an instance of your data transport class and a work area for the node entry ( OBZDBQHZQRGH).

n

The "Drag&Drop service instance" provides the local reference to the REMHFW reference. Once again you can access the data transport instance that you created and filled in the first method and to other attributes - such as the flavor.

n

Use the application data to generate a new node in the flight bookings tree and if necessary to update the appropriate transparent table.

n

Use the ABORT method of the "Drag&Drop service instance" if you want to Drag&Drop procedure before it has been completed.

n

Here you need to make the assignment using a ZLGHQLQJ FDVW ( " ). This means that the static type check will be omitted. For this reason, you should enclose your assignment in a &$7&+...(1'&$7&+ clause RQ SULQFLSOH. You can then catch the runtime error, PRYHBFDVWBHUURU, that may occur.

n

1RWH From SAP R/3 Basis Release 6.10 onwards, use a 75<-(1'75< block instead of a &$7&+(1'&$7&+. For further information, refer to the keyword documentation for the TRY statement.

Š SAP AG

BC412

9-12


6\QWD[ ([DPSOH 'HILQLWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'URS &RPSOHWH (YHQW &/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21 &/$66 0(7+2'6 KDQGOHBGURSBFRPSOHWH )25 (9(17 GURSBFRPSOHWH 2) FOBVLPSOHBWUHHBPRGHO ,03257,1* QRGHBNH\ GUDJBGURSBREMHFW (1'&/$66 1RGH ,' 5HIHUHQFH WR WKH 'UDJ 'UDJ 'URS VHUYLFH LQVWDQFH 1RGH ,' 5HIHUHQFH WR WKH 'URS VHUYLFH LQVWDQFH ! " # $ % &' ( $ )+* ,-* * .0/ 1 * 2-1 3 * * . 'DWD * * * * , 4 . .0* * .03 5 * * * * 6 7 . 5 3 3 4 7 2

 SAP AG 2002

n

After the drop event of the target control the system raises the GURS FRPSOHWH HYHQW of the VRXUFH control. This "Drag&Drop service instance" is also available for this event. Again, you can program functions in an appropriate handler method that you want to execute after the Drag&Drop procedure has been completed.

n

The above example shows a typical example: Cancelation. After the "Move" procedure, the source control must be updated. Thus, in this case, the booking node must be removed from the tree and the follow-up activities carried out after the node has been placed in the trash can.

n

To complete the above example, you simply define another handler method for the drop-complete event of the VLPSOH WUHH PRGHO. A handler method for the drop event of the picture control is not necessary in this example.

n

Implement a handler method for the drag event similar to that for te SAP Grid Control. Take the name for the event and interface parameters from the &ODVV %XLOGHU or the online documentation.

n

In the implementation section of the handler method for the drop-complete event you must specify ZKLFK booking node the user wants to "remove". The event will provide an appropriate parameter that must be imported.

n

You must also get tflavor used from the "Drag&Drop service instance". The event will provide a reference to this "service instance" using an appropriate parameter that must be imported.

Š SAP AG

BC412

9-13


6\QWD[ ([DPSOH ,PSOHPHQWDWLRQ 3DUW RI WKH +DQGOHU 0HWKRG IRU WKH 'URS &RPSOHWH (YHQW &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' KDQGOHBGURSBFRPSOHWH ,) GUDJBGURSBREMHFW !IODYRU &$1& GHOHWH ERRNLQJ QRGH ZLWK LPSRUWHG QRGH NH\ JHW DSSOLFDWLRQ IURP LPSRUWHG QRGH NH\ DQG XSGDWH GDWD EDVH (/6( RWKHU IODYRU &$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',) (1'0(7+2' (1'&/$66

<RX GR QRW QHHG WR H[SRUW WKH GDWD WUDQVSRUW REMHFW LQ WKLV FDVH

 SAP AG 2002

n

In the above example, the handler method for the drop-complete event of the simple tree model must perform the following task: If the Drag&Drop procedure in question is a "Cancellation" event, delete the appropriate node from the flight booking tree.

n

Again, you must export the application data from the "Drag&Drop service instance" using widening cast, similar to the handler method for the drop event of the simple tree model.

n

For the above example, you need only the node ID. You simply need to pass the pointer to an "empty" data transport instance in the handler method for the drag event of the simple tree model to the "Drag&Drop service instance". This will make the node ID of the "dragged" booking node available DV D SDUDPHWHU. This makes implementation much easier in this case: Remove this node with the imported ID from the flight bookings tree.

n

1RWHV l

To comply with the usual ergonomic rules, offer the user an 8QGR function for each Drag&Drop procedure, at least for 0RYH procedures.

l

The example used in this unit is implemented in the program SAPBC412_DNDD_COPY_DELETE in the package BC412.

© SAP AG

BC412

9-14


'UDJ 'URS LQ WKH :$1 (QYLURQPHQW 6ROXWLRQ 2SWLPL]HG IRU 3HUIRUPDQFH 6RXUFH FRQWURO W\SH

3UHVHQWDWLRQ VHUYHU OD\HU

$SSOLFDWLRQ VHUYHU OD\HU

7DUJHW FRQWURO W\SH

$%$3 SURJUDP

 SAP AG 2002

n

Since the control framework is generally suited to working in a :ide $rea 1etwork environment, you only need to take the following into account when implementing Drag&Drop functions.

n

The entire Drag&Drop procedure is executed on the presentation server - that is, the system checks there that the controls involved have been assigned to the identically-named flavors. To do this, the system must pass DOO control type tables to the presentation server.

n

Few tables with many flavors attached to each are passed more quickly than many tables, each with few flavors.

n

One possible alternative to the procedure shown in this unit might have been to define four control types, each with just one flavor. This solution might have been easier to understand and implement. There would have been no need to query the flavor used in the handler methods. You could have allowed more mouse operations for the same procedure. The procedures could have identified simply from the controls involved.

n

However, this conceivable alternative would not have been as good from the viewpoint described above. Thus, the example shown in this unit represents the solution for RSWLPDO UXQWLPH SHUIRUPDQFH.

n

6XPPDU\ For each control (sub-)object that will behave in the same way, user the same instance of the class CL_DRAGDROP (control type table).

Š SAP AG

BC412

9-15


'UDJ 'URS )XQFWLRQV 8QLW 6XPPDU\ <RX DUH QRZ DEOH WR

l 1DPH WKH XVHV RI 'UDJ 'URS IXQFWLRQV

l 'HVFULEH URXJKO\ WKH WHFKQLFDO VHTXHQFH RI D 'UDJ 'URS SURFHGXUH

l ,PSOHPHQW FRS\LQJ SURFHGXUHV EHWZHHQ GLIIHUHQW FRQWURO REMHFWV RU VXE REMHFWV l ,PSOHPHQW PRYH SURFHGXUHV EHWZHHQ GLIIHUHQW FRQWURO REMHFWV RU VXE REMHFWV

 SAP AG 2002

© SAP AG

BC412

9-16


([HUFLVH 8QLW

'UDJ 'URS )XQFWLRQV

7RSLF (QDEOLQJ 'UDJ 'URS 2SHUDWLRQV LQ D 6LPSOH 7UHH &RQWURO

At the conclusion of this unit, you will be able to: • Implement a Drag&Drop &RS\ function in a tree control.

Allow the user to copy single flight connection nodes from a flight connection tree to a )DYRULWHV folder using Drag&Drop.

3URJUDP

&RS\ WHPSODWH

0RGHO VROXWLRQ

ZBC412_##_DND_EX1 SAPBC412_7506_EXERCISE_ SAPBC412_'1'6_EXERCISE_1

where ## is the JURXS QXPEHU 1-1

Copy your solution from the first exercise from the previous chapter (ZBC412_##_TRM_EX1) or the appropriate model solution (SAPBC412_TRMS_EXERCISE_ ) to the name =%& B B'1'B(; . Get to know how your copy of the program works.

1-2

On the root node level of the hierarchy, generate another node for the user’s favorites. Extend the add_nodes subroutine accordingly.

1-3

Create two behavior-type tables (control types) each of which contains a behavior type (Flavor) – one for the source flavor, one for the target flavor. 1-3-1 Create another PBO module where you “initialize” the Drag&Drop (suggested name: init_dragdrop_processing_0100) and call it from the flow logic of screen 0100. 1-3-2 Create a reference variable for the control type instances (We suggest you use the name ref_flav_src and ref_flav_trg). 1-3-3 Create both instances in the init_dragdrop_processing_0100 module. 1-3-4 Add a “source flavor” with the effect “Copy” and a “target flavor with the effect “Copy”. Use the ADD method.

© SAP AG

BC412

9-17


1-4

Assign the tree control sub-objects to the behavior type tables (control types) so that users can only drag flight connection nodes (not drop them), while they can only “ drop” objects onto the )DYRULWHV node. 1-4-1 Create two global data objects of type i for the control type identifiers (We suggest you use the name handle_flav_src and handle_flav_trg). 1-4-2 Get the identifiers from the behavior type tables and store them in the two data objects. To do this, call the get_handle method in the init_dragdrop_processing_0100 module. 1-4-3 Fill the drag_drop_id parameter with the identifiers in the appropriate method calls (in the add_nodes subroutine).

1-5

Define a local class (suggested name: lcl_flightdate) for the data transport between the source and target nodes. In the public section of this class, define a work area as an instance attribute to contain the node entry (suggested name: wa_node, global type: treemsnodt).

1-6

Implement a handler method for the event that reads the data from the “ dragged” node from the global node table and copies it into the data transport instance. 1-6-1 To do this, create a local class (suggested name: lcl_event_handler). 1-6-2 In the public section of the class lcl_event_handler, define a local static handler method (suggested name: handle_drag) for the drag event of the class cl_simple_tree_model. Find out about the interface of the event and import the necessary parameters. 1-6-3 In the implementation part of the method, define a local reference (suggested name: l_ref_flightdate) to your local class for the data transport. Create an instance of this class. Using the node_get_properties method, read the entry for the “ dragged” node.To do this you must have imported the sender reference to the tree control instance that raised the event. Caution: This method does QRW return the node ID. For this reason, you must also copy this into the target structure. Then pass the contents of the target structure to the attribute of your transport instance. In addition, you must have imported the node. Pass the the reference to the transport instance to the REMHFW attribute of the "Drag&Drop service instance". To do this, you must have imported the reference to the "Drag&Drop service instance". 1-6-4 Register the handler method with the tree control object.

1-7 © SAP AG

Implement a handler method for the drop event, which reads the data of the “ dragged” node from the data transport instance and, using this data, inserts another BC412

9-18


node in the )DYRULWHV folder. 1-7-1 Define a local static handler method (suggested name: handle_drag) for the drop event of the class cl_simple_tree_model. Find out about the interface of the event and import the necessary parameters. 1-7-2 In the implementation part of the method, define a local reference (suggested name: l_ref_flightdate) to your local class for the data transport. Also define a local work area for the node entry (suggested name: l_wa_newnode). Pass the the reference REMHFW of the "Drag&Drop service instance" to the local reference. To do this, you must have imported the reference to the "Drag&Drop service instance". Enclose this assignment in a CATCH...ENDCATCH block and catch the possible runtime error, move_cast_error. Fill the fields of the local work area for the new node entry with the contents of your transport object. Form the new node ID by combining the ID of the “ dragged” node with the system date and time. This will ensure that your node IDs are unique. As your relationship node, choose the one on which the dragged node would be “ dropped” . To do this, you need the ID of this latter node. For the purposes of this exercise, also use the new node ID for the text entry. Add the new node to the tree control using the add_node method. Expand the )DYRULWHV node. To do this, use the expand_node method. 1-7-3 Register the tree control object with the handler method.

© SAP AG

BC412

9-19


6ROXWLRQ 8QLW

'UDJ 'URS )XQFWLRQV

7RSLF (QDEOLQJ 'UDJ 'URS 2SHUDWLRQV LQ D 6LPSOH 7UHH &RQWURO

0RGHO VROXWLRQ 6$3%& B'1'6B(;(5&,6(B

6FUHHQ IORZ ORJLF

6FUHHQ PROCESS BEFORE OUTPUT. MODULE status_0100. MODULE init_container_processing_0100. 02'8/( LQLWBGUDJGURSBSURFHVVLQJB MODULE init_tree_processing_0100. PROCESS AFTER INPUT. MODULE exit_command_0100 AT EXIT-COMMAND. MODULE copy_ok_code. MODULE user_command_0100.

$%$3 SURJUDP

'DWD 'HFODUDWLRQV

REPORT sapbc412_dnds_exercise_1 MESSAGE-ID bc412. DATA: * screen-specific: ok_code TYPE sy-ucomm, copy_ok LIKE ok_code, * application data: it_scarr TYPE SORTED TABLE OF scarr WITH UNIQUE KEY carrid, it_spfli TYPE SORTED TABLE OF spfli WITH UNIQUE KEY carrid connid, it_sflight TYPE SORTED TABLE OF sflight

WITH UNIQUE KEY carrid connid fldate,

© SAP AG

BC412

9-20


wa_scarr LIKE LINE OF it_scarr, wa_spfli LIKE LINE OF it_spfli, wa_sflight LIKE LINE OF it_sflight, * container: ref_cont_left

TYPE REF TO cl_gui_docking_container,

* content: ref_tree_model TYPE REF TO cl_simple_tree_model, * drag&drop-specific: UHIBIODYBVUF 7<3( 5() 72 FOBGUDJGURS UHIBIODYBWUJ 7<3( 5() 72 FOBGUDJGURS KDQGOHBIODYBVUF 7<3( L KDQGOHBIODYBWUJ 7<3( L

/RFDO &ODVVHV

*---------------------------------------------------------------------* *

CLASS lcl_flightdate DEFINITION

*---------------------------------------------------------------------* *

contains only instance attributes for data transportation

*

*

between drag&drop objects

*

*---------------------------------------------------------------------* &/$66 OFOBIOLJKWGDWH '(),1,7,21 38%/,& 6(&7,21

'$7$ ZDBQRGH 7<3( WUHHPVQRGW (1'&/$66

© SAP AG

BC412

9-21


*---------------------------------------------------------------------* *

CLASS lcl_event_handler DEFINITION

*---------------------------------------------------------------------* *

contains event handler methods for darg&drop processing

*

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21

&/$66 0(7+2'6 KDQGOHBGUDJ )25 (9(17 GUDJ

2) FOBVLPSOHBWUHHBPRGHO ,03257,1* VHQGHU

QRGHBNH\

GUDJBGURSBREMHFW &/$66 0(7+2'6 KDQGOHBGURS )25 (9(17 GURS

2) FOBVLPSOHBWUHHBPRGHO ,03257,1*

QRGHBNH\

GUDJBGURSBREMHFW (1'&/$66

*---------------------------------------------------------------------* *

CLASS lcl_event_handler IMPLEMENTATION

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' KDQGOHBGUDJ

'$7$ OBUHIBIOLJKWGDWH 7<3( 5() 72 OFOBIOLJKWGDWH &5($7( 2%-(&7 OBUHIBIOLJKWGDWH

&$// 0(7+2' VHQGHU !QRGHBJHWBSURSHUWLHV (;3257,1*

QRGHBNH\ QRGHBNH\ ,03257,1*

SURSHUWLHV OBUHIBIOLJKWGDWH !ZDBQRGH (;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',)

© SAP AG

BC412

9-22


OBUHIBIOLJKWGDWH !ZDBQRGH QRGHBNH\ QRGHBNH\ GUDJBGURSBREMHFW !REMHFW OBUHIBIOLJKWGDWH (1'0(7+2'

*-------------------------------------------------------------------0(7+2' KDQGOHBGURS

'$7$

OBUHIBIOLJKWGDWH 7<3( 5() 72 OFOBIOLJKWGDWH OBZDBQHZQRGH 7<3( WUHHPVQRGW

&$7&+ 6<67(0 (;&(37,216 PRYHBFDVWBHUURU

OBUHIBIOLJKWGDWH " GUDJBGURSBREMHFW !REMHFW (1'&$7&+

,) V\ VXEUF

OBZDBQHZQRGH OBUHIBIOLJKWGDWH !ZDBQRGH

&21&$7(1$7( WH[W IOL OBZDBQHZQRGH QRGHBNH\ ,172 OBZDBQHZQRGH WH[W 6(3$5$7(' %< VSDFH &21&$7(1$7( V\ GDWXP V\ X]HLW

OBZDBQHZQRGH QRGHBNH\

,172 OBZDBQHZQRGH QRGHBNH\ 6(3$5$7(' %< VSDFH

&$// 0(7+2' UHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ OBZDBQHZQRGH QRGHBNH\ UHODWLYHBQRGHBNH\ QRGHBNH\

UHODWLRQVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG LVIROGHU VSDFH

WH[W OBZDBQHZQRGH WH[W (;&(37,216

27+(56 ,) V\ VXEUF !

&$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',)

&$// 0(7+2' UHIBWUHHBPRGHO !H[SDQGBQRGH (;3257,1*

QRGHBNH\ )$9 (/6(

&$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',)

© SAP AG

BC412

9-23


(1'0(7+2' (1'&/$66

$%$3 3URJUDP (YHQW %ORFNV

START-OF-SELECTION. * get application data: SELECT * FROM scarr INTO TABLE it_scarr. IF sy-subrc <> 0. MESSAGE a060. ENDIF. SELECT * FROM spfli INTO TABLE it_spfli. IF sy-subrc <> 0. MESSAGE a060. ENDIF. SELECT * FROM sflight INTO TABLE it_sflight. IF sy-subrc <> 0. MESSAGE a060. ENDIF. CALL SCREEN 100.

© SAP AG

BC412

9-24


0RGXOHV

*&--------------------------------------------------------------------* *&

Module status_0100 OUTPUT

*&--------------------------------------------------------------------* *

Set GUI title and GUI status for screen 100.

*---------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS ’NORM_0100’. SET TITLEBAR ’TITLE_1’. ENDMODULE.

" status_0100 OUTPUT

*&--------------------------------------------------------------------* *&

Module init_container_processing_0100 OUTPUT

*&--------------------------------------------------------------------* *

Start control handling,

*

create container object

*---------------------------------------------------------------------* MODULE init_container_processing_0100 OUTPUT. IF ref_cont_left IS INITIAL. CREATE OBJECT ref_cont_left EXPORTING ratio

= 35

EXCEPTIONS others

= 1.

IF sy-subrc NE 0. MESSAGE a010. ENDIF. ENDIF. ENDMODULE.

© SAP AG

" init_container_processing_0100 OUTPUT

BC412

9-25


*&--------------------------------------------------------------------* *&

Module

init_dragdrop_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

build up flavor tables and get handles to them

*---------------------------------------------------------------------* 02'8/( LQLWBGUDJGURSBSURFHVVLQJB 287387 ,) UHIBIODYBVUF ,6 ,1,7,$/ &5($7( 2%-(&7

UHIBIODYBVUF UHIBIODYBWUJ &$// 0(7+2' UHIBIODYBVUF !DGG (;3257,1*

IODYRU )$9

GUDJVUF ;

GURSWDUJHW VSDFH

HIIHFW FOBGUDJGURS !FRS\ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBIODYBWUJ !DGG (;3257,1*

IODYRU )$9

GUDJVUF VSDFH GURSWDUJHW ;

HIIHFW FOBGUDJGURS !FRS\ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBIODYBVUF !JHWBKDQGOH ,03257,1*

KDQGOH KDQGOHBIODYBVUF (;&(37,216

27+(56 ,) V\ VXEUF !

© SAP AG

BC412

9-26


0(66$*( D (1',)

&$// 0(7+2' UHIBIODYBWUJ !JHWBKDQGOH ,03257,1*

KDQGOH KDQGOHBIODYBWUJ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) (1',)

(1'02'8/(

" init_dragdrop_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create tree object, link to container and fill with data

*---------------------------------------------------------------------* MODULE init_tree_processing_0100 OUTPUT. IF ref_tree_model IS INITIAL. CREATE OBJECT ref_tree_model EXPORTING node_selection_mode = cl_simple_tree_model=>node_sel_mode_single EXCEPTIONS others

= 1.

IF sy-subrc <> 0. MESSAGE a043. ENDIF. CALL METHOD ref_tree_model->create_tree_control EXPORTING parent

= ref_cont_left

EXCEPTIONS OTHERS

= 1.

IF sy-subrc <> 0. MESSAGE a012. ENDIF. PERFORM add_nodes USING ref_tree_model.

Š SAP AG

BC412

9-27


6(7 +$1'/(5

OFOBHYHQWBKDQGOHU !KDQGOHBGUDJ )25 UHIBWUHHBPRGHO OFOBHYHQWBKDQGOHU !KDQGOHBGURS )25 UHIBWUHHBPRGHO ENDIF. ENDMODULE.

" init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

EXIT_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’E’ for screen 100.

*---------------------------------------------------------------------* MODULE exit_command_0100 INPUT. CASE ok_code. WHEN ’CANCEL’.

" Cancel screen processing

PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN ’EXIT’.

" Exit program

PERFORM free_control_ressources. LEAVE PROGRAM. WHEN OTHERS. ENDCASE. ENDMODULE.

" EXIT_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *&

Module

COPY_OK_CODE

INPUT

*&--------------------------------------------------------------------* *

Save the current user command in order to

*

prevent unintended field transport for the screen field ok_code

*

for next screen processing (ENTER)

*---------------------------------------------------------------------* MODULE copy_ok_code INPUT. copy_ok = ok_code. CLEAR ok_code. ENDMODULE.

" COPY_OK_CODE

INPUT

*&--------------------------------------------------------------------* *&

Module

USER_COMMAND_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’ ’ for screen 100.

*---------------------------------------------------------------------*

© SAP AG

BC412

9-28


MODULE user_command_0100 INPUT. CASE copy_ok. WHEN ’BACK’.

" Go back to program

PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN OTHERS. ENDCASE. ENDMODULE.

" USER_COMMAND_0100

INPUT

6XEURXWLQHV

*&--------------------------------------------------------------------* *&

Form

FREE_CONTROL_RESSOURCES

*&--------------------------------------------------------------------* *

free control ressources on the presentation server

*

free all reference variables (ABAP object) -> garbage collector

*---------------------------------------------------------------------* *

no interface

*---------------------------------------------------------------------FORM free_control_ressources. CALL METHOD: ref_cont_left->free. FREE: ref_tree_model, ref_cont_left, ref_flav_src, ref_flav_trg. ENDFORM.

" FREE_CONTROL_RESSOURCES

*---------------------------------------------------------------------* *

FORM ADD_NODES

*

*---------------------------------------------------------------------* *

build up a hierarchy consisting of

*

*

carriers, connections and flight dates

*

*---------------------------------------------------------------------* *

-->

L_REF_TREE_MODEL

*

*---------------------------------------------------------------------* FORM add_nodes USING l_ref_tree_model TYPE REF TO cl_simple_tree_model. DATA: l_wa_node TYPE treemsnodt, date_text(10) TYPE c.

© SAP AG

BC412

9-29


l_wa_node-text = text-car. CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= ’ROOT’

*

RELATIVE_NODE_KEY

=

*

RELATIONSHIP

=

isfolder

= ’X’

text

= l_wa_node-text

expander

= ’X’

EXCEPTIONS OTHERS

= 5

. IF sy-subrc <> 0. MESSAGE a012. ENDIF. * this node should be a drop-target &/($5 OBZDBQRGH

OBZDBQRGH WH[W WH[W IDY

&$// 0(7+2' OBUHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ )$9

*

RELATIVE_NODE_KEY

=

*

RELATIONSHIP

=

LVIROGHU ;

WH[W OBZDBQRGH WH[W H[SDQGHU ;

GUDJBGURSBLG KDQGOHBIODYBWUJ (;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',)

* scarr-nodes: LOOP AT it_scarr INTO wa_scarr. CLEAR l_wa_node. l_wa_node-node_key = wa_scarr-carrid. l_wa_node-text = wa_scarr-carrname. CALL METHOD l_ref_tree_model->add_node EXPORTING

© SAP AG

BC412

9-30


node_key

= l_wa_node-node_key

relative_node_key = ’ROOT’ relationship

= cl_simple_tree_model=>relat_last_child

isfolder

= ’X’

text

= l_wa_node-text

expander

= ’X’

EXCEPTIONS OTHERS

= 5

. IF sy-subrc <> 0. MESSAGE a012. ENDIF. ENDLOOP. * spfli-nodes: LOOP AT it_spfli INTO wa_spfli. CLEAR l_wa_node. CONCATENATE wa_spfli-carrid wa_spfli-connid INTO l_wa_node-node_key SEPARATED BY space. CONCATENATE wa_spfli-carrid wa_spfli-connid ’:’ wa_spfli-cityfrom ’->’ wa_spfli-cityto INTO l_wa_node-text SEPARATED BY space. l_wa_node-relatkey = wa_spfli-carrid. CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= l_wa_node-node_key

relative_node_key = l_wa_node-relatkey relationship

= cl_simple_tree_model=>relat_last_child

isfolder

= ’X’

text

= l_wa_node-text

expander

= ’X’

EXCEPTIONS OTHERS

= 5

. IF sy-subrc <> 0.

© SAP AG

BC412

9-31


MESSAGE a012. ENDIF. ENDLOOP. * sflight-nodes: LOOP AT it_sflight INTO wa_sflight. CLEAR l_wa_node. CONCATENATE wa_sflight-carrid wa_sflight-connid wa_sflight-fldate INTO l_wa_node-node_key SEPARATED BY space. CONCATENATE wa_sflight-carrid wa_sflight-connid INTO l_wa_node-relatkey SEPARATED BY space. WRITE wa_sflight-fldate TO date_text. l_wa_node-text = date_text. *

flight date nodes should be able to be dragged: CALL METHOD l_ref_tree_model->add_node EXPORTING node_key

= l_wa_node-node_key

relative_node_key = l_wa_node-relatkey relationship

= cl_simple_tree_model=>relat_last_child

isfolder

= space

text

= l_wa_node-text

*

EXPANDER

=

GUDJBGURSBLG KDQGOHBIODYBVUF EXCEPTIONS OTHERS

= 5

. IF sy-subrc <> 0. MESSAGE a012. ENDIF. ENDLOOP. ENDFORM.

© SAP AG

" ADD_NODES

BC412

9-32


,QFOXGLQJ 'LIIHUHQW &RQWUROV LQ &RPSOH[ 8VHU 'LDORJV &RQWHQWV l ([DPSOH RI D FXVWRPHU UHTXLUHPHQW l ,PSOHPHQWDWLRQ LGHD

l 'LVFXVVLRQ RI WKH VROXWLRQ DQG KRZ LW FRXOG EH H[WHQGHG

 SAP AG 2002

© SAP AG

BC412

10-1


,QFOXGLQJ 'LIIHUHQW &RQWUROV LQ &RPSOH[ 8VHU 'LDORJV 8QLW 2EMHFWLYHV $W WKH FRQFOXVLRQ RI WKLV XQLW \RX ZLOO EH DEOH WR l 1DPH WKH EHQHILWV DQG XVHV RI VRPH FODVVLF VFUHHQ HOHPHQWV

l 1DPH WKH EHQHILWV DQG XVHV RI VRPH FRQWURO EDVHG VFUHHQ HOHPHQWV

l &KRRVH DQG LPSOHPHQW WKH ULJKW FODVVLF RU FRQWURO EDVHG GLDORJ SURJUDPPLQJ WHFKQLTXH IRU WKH WDVN LQ KDQG l &RPELQH FODVVLFDO DQG FRQWURO EDVHG VFUHHQ HOHPHQWV LQ WKH VDPH SURJUDP WKDW LV LPSOHPHQW WKH LQWHUDFWLRQ EHWZHHQ WKHP

 SAP AG 2002

© SAP AG

BC412

10-2


%XVLQHVV 6FHQDULR 7KH FXVWRPHU ZDQWV D VLQJOH VFUHHQ WUDQVDFWLRQ ZLWK WKH IROORZLQJ IXQFWLRQV l 'LVSOD\ D VHW RI FXVWRPHU GDWD UHFRUGV LQ D WDEOH 5HVWULFW WKH VHW E\ FXVWRPHU QXPEHU l %RRN DQ\ QXPEHU RI IOLJKWV IRU DQ\ QXPEHU RI FXVWRPHUV IURP WKLV VHW l 8QGR WKH ODVW ERRNLQJ

l )RUPDW WKH DGGLWLRQDO GDWD IRU DQ\ ERRNLQJ WR FUHDWH DQ LWLQHUDU\ ERRNLQJ FRQILUPDWLRQ

 SAP AG 2002

n

The requirements for a dialog-based ABAP program shown here make it imperative that you include an extensive design phase.

n

Before you start implementing the solution, you need to gather ideas and then choose the most suitable forms of user dialog.

n

You will need a balanced combination of classical (screen-based) and control-based techniques. Each of these techniques has its own strengths in specific areas.

n

You have learnt about the different kinds of screen-based user dialogs in previous courses (possibly intensively). Until now, this course has introduced you to control-based dialogs.

n

Now comes the point where you combine both techniques skillfully to achieve an attractive result.

© SAP AG

BC412

10-3


$Q ,GHD IRU ,PSOHPHQWLQJ 'LDORJ )RUPV

)OLJKW ERRNLQJV

1R

WR

,WLQHUDU\ IRU )OLJKW

'HSDUWXUH !" # $&% ' % % (*),+ % -,+ . % % ( $UULYDO % % % % ',/ ( (0% % (0. 1 % % % % 2 3 (*1 . . / 3 (*-,+ % -,+ . % % ( . 2 + % -,+ . % % ( 1 % + % - + . % % ( % ),+4(0% + . % % ( ( ( +4(0%,+ . % % ( (0/,+5(*% + . % % ( . . +4(0%,+ . % % (

 SAP AG 2002

n

First you must decide what program type to use: We are not talking about a typical "report" here. This means that we do not need the predefined sequence of ABAP events in an executable program. The PRGXOH W\SH suggests itself here. There will be substantially more source code than in previous exercise and demonstration programs. We should split the source code into several Include programs, to make the program easier to maintain and clarify its structure. The system can take over this task, if we comply with the naming convention for customer programs - SAPM<... and SAPM=....

n

It seems appropriate to use two EnjoySAP Controls: ĂŠ The 6$3 *ULG &RQWURO to display the customer data records in a table

ĂŠ The WUHH FRQWURO to display all the available flight connections in a hierarchical structure

n

A classical PRGDO GLDORJ ER[ is an appropriate way of outputting the itinerary. We could then use all the formatting options for ABAP lists and the standard list GUI status. The print functions are also automatically made available.

n

We can implement booking the flights and creating the itinerary using mouse operations, for which the EnjoySAP Controls have appropriate events.

Š SAP AG

BC412

10-4


6HOHFWLRQ 2SWLRQ E\ &XVWRPHU 1XPEHU

)OLJKW ERRNLQJV

1R

WR 723 ,QFOXGH 6(/(&7,21 6&5((1 %(*,1 2) 6&5((1 $6 68%6&5((1 6(/(&7 237,216 VRBFXVW )25 LG 6(/(&7,21 6&5((1 (1' 2) 6&5((1 3%2 &$// 68%6&5((1 ,1&/8',1* V\ FSURJ 3$, &$// 68%6&5((1

 SAP AG 2002

n

Since the EnjoyControls always need to be included in a "Container" screen for technical reasons, it is a good idea to implement the latter functionally.

n

Apart from using the associated user interface for menus and pushbuttons, we may wish to implement the selection option for customer numbers classically. The ABAP statement SELECTOPTIONS allows you to implement this requirement in a very simple way. The system automatically processes additional functions like search helps.

n

Moreover, since EnjoySAP Controls have been developed primarily for GLVSOD\LQJ data, they do not naturally suggest themselves as a solution in this case.

n

For technical reasons, we can display a selection option of limiting records only by using the "detour" of a 6HOHFWLRQ 6FUHHQ DV D 6XEVFUHHQ. Thus, we need to declare the top left corner as a subscreen area, define a selection screen as a subscreen and display this selection screen in the subscreen area of the screen.

n

We can supply default values for the selection option dynamically in the LOAD-OF-PROGRAM event.

© SAP AG

BC412

10-5


&RQWDLQHU &RQWUROV

3%2 02'8/( LQLWBFRQWDLQHUBSURFHVVLQJB

2 ,QFOXGH &5($7( 2%-(&7 (;3257,1* UDWLR VLGH DWBERWWRP

ó

2 ,QFOXGH &5($7( 2%-(&7 (;3257,1* UDWLR VLGH FOB !GRFNBDWBULJKW

 SAP AG 2002

n

All EnjoySAP Controls require a container control.

n

It is a good idea to use docking containers here so that users can adjust the frames of each screen area to suit themselves.

n

We need to choose sensible default settings for the size of each screen area.

© SAP AG

BC412

10-6


7KH 6$3 *ULG &RQWURO IRU WKH &XVWRPHU 'DWD 5HFRUGV 3%2 02'8/( LQLWBDOYBSURFHVVLQJB

)OLJKW ERRNLQJV

2 ,QFOXGH '$7$ VHWBFXVWBROG /,.( 5$1*( 2) LG

&$// 0(7+2' !VHWBWDEOHBIRUBILUVWBGLVSOD\ ,) VRBFXVW>@ 1( VHWBFXVWBROG /223 $7 LWBVFXVWRP :+(5( LG ,1 VRBFXVW (1'/223 &$// 0(7+2' !UHIUHVKBWDEOHBGLVSOD\ (1',)

 SAP AG 2002

n

We need to pay special attention to the resources needed at runtime when transporting the data to the SAP Grid Control.

n

We should not refresh the dataset unless the user has really created a new set records by customer number at runtime.

n

For comparison purposes, we can create a data object for such a set using the DATA ... LIKE RANGE OF ... statement.

© SAP AG

BC412

10-7


7KH 6LPSOH 7UHH 0RGHO IRU WKH )OLJKW &RQQHFWLRQV (YHQW KDQGOHU (;3$1'B12B&+,/'5(1 6(/(&7 )520 VIOLJKW :+(5( &$// 0(7+2' !DGGBQRGHV

)OLJKW ERRNLQJV

3%2 02'8/( LQLWBWUHHB B

2 ,QFOXGH 6(/(&7 )520 VFDUU 6(/(&7 )520 VSIOL &$// 0(7+2' !DGGBQRGHV

5 6 7

8 9 #

: ; 4 !< = , $>% ' % % (0),+ % -,+ . % % ( % % % % ',/ ( (0% % (*. 1 % % % % 2 3 (*1 . . / 3 (0-,+ % -,+ . % % ( . 2 + % -,+ . % % ( 1 % + % - + . % % ( % ),+4(0% + . % % ( ( ( +?(*%,+ . % % ( (*/ +4(*%,+ . % % ( . .,+4(*% + . % % (

 SAP AG 2002

n

We should also pay special attention to runtime needs when implementing the tree control.

n

In this case, it is not transporting the data to the presentation server that is runtime-intensive, but rather reading it from the database.

n

Initially therefore, we should only read the data for a maximum of two hierarchy levels from the database. Again, the LOAD-OF-PROGRAM event block presents itself. Only if the user is interested in a particular flight connection at runtime should we read and buffer the data locally in the program.

n

We then need to pass the requested data to the tree model instance using events. This instance in turn uses the best (that is, least runtime-intensive) method for passing the data to the presentation server.

n

When we create the unique node IDs, we should bear in mind that the application keys will later be needed to identify the selected node.

Š SAP AG

BC412

10-8


'UDJ 'URS IRU WKH %RRNLQJV

)OLJKW ERRNLQJV

!" # $&% ' % % (*),+ % -,+ . % % ( % % % % ',/ ( (0% % (0. 1 % % % % 2 3 (*1 . . / 3 (*-,+ % -,+ . % % ( . 2 + % -,+ . % % ( 1 % + % - + . % % ( % ),+4(0% + . % % ( ( ( +4(0%,+ . % % ( (0/,+5(*% + . % % ( . . +4(0%,+ . % % (

7KH '523 HYHQW 7KH '523 HYHQW KDQGOHU 6(/(&7 )520 VIOLJKW :+(5( &$// 0(7+2' !DGGBQRGH XQGRBQRGHBNH\ QRGHBNH\ &$// 0(7+2' !H[SDQGBQRGH

 SAP AG 2002

n

To implement a booking procedure, we could use the Drag&Drop functions of the EnjoySAP Controls.

n

One row of the SAP Grid Control can provide the source of a copying procedure, while a flight FRQQHFWLRQ node of the tree control provides the target.

n

As a reaction to the "drop" event, we need to create a booking node and insert it under the appropriate flight connection node.

n

In doing so, we need to ensure that the ID of this new node is buffered globally in the program, so that we can implement the 8QGR function later.

n

In this course, we want to focus on user dialogs. This means that we will not be "generating" unique booking numbers or updating the relevant database tables.

Š SAP AG

BC412

10-9


7KH 8QGR )XQFWLRQ IRU WKH /DVW %RRNLQJ

)OLJKW ERRNLQJV

Undo selected !" # 3$, $&% ' % % 02'8/( XVHUBFRPPDQGB (*),+ % -,+ . % 'R \RX ZDQW WR FDQFHO WKLV ERRNLQJ" % ( % % % % ',/ ( (0% % (0. 1 , % % % % 2 3 (*1 . . / 3 Yes No ,QFOXGH (*-,+ % -,+ . % % ( &$// )81&7,21 . 2 + % -,+ . % % ( 32383B72B&21),50B67(3

% % % % ) ' % / % % - ' 2 1 % + % - + . % % ( &$// 0(7+2' % ),+4(0% + . % % ( !GHOHWHBQRGH ( ( +4(0%,+ . % % ( (0/,+5(*% + . % % ( (;3257,1* QRGHBNH\ . . +4(0%,+ . % % ( XQGRBQRGHBNH\

"

 SAP AG 2002

n

We may wish to put the 8QGR button on the program interface, since we will be activating the 6DYH pushbutton here later.

n

Alternatively, we could create a toolbar control instance.

n

Either way we should display a confirmation prompt before the user undoes the booking by removing the node again from the tree.

Š SAP AG

BC412

10-10


7KH 0RGDO 'LDORJ %R[ IRU WKH ,WLQHUDU\ 3%2 02'8/( FUHDWHBOLVWB

, ,QFOXGH 68335(66 ',$/2* /($9( 72 /,67B352&(66,1* $1' 5(7851 72 6&+5((1

,WLQHUDU\ IRU

)OLJKW 5 6 7

8 9 #

: ; 4 'HSDUWXUH !< = , $>% ' % % :5,7( (0),+ % -,+ . % % ( $UULYDO % % % % ',/ ( (0% % (*. 1 % % % % 2 3 (*1 . . / 3 (0-,+ % -,+ . % % ( . 2 + % -,+ . % % ( 7KH 12'(B'28%/(B&/,&. HYHQW 7KH 12'(B'28%/(B&/,&. HYHQW 1 % + % - + . % % ( DSSOLFDWLRQ HYHQW

DSSOLFDWLRQ HYHQW

% ),+4(0% + . % % ( 5($' 7$%/( LWBVFXVWRP :,7+ 7$%/( .(< ( ( +?(*%,+ . % % ( 5($' 7$%/( LWBVSIOL :,7+ 7$%/( .(< (*/ +4(*%,+ . % % ( 5($' 7$%/( LWBVIOLJKW :,7+ 7$%/( .(< . .,+4(*% + . % % ( &$// 6&5((1 67$57,1* $7  SAP AG 2002

n

To format the itinerary, we need additional information from the buffer tables. To read these, we need to extract the application key from the ID of the node that the user has double-clicked.

n

The modal dialog box should RQO\ appear if the user double-clicks a ERRNLQJ node.

n

To process the ABAP list in the modal dialog box, use the SUPPRESS DIALOG and LEAVE TO LIST-PROCESSING ABAP statements. Set the standard list status including the 3ULQW function using SET PF-STATUS space.

Š SAP AG

BC412

10-11


2WKHU 2SWLRQV IRU ([WHQGLQJ WKH 3URJUDP

:H FRXOG DGG WKHVH IXQFWLRQV l ,QVHUWLQJ D QHZ FXVWRPHU UHFRUG

l 6KRZ DQG KLGH WKH 8QGR IXQFWLRQ G\QDPLFDOO\

l 6HDUFK IRU DOO RI D FXVWRPHU V ERRNLQJV LQ WKH WUHH DQG SULQW D FRPSOHWH FRQILUPDWLRQ l 'LVSOD\ WKH FRPSOHWH FRQILUPDWLRQ DV WKH QH[W VFUHHQ IXOOVFUHHQ DIWHU WKH XVHU KDV VDYHG

l $OORZ WKH XVHU WR GHOHWH DQ\ ERRNLQJ XVLQJ 'UDJ 'URS

 SAP AG 2002

n

For the last three of these functions, we need to buffer the inserted bookings in another internal table, defined globally in the program.

n

We can then make and undo bookings using this table, until the user is happy with the result.

n

The 6DYH function should then trigger an update of the database table (or tables), typically by DV\QFKURQRXV XSGDWH

n

Note that you need a profound knowledge of SAP’s bundling, lock, and authorization concepts, to update the database safely and consistently. For more information on these topics, refer to the online documentation or attend the course %& 'DWDEDVH 8SGDWHV .

© SAP AG

BC412

10-12


,QFOXGLQJ 'LIIHUHQW &RQWUROV LQ &RPSOH[ 8VHU 'LDORJV 8QLW 6XPPDU\ <RX DUH QRZ DEOH WR

l 1DPH WKH EHQHILWV DQG XVHV RI VRPH FODVVLF VFUHHQ HOHPHQWV

l 1DPH WKH EHQHILWV DQG XVHV RI VRPH FRQWURO EDVHG VFUHHQ HOHPHQWV

l &KRRVH DQG LPSOHPHQW WKH ULJKW FODVVLF RU FRQWURO EDVHG GLDORJ SURJUDPPLQJ WHFKQLTXH IRU WKH WDVN DW KDQG

l &RPELQH FODVVLFDO DQG FRQWURO EDVHG VFUHHQ HOHPHQWV LQ WKH VDPH SURJUDP WKDW LV LPSOHPHQW WKH LQWHUDFWLRQ EHWZHHQ WKHP

 SAP AG 2002

© SAP AG

BC412

10-13


([HUFLVH 2SWLRQDO

8QLW ,QFOXGLQJ 'LIIHUHQW &RQWUROV LQ &RPSOH[ 8VHU 'LDORJV 7RSLF &UHDWLQJ D 2QH 6FUHHQ 7UDQVDFWLRQ IRU %RRNLQJ )OLJKWV

At the conclusion of this unit, you will be able to: • Show a selection option in a classical screen • Attach several docking containers to different edges of the screen • Fill and update a SAP Grid Control with optimal runtime performance, using dialogs • Fill a tree control, update it, and have it react to doubleclicking events • Implement Drag&Drop procedures between the SAP Grid and tree controls including the 8QGR function • Display data as an ABAP list in a modal dialog box Develop a program that performs the following functions: • Display a set of customer data records in a table. Restrict the set by customer number • Book any number of flights for any number of customers from this set • Undo the last booking • Format the additional data for any booking to create an "itinerary" (booking confirmation) 3URJUDP

&RS\ WHPSODWH

0RGHO VROXWLRQ

6$30=BC412_##_UDC_EX1 SAPBC412_UDC7_EXERCISE_1 SAPBC412_UDC6_EXERCISE_1

where ## is the JURXS QXPEHU 1-1

Copy the template SAPBC412_UDC7_EXERCISE_1 – LQFOXGLQJ DOO LWV VXE REMHFWV ± to a new program with the name 6$30=%& B B8'&B(; . Create the transaction code =%& B B8'& and get to know the features of this copied program.

1-2

Define a selection option for customer numbers (suggested name: so_cust) on a selection screen (suggested screen number: 1100), used as a subscreen. The customer data records are stored in the transparent table SCUSTOM.

© SAP AG

BC412

10-14


Show the selection screen in a subscreen area (suggested name: subarea_cust) of screen 100. 1-3

Create two docking containers (suggested names: ref_cont_left and ref_cont_right). Give them suitable dimensions and link them to screen 100 so that the screen is split sensibly.

1-4

Place a SAP Grid Control instance (suggested name: ref_alv:) in the left screen area and use it to display the customer data records from the transparent table SCUSTOM, for the selected customers. Update the content only when the user changes the selection option criteria.

1-5

Place a tree control instance of the VLPSOH WUHH PRGHO (suggested name: ref_tree_model) in the right screen area and use it to display the flight connection data from the flight data model (that is, from the transparent tables SCARR, SPFLI, and SFLIGHT). 2SWLRQDO Optimize this step for runtime performance. Use the possibility you have of reading some of the data afterwards, by reacting to a suitable event.

1-6

Implement a booking procedure as a Drag&Drop function between the SAP Grid Control and the flight connection node of the tree control.

1-7

1-8

© SAP AG

Extend the status STATUS_NORM_0100 to include a 8QGR function (suggested name: ’UNDO’). Allow the user to remove the booking node inserted most recently from the tree control. Implement the following function, to be triggered when the user double-clicks an inserted booking node: Format some additional data for the relevant flight booking as an “itinerary” and booking confirmation, in the form of an ABAP list. Display this as a modal dialog box. Then allow the user to print this list.

BC412

10-15


6ROXWLRQ 2SWLRQDO

8QLW ,QFOXGLQJ 'LIIHUHQW &RQWUROV LQ &RPSOH[ 8VHU 'LDORJV 7RSLF &UHDWLQJ D 2QH 6FUHHQ 7UDQVDFWLRQ IRU %RRNLQJ )OLJKWV

0RGHO VROXWLRQ 6$3%& B 8'&6B(;(5&,6(B

6FUHHQ IORZ ORJLF

6&5((1 PROCESS BEFORE OUTPUT. MODULE status_0100.

02'8/( LQLWBFRQWDLQHUBSURFHVVLQJB 02'8/( LQLWBGUDJGURSBSURFHVVLQJB 02'8/( LQLWBDOYBSURFHVVLQJB

02'8/( LQLWBWUHHBSURFHVVLQJB

&$// 68%6&5((1 VXEDUHDBFXVW ,1&/8',1* V\ FSURJ PROCESS AFTER INPUT. &$// 68%6&5((1 VXEDUHDBFXVW MODULE exit_command_0100 AT EXIT-COMMAND. MODULE user_command_0100

352&(66 %()25( 287387

6&5((1

02'8/( FUHDWHBOLVWB 02'8/( VWDWXVB 352&(66 $)7(5 ,1387

02'8/( XVHUBFRPPDQGB

© SAP AG

BC412

10-16


$%$3 SURJUDP

0DLQ 3URJUDP

INCLUDE bc412_udcs_exercise_1top. INCLUDE bc412_udcs_exercise_1c01. INCLUDE bc412_udcs_exercise_1o01. INCLUDE bc412_udcs_exercise_1i01. INCLUDE bc412_udcs_exercise_1f01. INCLUDE bc412_udcs_exercise_1e01.

'HFODUDWLRQV

*&--------------------------------------------------------------------* *& Include BC412_UDCS_EXERCISE1_TOP

*

*&--------------------------------------------------------------------* PROGRAM sapbc412_udct_exercise1 MESSAGE-ID bc412 12 67$1'$5' 3$*( +($',1* /,1( 6,=( . DATA: * container: UHIBFRQWBOHIW 7<3( 5() 72 FOBJXLBGRFNLQJBFRQWDLQHU UHIBFRQWBULJKW 7<3( 5() 72 FOBJXLBGRFNLQJBFRQWDLQHU * content: UHIBDOY 7<3( 5() 72 FOBJXLBDOYBJULG

UHIBWUHHBPRGHO 7<3( 5() 72 FOBVLPSOHBWUHHBPRGHO * node buffers for tree processing: LWBQRGHV 7<3( WUHHPVQRWD XQGRBQRGHBNH\ 7<3( WPBQRGHNH\ * for event registration: LWBHYHQWV 7<3( FQWOBVLPSOHBHYHQWV ZDBHYHQW /,.( /,1( 2) LWBHYHQWV * drag&drop-specific: ZDBOD\RXW 7<3( OYFBVBOD\R UHIBIODYBVUF 7<3( 5() 72 FOBGUDJGURS UHIBIODYBWUJ 7<3( 5() 72 FOBGUDJGURS KDQGOHBVUF 7<3( L KDQGOHBWUJ 7<3( L

© SAP AG

BC412

10-17


* application-data: LWBVFDUU 7<3( 6257(' 7$%/( 2) VFDUU :,7+ 81,48( .(< FDUULG

LWBVSIOL 7<3( 6257(' 7$%/( 2) VSIOL

:,7+ 81,48( .(< FDUULG FRQQLG LWBVIOLJKW 7<3( 6257(' 7$%/( 2) VIOLJKW

:,7+ 81,48( .(< FDUULG FRQQLG IOGDWH LWBVFXVWRP 7<3( 67$1'$5' 7$%/( 2) VFXVWRP :,7+ 121 81,48( .(< LG ZDBVFDUU /,.( /,1( 2) LWBVFDUU ZDBVSIOL /,.( /,1( 2) LWBVSIOL

ZDBVIOLJKW /,.( /,1( 2) LWBVIOLJKW ZDBVFXVWRP /,.( /,1( 2) LWBVFXVWRP * for itenarary list: ZDBVERRN 7<3( VERRN

DUUBGDWH 7<3( VIOLJKW IOGDWH * subscreen content for screen 100: 6(/(&7,21 6&5((1 %(*,1 2) 6&5((1 $6 68%6&5((1 6(/(&7 237,216 VRBFXVW )25 ZDBVFXVWRP LG 6(/(&7,21 6&5((1 (1' 2) 6&5((1 * auxiliary for screen 100: DATA: ok_code

TYPE sy-ucomm,

copy_ok_code LIKE ok_code, l_answer

TYPE c,

VHWBFXVWBROG /,.( 5$1*( 2) ZDBVFXVWRP LG

© SAP AG

BC412

10-18


/RFDO &ODVVHV

*---------------------------------------------------------------------* *

INCLUDE BC412UDCS_EXERCISE_1C01

*

*---------------------------------------------------------------------* *---------------------------------------------------------------------* *

CLASS lcl_booking DEFINITION

*---------------------------------------------------------------------* &/$66 OFOBERRNLQJ '(),1,7,21 38%/,& 6(&7,21

'$7$ ZDBFXVWRPHU 7<3( VFXVWRP (1'&/$66

*---------------------------------------------------------------------* *

CLASS lcl_event_handler DEFINITION

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU '(),1,7,21 38%/,& 6(&7,21

&/$66 0(7+2'6 KDQGOHBH[SDQGBQRBFKLOGUHQ

)25 (9(17 H[SDQGBQRBFKLOGUHQ 2) FOBVLPSOHBWUHHBPRGHO ,03257,1* QRGHBNH\

&/$66 0(7+2'6 KDQGOHBRQGUDJ )25 (9(17 RQGUDJ

2) FOBJXLBDOYBJULG ,03257,1* HBURZ

HBGUDJGURSREM &/$66 0(7+2'6 KDQGOHBGURS )25 (9(17 GURS

2) FOBVLPSOHBWUHHBPRGHO ,03257,1*

QRGHBNH\

GUDJBGURSBREMHFW &/$66 0(7+2'6 KDQGOHBQRGHBGRXEOHBFOLFN

)25 (9(17 QRGHBGRXEOHBFOLFN 2) FOBVLPSOHBWUHHBPRGHO ,03257,1*

QRGHBNH\ (1'&/$66

© SAP AG

BC412

10-19


*---------------------------------------------------------------------* *

CLASS lcl_event_handler IMPLEMENTATION

*---------------------------------------------------------------------* &/$66 OFOBHYHQWBKDQGOHU ,03/(0(17$7,21 0(7+2' KDQGOHBH[SDQGBQRBFKLOGUHQ '$7$

%(*,1 2) OBZDBNH\BVIOLJKWBF FDUULG 7<3( F FRQQLG 7<3( Q IOGDWH 7<3( Q

(1' 2) OBZDBNH\BVIOLJKWBF OBLWBVIOLJKW /,.( LWBVIOLJKW OBLWBQRGHV 7<3( WUHHPVQRWD OBZDBQRGH 7<3( WUHHPVQRGW GDWHBWH[W 7<3( F *

get application keys:

&/($5 ZDBVIOLJKW 63/,7 QRGHBNH\ $7 FBVHS ,172

OBZDBNH\BVIOLJKWBF FDUULG OBZDBNH\BVIOLJKWBF FRQQLG

OBZDBNH\BVIOLJKWBF IOGDWH

,) OBZDBNH\BVIOLJKWBF FRQQLG &2 VSDFH &/($5 OBZDBNH\BVIOLJKWBF FRQQLG (1',)

,) OBZDBNH\BVIOLJKWBF IOGDWH &2 VSDFH &/($5 OBZDBNH\BVIOLJKWBF IOGDWH (1',)

029( &255(6321',1* OBZDBNH\BVIOLJKWBF 72 ZDBVIOLJKW *

create only sflight-notes:

,) 127 ZDBVIOLJKW FRQQLG ,6 ,1,7,$/ $1' ZDBVIOLJKW IOGDWH ,6 ,1,7,$/ *

maybe data for sflight-nodes is already buffered:

/223 $7 LWBVIOLJKW ,172 ZDBVIOLJKW

© SAP AG

BC412

10-20


:+(5( FDUULG ZDBVIOLJKW FDUULG

$1' FRQQLG ZDBVIOLJKW FRQQLG ,16(57 ZDBVIOLJKW ,172 7$%/( OBLWBVIOLJKW (1'/223

,) V\ VXEUF ! *

otherwise get more sflight-data ...

6(/(&7 )520 VIOLJKW

,172 7$%/( OBLWBVIOLJKW

:+(5( FDUULG ZDBVIOLJKW FDUULG

$1' FRQQLG ZDBVIOLJKW FRQQLG ,) V\ VXEUF ! 0(66$*( D (1',) *

buffer additional data:

,16(57 /,1(6 2) OBLWBVIOLJKW ,172 7$%/( LWBVIOLJKW (1',) *

and create nodes:

/223 $7 OBLWBVIOLJKW ,172 ZDBVIOLJKW &/($5 OBZDBQRGH

&21&$7(1$7( ZDBVIOLJKW FDUULG ZDBVIOLJKW FRQQLG ZDBVIOLJKW IOGDWH

,172 OBZDBQRGH QRGHBNH\ 6(3$5$7(' %< &21&$7(1$7( ZDBVIOLJKW FDUULG ZDBVIOLJKW FRQQLG

,172 OBZDBQRGH UHODWNH\ 6(3$5$7(' %<

OBZDBQRGH UHODWVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG OBZDBQRGH LVIROGHU ; OBZDBQRGH H[SDQGHU ; *

drop booking should only be possible for flight date nodes:

OBZDBQRGH GUDJGURSLG KDQGOHBWUJ

:5,7( ZDBVIOLJKW IOGDWH 72 GDWHBWH[W OBZDBQRGH WH[W GDWHBWH[W

,16(57 OBZDBQRGH ,172 7$%/( OBLWBQRGHV (1'/223

&$// 0(7+2' UHIBWUHHBPRGHO !DGGBQRGHV (;3257,1*

QRGHBWDEOH OBLWBQRGHV (;&(37,216

© SAP AG

BC412

10-21


27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) *

expand the node:

&$// 0(7+2' UHIBWUHHBPRGHO !H[SDQGBQRGH (;3257,1*

QRGHBNH\ QRGHBNH\ (1',) (1'0(7+2' *-------------------------------------------------------------------- 0(7+2' KDQGOHBRQGUDJ

'$7$ OBUHIBERRNLQJ 7<3( 5() 72 OFOBERRNLQJ &5($7( 2%-(&7 OBUHIBERRNLQJ

5($' 7$%/( LWBVFXVWRP ,172 OBUHIBERRNLQJ !ZDBFXVWRPHU ,1'(; HBURZ LQGH[ HBGUDJGURSREM !REMHFW OBUHIBERRNLQJ (1'0(7+2'

*-------------------------------------------------------------------- 0(7+2' KDQGOHBGURS '$7$

OBUHIBERRNLQJ 7<3( 5() 72 OFOBERRNLQJ OBZDBQHZQRGH 7<3( WUHHPVQRGW

&$7&+ 6<67(0 (;&(37,216 PRYHBFDVWBHUURU OBUHIBERRNLQJ " GUDJBGURSBREMHFW !REMHFW (1'&$7&+

,) V\ VXEUF *

create new booking node,

*

due to didactical reasons just take sy-datum and sy-uzeit

*

as node key here, begin with them to make separation easier

* *

correct solution would be:

*

get number from number range intervall (->BC414)

&21&$7(1$7( V\ GDWXP V\ X]HLW

QRGHBNH\ "imported! OBUHIBERRNLQJ !ZDBFXVWRPHU LG

© SAP AG

BC412

10-22


,172 OBZDBQHZQRGH QRGHBNH\ 6(3$5$7(' %<

&$// 0(7+2' UHIBWUHHBPRGHO !DGGBQRGH (;3257,1*

QRGHBNH\ OBZDBQHZQRGH QRGHBNH\

UHODWLYHBQRGHBNH\ QRGHBNH\ "imported!

UHODWLRQVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG LVIROGHU VSDFH

WH[W OBZDBQHZQRGH QRGHBNH\ (;&(37,216

27+(56 ,) V\ VXEUF !

&$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',) *

buffer new node for undo functionality: undo_node_key = l_wa_newnode-node_key.

*

of course new booking would have to be stored in table SBOOK now

*

left out here due to didactical reasons

*

...

*

expand the parent node:

&$// 0(7+2' UHIBWUHHBPRGHO !H[SDQGBQRGH (;3257,1*

QRGHBNH\ QRGHBNH\ (/6(

&$// 0(7+2' GUDJBGURSBREMHFW !DERUW (1',)

(1'0(7+2' *-------------------------------------------------------------------- 0(7+2' KDQGOHBQRGHBGRXEOHBFOLFN '$7$

%(*,1 2) OBZDBNH\BVERRNBF FDUULG 7<3( F FRQQLG 7<3( Q IOGDWH 7<3( Q *

bookid(8)

TYPE n, left out for didactical reasons

FXVWRPLG 7<3( Q

(1' 2) OBZDBNH\BVERRNBF &/($5 ZDBVERRN

© SAP AG

BC412

10-23


* separate sy-datum and sy-uzeit first: '2 7,0(6

6($5&+ QRGHBNH\ )25

6+,)7 QRGHBNH\ %< V\ IGSRV 3/$&(6 6+,)7 QRGHBNH\ (1''2

63/,7 QRGHBNH\ $7 FBVHS ,172

OBZDBNH\BVERRNBF FDUULG OBZDBNH\BVERRNBF FRQQLG OBZDBNH\BVERRNBF IOGDWH

OBZDBNH\BVERRNBF FXVWRPLG

,) OBZDBNH\BVERRNBF FRQQLG &2 VSDFH &/($5 OBZDBNH\BVERRNBF FRQQLG (1',)

,) OBZDBNH\BVERRNBF IOGDWH &2 VSDFH &/($5 OBZDBNH\BVERRNBF IOGDWH (1',)

,) OBZDBNH\BVERRNBF FXVWRPLG &2 VSDFH &/($5 OBZDBNH\BVERRNBF FXVWRPLG (1',)

029( &255(6321',1* OBZDBNH\BVERRNBF 72 ZDBVERRN *

display only booking data:

,) 127 ZDBVERRN FXVWRPLG ,6 ,1,7,$/

5($' 7$%/( LWBVFXVWRP ,172 ZDBVFXVWRP

:,7+ 7$%/( .(< LG ZDBVERRN FXVWRPLG ,) V\ VXEUF

&$// 6&5((1 67$57,1* $7

(1',1* $7 (/6(

(;,7 (1',) (/6(

(;,7 (1',)

(1'0(7+2' (1'&/$66

© SAP AG

BC412

10-24


(YHQW EORFNV

*---------------------------------------------------------------------* *

INCLUDE BC412_UDCS_EXERCISE_1E01

*

*---------------------------------------------------------------------* /2$' 2) 352*5$0 * default values for select-option: VRBFXVW ORZ

VRBFXVW KLJK

VRBFXVW VLJQ ,

VRBFXVW RSWLRQ %7 $33(1' VRBFXVW

VRBFXVW ORZ VRBFXVW KLJK

VRBFXVW VLJQ ,

VRBFXVW RSWLRQ %7 $33(1' VRBFXVW

* get initial application data: 6(/(&7 )520 VFDUU

,172 7$%/( LWBVFDUU ,) V\ VXEUF ! 0(66$*( D (1',)

6(/(&7 )520 VSIOL

,172 7$%/( LWBVSIOL ,) V\ VXEUF ! 0(66$*( D (1',)

© SAP AG

BC412

10-25


0RGXOHV

*---------------------------------------------------------------------* ***INCLUDE BC412_UDCS_EXERCISE_1O01 . *---------------------------------------------------------------------* *&--------------------------------------------------------------------* *&

Module

status_0100

OUTPUT

*&--------------------------------------------------------------------* *

set GUI for screen 0100

*---------------------------------------------------------------------* MODULE status_0100 OUTPUT. SET PF-STATUS ’STATUS_NORM_0100’. SET TITLEBAR ’TITLE_NORM_0100’. ENDMODULE.

" status_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

init_container_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create screen "frames"

*---------------------------------------------------------------------* 02'8/( LQLWBFRQWDLQHUBSURFHVVLQJB 287387 ,) UHIBFRQWBOHIW ,6 ,1,7,$/

&5($7( 2%-(&7 UHIBFRQWBULJKW (;3257,1*

UDWLR

VLGH FOBJXLBGRFNLQJBFRQWDLQHU !GRFNBDWBULJKW (;&(37,216

RWKHUV ,) V\ VXEUF 1( 0(66$*( D (1',)

&5($7( 2%-(&7 UHIBFRQWBOHIW (;3257,1*

UDWLR

VLGH FOBJXLBGRFNLQJBFRQWDLQHU !GRFNBDWBERWWRP (;&(37,216

RWKHUV ,) V\ VXEUF 1( 0(66$*( D

© SAP AG

BC412

10-26


(1',) (1',)

(1'02'8/( " init_container_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

init_dragdrop_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

creates flavor tables and retrieves handles to them

*---------------------------------------------------------------------* 02'8/( LQLWBGUDJGURSBSURFHVVLQJB 287387 ,) UHIBIODYBVUF ,6 ,1,7,$/ &5($7( 2%-(&7

UHIBIODYBVUF UHIBIODYBWUJ

&$// 0(7+2' UHIBIODYBVUF !DGG (;3257,1*

IODYRU %22.

GUDJVUF ;

GURSWDUJHW VSDFH

HIIHFW FOBGUDJGURS !FRS\ HIIHFWBLQBFWUO FOBGUDJGURS !QRQH (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBIODYBWUJ !DGG (;3257,1*

IODYRU %22.

GUDJVUF VSDFH GURSWDUJHW ;

HIIHFW FOBGUDJGURS !FRS\ HIIHFWBLQBFWUO FOBGUDJGURS !QRQH (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

© SAP AG

BC412

10-27


&$// 0(7+2' UHIBIODYBVUF !JHWBKDQGOH ,03257,1*

KDQGOH KDQGOHBVUF (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBIODYBWUJ !JHWBKDQGOH ,03257,1*

KDQGOH KDQGOHBWUJ (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) (1',) (1'02'8/( " init_dragdrop_processing_0100

© SAP AG

BC412

OUTPUT

10-28


*&--------------------------------------------------------------------* *&

Module

init_alv_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create alv object, link to container and fill with data

*---------------------------------------------------------------------* 02'8/( LQLWBDOYBSURFHVVLQJB 287387

,) UHIBDOY ,6 ,1,7,$/ " first screen processing &5($7( 2%-(&7 UHIBDOY (;3257,1*

LBSDUHQW UHIBFRQWBOHIW (;&(37,216

RWKHUV

,) V\ VXEUF ! 0(66$*( D (1',)

6(7 +$1'/(5 OFOBHYHQWBKDQGOHU !KDQGOHBRQGUDJ )25 UHIBDOY *

assign d&d-handle:

ZDBOD\RXW VBGUDJGURS URZBGGLG KDQGOHBVUF *

get content for first display:

6(/(&7 )520 VFXVWRP

,172 7$%/( LWBVFXVWRP :+(5( LG ,1 VRBFXVW ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBDOY !VHWBWDEOHBIRUBILUVWBGLVSOD\ (;3257,1*

LBVWUXFWXUHBQDPH 6&86720

LVBOD\RXW ZDBOD\RXW &+$1*,1*

LWBRXWWDE LWBVFXVWRP (;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D

© SAP AG

BC412

10-29


(1',) (/6( *

refresh grid if new customers are selected:

,) VRBFXVW>@ ! VHWBFXVWBROG 6(/(&7 )520 VFXVWRP

,172 7$%/( LWBVFXVWRP :+(5( LG ,1 VRBFXVW ,) V\ VXEUF

029( VRBFXVW>@ 72 VHWBFXVWBROG (/6(

0(66$*( L (1',)

&$// 0(7+2' UHIBDOY !UHIUHVKBWDEOHBGLVSOD\ (;&(37,216

27+(56

,) V\ VXEUF ! 0(66$*( D (1',) (1',) (1',)

(1'02'8/( " init_alv_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *&

Module

init_tree_processing_0100

OUTPUT

*&--------------------------------------------------------------------* *

create tree object, link to container and fill with data

*---------------------------------------------------------------------* 02'8/( LQLWBWUHHBSURFHVVLQJB 287387 ,) UHIBWUHHBPRGHO ,6 ,1,7,$/

&5($7( 2%-(&7 UHIBWUHHBPRGHO (;3257,1*

QRGHBVHOHFWLRQBPRGH FOBVLPSOHBWUHHBPRGHO !QRGHBVHOBPRGHBVLQJOH (;&(37,216

RWKHUV ,) V\ VXEUF ! 0(66$*( D (1',)

&$// 0(7+2' UHIBWUHHBPRGHO !FUHDWHBWUHHBFRQWURO

© SAP AG

BC412

10-30


(;3257,1*

SDUHQW UHIBFRQWBULJKW (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) *

other implementation here than in unit "Tree Control":

3(5)250 FUHDWHBQRGHBWDEOH &+$1*,1* LWBQRGHV &$// 0(7+2' UHIBWUHHBPRGHO !DGGBQRGHV (;3257,1*

QRGHBWDEOH LWBQRGHV (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&/($5 LWBQRGHV QRW QHHGHG DQ\ PRUH 6(7 +$1'/(5

OFOBHYHQWBKDQGOHU !KDQGOHBH[SDQGBQRBFKLOGUHQ )25 UHIBWUHHBPRGHO OFOBHYHQWBKDQGOHU !KDQGOHBGURS )25 UHIBWUHHBPRGHO

OFOBHYHQWBKDQGOHU !KDQGOHBQRGHBGRXEOHBFOLFN )25 UHIBWUHHBPRGHO ZDBHYHQW HYHQWLG FOBVLPSOHBWUHHBPRGHO !HYHQWLGBQRGHBGRXEOHBFOLFN ,16(57 ZDBHYHQW ,172 7$%/( LWBHYHQWV *

Tree Model Instance sets filter for event EXPAND_NO_CHILDREN!

&$// 0(7+2' UHIBWUHHBPRGHO !VHWBUHJLVWHUHGBHYHQWV (;3257,1*

HYHQWV LWBHYHQWV (;&(37,216

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',) (1',)

(1'02'8/( " init_tree_processing_0100

© SAP AG

BC412

OUTPUT

10-31


*&--------------------------------------------------------------------* *&

Module

STATUS_0200

OUTPUT

*&--------------------------------------------------------------------* *

for the ABAP list

*---------------------------------------------------------------------* MODULE status_0200 OUTPUT. SET PF-STATUS space. SET TITLEBAR ’LIST’. ENDMODULE.

" STATUS_0200

OUTPUT

*&--------------------------------------------------------------------* *&

Module

create_list_0200

OUTPUT

*&--------------------------------------------------------------------* *

creates the itenarary

*---------------------------------------------------------------------* 02'8/( FUHDWHBOLVWB 287387 68335(66 ',$/2*

/($9( 72 /,67 352&(66,1* $1' 5(7851 72 6&5((1 * customer name :5,7(

WH[W KGU &2/25 &2/B+($',1*

ZDBVFXVWRP IRUP &2/25 &2/B+($',1* ZDBVFXVWRP QDPH &2/25 &2/B+($',1* 8/,1( 6.,3

* connection data 5($' 7$%/( LWBVSIOL ,172 ZDBVSIOL

:,7+ 7$%/( .(< FDUULG ZDBVERRN FDUULG

FRQQLG ZDBVERRN FRQQLG ,) V\ VXEUF :5,7(

WH[W IOL

ZDBVSIOL FDUULG ZDBVSIOL FRQQLG 6.,3 5($' 7$%/( LWBVIOLJKW ,172 ZDBVIOLJKW

:,7+ 7$%/( .(< FDUULG ZDBVERRN FDUULG FRQQLG ZDBVERRN FRQQLG

© SAP AG

BC412

10-32


IOGDWH ZDBVERRN IOGDWH ,) V\ VXEUF :5,7(

WH[W GHS

ZDBVIOLJKW IOGDWH ZDBVSIOL GHSWLPH

ZDBVSIOL DLUSIURP DUUBGDWH ZDBVIOLJKW IOGDWH ZDBVSIOL SHULRG 6.,3

:5,7(

WH[W DUU DUUBGDWH

ZDBVSIOL DUUWLPH ZDBVSIOL DLUSWR (/6(

(;,7 (1',) (/6(

(;,7 (1',)

(1'02'8/( " create_list_0200

OUTPUT

*---------------------------------------------------------------------* ***INCLUDE BC412_UDCS_EXERCISE_1I01 . *---------------------------------------------------------------------* *&--------------------------------------------------------------------* *&

Module

exit_command_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’E’.

*---------------------------------------------------------------------* MODULE exit_command_0100 INPUT. CASE ok_code. WHEN ’CANCEL’.

" cancel current screen processing

CLEAR l_answer. CALL FUNCTION ’POPUP_TO_CONFIRM_STEP’ EXPORTING *

© SAP AG

DEFAULTOPTION

= ’Y’

BC412

10-33


textline1

= text-004

textline2

= text-005

titel

= text-006

cancel_display = ’ ’ IMPORTING answer

= l_answer.

CASE l_answer. WHEN ’J’. PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN ’N’. CLEAR ok_code. SET SCREEN sy-dynnr. ENDCASE. WHEN ’EXIT’.

" leave program

CLEAR l_answer. CALL FUNCTION ’POPUP_TO_CONFIRM_STEP’ EXPORTING *

DEFAULTOPTION

= ’Y’

textline1

= text-001

textline2

= text-002

titel

= text-003

cancel_display = ’X’ IMPORTING answer

= l_answer.

CASE l_answer. WHEN ’J’ OR ’N’.

" no data to update

PERFORM free_control_ressources. LEAVE PROGRAM. WHEN ’A’. CLEAR ok_code. SET SCREEN sy-dynnr. ENDCASE. ENDCASE. ENDMODULE.

© SAP AG

" exit_command_0100

BC412

INPUT

10-34


*&--------------------------------------------------------------------* *&

Module

user_command_0100

INPUT

*&--------------------------------------------------------------------* *

Implementation of user commands of type ’ ’:

*

- push buttons on the screen

*

- GUI functions

*---------------------------------------------------------------------* MODULE user_command_0100 INPUT. copy_ok_code = ok_code. CLEAR ok_code. CASE copy_ok_code. :+(1 81'2

,) 127 XQGRBQRGHBNH\ ,6 ,1,7,$/ &/($5 OBDQVZHU

&$// )81&7,21 32383B72B&21),50B67(3

(;3257,1* *

DEFAULTOPTION

= ’Y’

WH[WOLQH WH[W *

TEXTLINE2

=

WLWHO WH[W FDQFHOBGLVSOD\

,03257,1*

DQVZHU OBDQVZHU ,) OBDQVZHU -

&$// 0(7+2' UHIBWUHHBPRGHO !GHOHWHBQRGH (;3257,1*

QRGHBNH\ XQGRBQRGHBNH\ (;&(37,216

QRGHBQRWBIRXQG

27+(56 ,) V\ VXEUF ! 0(66$*( D (1',)

&/($5 XQGRBQRGHBNH\ (1',) (1',)

WHEN ’BACK’. CLEAR l_answer. CALL FUNCTION ’POPUP_TO_CONFIRM_STEP’

© SAP AG

BC412

10-35


EXPORTING *

DEFAULTOPTION

= ’Y’

textline1

= text-004

textline2

= text-005

titel

= text-007

cancel_display = ’ ’ IMPORTING answer

= l_answer.

CASE l_answer. WHEN ’J’. PERFORM free_control_ressources. LEAVE TO SCREEN 0. WHEN ’N’. SET SCREEN sy-dynnr. ENDCASE. WHEN OTHERS. ENDCASE. ENDMODULE.

" user_command_0100

INPUT

*&--------------------------------------------------------------------* *&

Module

USER_COMMAND_0200

INPUT

*&--------------------------------------------------------------------* *

back to screen 100

*---------------------------------------------------------------------* 02'8/( XVHUBFRPPDQGB ,1387 FRS\BRNBFRGH RNBFRGH &/($5 RNBFRGH

(1'02'8/( 86(5B&200$1'B ,1387

6XEURXWLQHV

*---------------------------------------------------------------------* ***INCLUDE BC412_UDCS_EXERCISE_1F01 . *---------------------------------------------------------------------* *&--------------------------------------------------------------------* *&

Form

free_control_ressources

*&--------------------------------------------------------------------* *

free all control related ressources

*---------------------------------------------------------------------* )250 IUHHBFRQWUROBUHVVRXUFHV

© SAP AG

BC412

10-36


&$// 0(7+2'

UHIBFRQWBOHIW !IUHH

UHIBFRQWBULJKW !IUHH )5((

UHIBDOY

UHIBWUHHBPRGHO UHIBFRQWBOHIW

UHIBFRQWBULJKW

(1')250 " free_control_ressources *---------------------------------------------------------------------* *

FORM create_node_table

*

*---------------------------------------------------------------------* *

build up a hierarchy consisting of

*

*

carriers, connections and flight dates

*

*---------------------------------------------------------------------* *

-->

P_IT_NODES

*

*---------------------------------------------------------------------* )250 FUHDWHBQRGHBWDEOH &+$1*,1* SBLWBQRGHV /,.( LWBQRGHV '$7$

OBZDBQRGH /,.( /,1( 2) SBLWBQRGHV GDWHBWH[W 7<3( F

OBZDBQRGH QRGHBNH\ 5227 OBZDBQRGH LVIROGHU ; OBZDBQRGH H[SDQGHU ;

OBZDBQRGH WH[W WH[W FDU

,16(57 OBZDBQRGH ,172 7$%/( SBLWBQRGHV * scarr-nodes: &/($5 OBZDBQRGH

/223 $7 LWBVFDUU ,172 ZDBVFDUU &/($5 OBZDBQRGH

OBZDBQRGH QRGHBNH\ ZDBVFDUU FDUULG OBZDBQRGH UHODWNH\ 5227

OBZDBQRGH UHODWVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG OBZDBQRGH LVIROGHU ; OBZDBQRGH H[SDQGHU ;

OBZDBQRGH WH[W ZDBVFDUU FDUUQDPH

© SAP AG

BC412

10-37


,16(57 OBZDBQRGH ,172 7$%/( SBLWBQRGHV (1'/223

* spfli-nodes: &/($5 OBZDBQRGH

/223 $7 LWBVSIOL ,172 ZDBVSIOL &/($5 OBZDBQRGH

&21&$7(1$7( ZDBVSIOL FDUULG ZDBVSIOL FRQQLG

,172 OBZDBQRGH QRGHBNH\ 6(3$5$7(' %<

OBZDBQRGH UHODWNH\ ZDBVSIOL FDUULG

OBZDBQRGH UHODWVKLS FOBVLPSOHBWUHHBPRGHO !UHODWBODVWBFKLOG OBZDBQRGH LVIROGHU ; OBZDBQRGH H[SDQGHU ; &21&$7(1$7( ZDBVSIOL FDUULG ZDBVSIOL FRQQLG

ZDBVSIOL FLW\IURP !

ZDBVSIOL FLW\WR

,172 OBZDBQRGH WH[W 6(3$5$7(' %< VSDFH

,16(57 OBZDBQRGH ,172 7$%/( SBLWBQRGHV (1'/223

(1')250 " CREATE_NODE_TABLE

© SAP AG

BC412

10-38


$SSHQGL[

&RQWHQWV l ,QIRUPDWLRQ DERXW WKH JOREDO FODVVHV XVHG LQ %& l 7DEOH RI FRQWHQWV

 SAP AG 2002

© SAP AG

BC412

11-1


,QIRUPDWLRQ RQ WKH *OREDO &ODVVHV RI %&

&RQWHQW

This appendix describes the global classes used in the demo programs of training course BC412. Class &/B%& B3,&785(B illustrates the use of context menus while classes &/B%& B0$33,1*B B B75(( and &/B%& B)/,*+7B,1)2B75(( are implementations of the flight booking tree ZLWKRXW using tree model classes. That is, the latter two demos are programming models for SAP Basis Releases 4.6A and 4.6B. From 4.6C onwards, use the much simpler process involving the tree model classes described in the appropriate chapter.

2YHUYLHZ 1.

2.

3.

4.

Information on the Global Classes of BC412 1.1

Content

1.2.

Overview

Global Class CL_BC412_PICTURE_1 2.1

General Description

2.2

Interface 2.2.1

The Method Constructor

2.2.2

The Method FREE

2.2.3

The Event PICTURE_CLICK

2.3

Context Menus of the Picture Control

2.4

Definition of the Class

2.5

Implementation of the Class

Global Class CL_BC412_MAPPING_4_2_TREE 3.1

General Description

3.2

Interface 3.2.1

The Method INSERT_BUSINESS_KEY

3.2.2

The Method DELETE_BUSINESS_KEY

3.2.3

The Method DELETE_TECHNICAL_KEY

3.2.4

The Method GET_BUSINESS_KEY

3.2.5

The Method GET_TECHNICAL_KEY

3.3

Definition of the Class

3.4

Implementation of the Class

Global Class CL_BC412_FLIGHT_INFO_TREE1 4.1

General Description

4.2

Interface

Š SAP AG

4.2.1

The Method CONSTRUCTOR

4.2.2

The Method FREE

4.2.3

The Method GET_SCARR_DETAILS

4.2.4

The Method GET_SPFLI_DETAILS

4.2.5

The Method GET_SFLIGHT_DETAILS

4.2.6

The Method GET_SBOOK_DETAILS

BC412

11-2


5.

4.2.7

The Method GET_SCUSTOM_DETAILS

4.2.8

The Event NODE_DOUBLE_CLICK

4.3

Data, Methods, and Events Used Internally in the Class

4.4

Definition of the Class

4.5

Implementation of the Class

Global Data Types Used in the ABAP Dictionary 5.1

5.2

Table Types 5.1.1

BC412_FUNCTION_ITT

5.1.2

BC412_MAP_HASH1

5.1.3

BC412_MAP_HASH1

5.1.4

BC412_SBOOK_ITT

5.1.5

BC412_SBOOK_NODE_ITT

5.1.6

BC412_SCARR_ITT

5.1.7

BC412_SUSTOM_ITT

5.1.8

BC412_SFLIGHT_ITT

5.1.9

BC412_SPFLI_ITT

Structure Types 5.2.1

5.3

BC412_SIM_TREE_NODE_STRUC

Data Elements

*OREDO &ODVV &/B%& B3,&785(B *HQHUDO 'HVFULSWLRQ

The global class &/B%& B3,&785(B is an example of a "wrapper" of a Picture Control instance that has a context menu. Using the options of the context menu, you can determine the display mode (attribute ',63/$<B02'() of the Picture Control instance. Setting up the context menu and responding to an option chosen is handled independently by each instance. The class has been designed as an example of handling context menus.

,QWHUIDFH

The class has two methods - the &216758&725 and the method )5(( – and the event 3,&785(B&/,&.. With the constructor, you pass the container reference, the URL of the image to be loaded, and texts to be displayed in the context menu. In addition, you can control if you want to handle the event 3,&785(B&/,&. or not. Using method )5(( you can release the resources of your Picture Control instance at the front-end. The event 3,&785(B&/,&. is triggered if you click the object displayed in the frontend control.

The Method Constructor The constructor has the following interface: &5($7( 2%-(&7 REMHFW (;3257,1*

LBSDUHQW YDULDEOHB

LBXUO YDULDEOHB

LBSLFWXUHBFOLFN YDULDEOHB LBDSSOBHYHQWBSF YDULDEOHB

Š SAP AG

BC412

11-3


LBVWUHWFKBWH[W YDULDEOHB

LBILWBWH[W YDULDEOHB

LBQRUPDOBWH[W YDULDEOHB

LBILWBFHQWHUBWH[W YDULDEOHB

LBQRUPDOBFHQWHUBWH[W YDULDEOHB (;&(37,216

SLFWXUHBHUURU YDOXHB

SLFWXUHBORDGBHUURU YDOXHB

The interface parameters have the following meaning: 3DUDPHWHU QDPH

0HDQLQJ

LBSDUHQW

Container reference You use this parameter to pass a container reference. The Picture Control instance is displayed in the corresponding container instance.

LBXUO

URL of the object to be displayed You use this parameter to pass the URL of the object to be displayed in the Picture Control (image in file format GIF, JPEG, BMP or SAP icon).

LBSLFWXUHBFOLFN

Flag variable: Registering the event 3,&785(B&/,&. You use this parameter to determine if the event 3,&785(B&/,&. of the Picture Control instance is to be registered at the Control Framework. To assign a value to this parameter, you use the class constants &B758( and

&B)$/6(.

LBSLFWXUHBFOLFN FOBEF BSLFWXUHB !FBWUXH : The event 3,&785(B&/,&. is registered at the CFW. LBSLFWXUHBFOLFN FOBEF BSLFWXUHB !FBIDOVH: The event 3,&785(B&/,&. is not registered at the CFW.

LBDSSOBHYHQWBSF

Registering 3,&785(B&/,&. as an application event or as a system event LBDSSOBHYHQWBSF FOBEF BSLFWXUHB !FBWUXH: Application event

LBDSSOBHYHQWBSF FOBEF BSLFWXUHB !FBIDOVH: System event

It only makes sense to assign a value to parameter LBDSSOBHYHQWBSF if event 3,&785(B&/,&. is registered (see parameter LBSLFWXUHBFOLFN)

LBVWUHWFKBWH[W

Text displayed in the context menu for the display mode

',63/$<B02'(B675(7&+

LBILWBWH[W

Text displayed in the context menu for the display mode ',63/$<B02'(B),7

LBQRUPDOBWH[W

Text displayed in the context menu for the display mode

',63/$<B02'(B1250$/

LBILWBFHQWHUBWH[W

Text displayed in the context menu for the display mode

LBQRUPDOBFHQWHUBWH[W

',63/$<B02'(B),7B&(17(5

Text displayed in the context menu for the display mode

',63/$<B02'(B1250$/B&(17(5

The exceptions have the following meaning: 3DUDPHWHU QDPH

0HDQLQJ

SLFWXUHBHUURU

Error creating the Picture Control instance

SLFWXUHBORDGBHUURU

Error loading the data object to be displayed

Š SAP AG

BC412

11-4


The Method FREE The method )5(( releases all resources used by the instantiated control at the front-end. The only interface parameter is the exception 3,&785(B(5525 which indicates that an internal error occurred while the system tried to access the object.

The Event PICTURE_CLICK The event 3,&785(B&/,&. is triggered if the mouse has been clicked in the data object (image) displayed. The parameters 0286(B326B; and 0286(B326B< contain the coordinates of the pixel on which the cursor was positioned at the time the mouse was clicked.

&RQWH[W 0HQXV RI WKH 3LFWXUH &RQWURO

The class &/B%& B3,&785(B supports a context menu for the "wrapped" Picture Control instance. The following steps are required: •

In the constructor, the events &217(;7B0(18 and 0(18B6(/(&7(' of the Picture Control instance are registered at the Control Framework (6(7B5(*,67(5('B(9(176). The methods 21B&217(;7B0(18 and 21B&217(;7B0(18B6(/(&7(' (visibility 3527(&7(') of the class &/B%& B3,&785(B are registered as the handling methods on the ABAP side.

The context menu is set up dynamically. This means that the system does not generate a static program object (= an interface status of type &217(;7B0(18 must be created in the Screen Painter), but sets up the context menu (function codes + menu texts) at runtime (if requested by the user). Since the function codes and the texts displayed in the menu should always be the same, an internal table (instance attribute ,7B)81&7,21

with the menu texts and associated function codes is set up in the constructor.

If a user requests a context menu on the Picture Control instance, the control triggers the event

&217(;7B0(18. As a result of the two registration steps, the method 21B&217(;7B0(18 is called.

In the method 21B&217(;7B0(18, an instance of the type &/B&70(18 is created (&5($7( 2%-(&7). 3OHDVH QRWH that, for all other EnjoySAP controls, you do not need to create the context menu instance explicitly. All other EnjoySAP controls create a context menu object LQGHSHQGHQWO\, and pass a reference to this context menu instance through the event interface when the event &217(;7B0(18 is triggered. The options for the menu are sent to the context menu instance (function codes and menu texts are sent using the internal table ,7B)81&7,21). You then send the context menu object to the Picture Control instance by calling the method ',63/$<B&217(;7B0(18 of your Picture Control instance. Using the interface of the method, you pass the reference to the context menu object.

If a user chooses a context menu option, the relevant control triggers the event &217(;7B0(18B6(/(&7('. The function code of the function chosen (parameter )&2'() and a reference to the sending object (parameter 6(1'(5; this parameter is not explicitly contained in the interface and is generally transferred for ABAP Objects events) are provided through the interface. As a result of the two registration steps, the method 21B&217(;7B0(18B6(/(&7(' is called.

In the method 21B&217(;7B0(18B6(/(&7(', the value of the attribute ',63/$<B02'( of the Picture Control instance is determined based on the function code ()&2'() transmitted. This value is then passed to the Picture Control instance using the method 6(7B',63/$<B02'(

'HILQLWLRQ RI WKH &ODVV

W\SH SRROV 7<3( 322/6

FQWO 7\SH GHILQLWLRQV XVHG E\ WKH &RQWURO )UDPHZRUN

&/$66 &/B%& B3,&785(B '(),1,7,21

© SAP AG

BC412

11-5


&/$66 FOBEF BSLFWXUHB '(),1,7,21 38%/,& ),1$/

&5($7( 38%/,&

SXEOLF FRPSRQHQWV RI FODVV &/B%& B3,&785(B

38%/,& 6(&7,21

FRQVWDQWV

&2167$176

FBWUXH 7<3( EF BWH[W 9$/8( ;

FBIDOVH 7<3( EF BWH[W 9$/8( HYHQWV

(9(176

SLFWXUHBFOLFN (;3257,1*

YDOXH PRXVHBSRVB[ 7<3( L

YDOXH PRXVHBSRVB\ 7<3( L PHWKRGV 0(7+2'6

FRQVWUXFWRU

,03257,1*

LBSDUHQW 7<3( 5() 72 FOBJXLBFRQWDLQHU

YDOXH LBXUO 7<3( VBXUO

YDOXH LBSLFWXUHBFOLFN 7<3( EF BWH[W '()$8/7 ;

YDOXH LBDSSOBHYHQWBSF 7<3( EF BWH[W '()$8/7 ;

YDOXH LBVWUHWFKBWH[W 7<3( JXLBWH[W '()$8/7 675(7&+

YDOXH LBILWBWH[W 7<3( JXLBWH[W '()$8/7 ),7

YDOXH LBQRUPDOBWH[W 7<3( JXLBWH[W '()$8/7 1250$/

YDOXH LBILWBFHQWHUBWH[W 7<3( JXLBWH[W '()$8/7 ),7B&(17(5

YDOXH LBQRUPDOBFHQWHUBWH[W 7<3( JXLBWH[W '()$8/7 1250$/B&(17(5

(;&(37,216

SLFWXUHBHUURU

SLFWXUHBORDGBHUURU

IUHH

(;&(37,216

SLFWXUHBHUURU

© SAP AG

BC412

11-6


SURWHFWHG FRPSRQHQWV RI FODVV &/B%& B3,&785(B

3527(&7(' 6(&7,21

LQVWDQFH DWWULEXWHV '$7$

FRQWH[WBPHQXBUHI 7<3( 5() 72 FOBFWPHQX

SLFWXUHBUHI 7<3( 5() 72 FOBJXLBSLFWXUH XUO 7<3( VBXUO

LWBIXQFWLRQ 7<3( EF BIXQFWLRQBLWW PHWKRGV 0(7+2'6

RQBSLFWXUHBFOLFN

)25 (9(17 SLFWXUHBFOLFN 2) FOBJXLBSLFWXUH ,03257,1* VHQGHU

PRXVHBSRVB[

PRXVHBSRVB\

RQBFRQWH[WBPHQX

)25 (9(17 FRQWH[WBPHQX 2) FOBJXLBSLFWXUH ,03257,1*

VHQGHU

RQBFRQWH[WBPHQXBVHOHFWHG

)25 (9(17 FRQWH[WBPHQXBVHOHFWHG 2) FOBJXLBSLFWXUH ,03257,1* IFRGH

VHQGHU

,PSOHPHQWDWLRQ RI WKH &ODVV 0(7+2' FRQVWUXFWRU ORFDO GDWD '$7$

OBHYHQWV 7<3( FQWOBVLPSOHBHYHQWV OBZDBHYHQWV /,.( /,1( 2) OBHYHQWV

ZDBIXQFWLRQ /,.( /,1( 2) LWBIXQFWLRQ FUHDWH SLFWXUH REMHFW

&5($7( 2%-(&7 SLFWXUHBUHI (;3257,1*

© SAP AG

BC412

11-7


/,)(7,0(

6+(//67</(

SDUHQW LBSDUHQW (;&(37,216

HUURU ,) V\ VXEUF 1(

5$,6( SLFWXUHBHUURU (1',)

VHQG SLFWXUH WR SLFWXUH FRQWURO

&$// 0(7+2' SLFWXUHBUHI !ORDGBSLFWXUHBIURPBXUO (;3257,1*

XUO LBXUO 5(68/7 (;&(37,216

HUURU ,) V\ VXEUF 1(

5$,6( SLFWXUHBORDGBHUURU (1',)

UHJLVWHU HYHQWV

,) LBSLFWXUHBFOLFN FBWUXH SLFWXUHBFOLFN

OBZDBHYHQWV HYHQWLG FOBJXLBSLFWXUH !HYHQWLGBSLFWXUHBFOLFN

OBZDBHYHQWV DSSOBHYHQW LBDSSOBHYHQWBSF ,16(57 OBZDBHYHQWV ,172 7$%/( OBHYHQWV (1',)

FRQWH[WBPHQX

OBZDBHYHQWV HYHQWLG FOBJXLBSLFWXUH !HYHQWLGBFRQWH[WBPHQX

OBZDBHYHQWV DSSOBHYHQW

,16(57 OBZDBHYHQWV ,172 7$%/( OBHYHQWV FRQWH[WBPHQXBVHOHFWHG

OBZDBHYHQWV HYHQWLG

FOBJXLBSLFWXUH !HYHQWLGBFRQWH[WBPHQXBVHOHFWHG

OBZDBHYHQWV DSSOBHYHQW

,16(57 OBZDBHYHQWV ,172 7$%/( OBHYHQWV &$// 0(7+2' SLFWXUHBUHI !VHWBUHJLVWHUHGBHYHQWV (;3257,1*

HYHQWV OBHYHQWV (;&(37,216

FQWOBHUURU

FQWOBV\VWHPBHUURU

© SAP AG

BC412

11-8


LOOHJDOBHYHQWBFRPELQDWLRQ ,) V\ VXEUF 1( WR LPSOHPHQW (1',)

6(7 +$1'/(5 RQBSLFWXUHBFOLFN )25 SLFWXUHBUHI 6(7 +$1'/(5 RQBFRQWH[WBPHQX )25 SLFWXUHBUHI 6(7 +$1'/(5 RQBFRQWH[WBPHQXBVHOHFWHG )25 SLFWXUHBUHI VWRUH XUO RI SLFWXUH XUO LBXUO

FRQVWUXFW FRQWH[W PHQX IXQFWLRQV LQ LWBIXQFWLRQV ZDBIXQFWLRQ IFRGH 675(7&+

ZDBIXQFWLRQ WH[W LBVWUHWFKBWH[W

,16(57 ZDBIXQFWLRQ ,172 7$%/( LWBIXQFWLRQ ZDBIXQFWLRQ IFRGH ),7

ZDBIXQFWLRQ WH[W LBILWBWH[W

,16(57 ZDBIXQFWLRQ ,172 7$%/( LWBIXQFWLRQ ZDBIXQFWLRQ IFRGH 1250$/

ZDBIXQFWLRQ WH[W LBQRUPDOBWH[W

,16(57 ZDBIXQFWLRQ ,172 7$%/( LWBIXQFWLRQ ZDBIXQFWLRQ IFRGH ),7B&(17(5

ZDBIXQFWLRQ WH[W LBILWBFHQWHUBWH[W

,16(57 ZDBIXQFWLRQ ,172 7$%/( LWBIXQFWLRQ ZDBIXQFWLRQ IFRGH 1250$/B&(17(5

ZDBIXQFWLRQ WH[W LBQRUPDOBFHQWHUBWH[W

,16(57 ZDBIXQFWLRQ ,172 7$%/( LWBIXQFWLRQ (1'0(7+2'

0(7+2' IUHH

&$// 0(7+2' SLFWXUHBUHI !IUHH (;&(37,216

FQWOBHUURU

FQWOBV\VWHPBHUURU ,) V\ VXEUF 1(

5$,6( SLFWXUHBHUURU (1',)

(1'0(7+2'

© SAP AG

BC412

11-9


0(7+2' RQBSLFWXUHBFOLFN

5$,6( (9(17 SLFWXUHBFOLFN (;3257,1*

PRXVHBSRVB[ PRXVHBSRVB[

PRXVHBSRVB\ PRXVHBSRVB\ (1'0(7+2'

0(7+2' RQBFRQWH[WBPHQX ORFDO GDWD

'$7$ ZDBIXQFWLRQ /,.( /,1( 2) LWBIXQFWLRQ FUHDWH FRQWH[W PHQX REMHFW

&5($7( 2%-(&7 FRQWH[WBPHQXBUHI FUHDWH G\QDPLF FRQWH[W PHQX

/223 $7 LWBIXQFWLRQ ,172 ZDBIXQFWLRQ

&$// 0(7+2' FRQWH[WBPHQXBUHI !DGGBIXQFWLRQ (;3257,1*

IFRGH ZDBIXQFWLRQ IFRGH

WH[W ZDBIXQFWLRQ WH[W (1'/223

GLVSOD\ FRQWH[W PHQX

&$// 0(7+2' VHQGHU !GLVSOD\BFRQWH[WBPHQX (;3257,1*

FRQWH[WBPHQX FRQWH[WBPHQXBUHI (;&(37,216

HUURU )5(( FRQWH[WBPHQXBUHI (1'0(7+2'

0(7+2' RQBFRQWH[WBPHQXBVHOHFWHG ORFDO GDWD

'$7$ OBGLVSOD\BPRGH 7<3( L &$6( IFRGH

:+(1 675(7&+

© SAP AG

BC412

11-10


OBGLVSOD\BPRGH FOBJXLBSLFWXUH !GLVSOD\BPRGHBVWUHWFK

:+(1 ),7

OBGLVSOD\BPRGH FOBJXLBSLFWXUH !GLVSOD\BPRGHBILW :+(1 1250$/

OBGLVSOD\BPRGH FOBJXLBSLFWXUH !GLVSOD\BPRGHBQRUPDO

:+(1 ),7B&(17(5

OBGLVSOD\BPRGH FOBJXLBSLFWXUH !GLVSOD\BPRGHBILWBFHQWHU

:+(1 1250$/B&(17(5

OBGLVSOD\BPRGH FOBJXLBSLFWXUH !GLVSOD\BPRGHBQRUPDOBFHQWHU

(1'&$6(

&$// 0(7+2' VHQGHU !VHWBGLVSOD\BPRGH (;3257,1*

GLVSOD\BPRGH OBGLVSOD\BPRGH (;&(37,216

HUURU ,) V\ VXEUF 1( 5$,6( HUURU (1',)

(1'0(7+2'

*OREDO &ODVV &/B%& B0$33,1*B B B75(( *HQHUDO 'HVFULSWLRQ

The global class &/B%& B0$33,1*B B B75(( is used as an auxiliary class for instances of the class &/B%& B)/,*+7B,1)2B75((B in training course BC412. The class &/B%& B0$33,1*B B B75(( illustrates key mapping (key of the application tables displayed in the tree ÄÅ node key). The instances of the class encapsulate two hash tables that implement key access to the logical mapping table in a manner favorable to performance (constant access time). Entries in the hash tables are generated by passing an application key using the method ,16(57B%86,1(66B.(<. The instance subsequently assigns a technical node key and maintains both hash tables simultaneously. The node keys are assigned as values of a counter (which is managed by the object). The class implements the one-to-one mapping of a key with at most four components to the node keys.

,QWHUIDFH

The class has methods for creating key pairs (,16(57B%86,1(66B.(<), for managing key pairs ('(/(7(B%86,1(66B.(<, '(/(7(B7(&+1,&$/B.(<), and for determining the key partner (*(7B%86,1(66B.(<, *(7B7(&+1,&$/B.(<).

The Method INSERT_BUSINESS_KEY The method creates a node key for the application key passed. &$// 0(7+2' LQVHWBEXVLQHVVBNH\

© SAP AG

BC412

11-11


(;3257,1*

LBENH\ YDULDEOH

LBENH\ YDULDEOH

LBENH\ YDULDEOH

LBENH\ YDULDEOH ,03257,1*

HBWNH\ YDULDEOH (;&(37,216

LQWHUQDOBHUURU YDOXH

WHFNH\BRYHUIORZ YDOXH

LQYDOLGBEXVNH\ YDOXH

The interface parameters have the following meaning: 3DUDPHWHU QDPH

LBENH\

0HDQLQJ First key component of the application key From a semantic point of view, this component has the meaning of an airline ID.

LBENH\

Second key component of the application key From a semantic point of view, this component has the meaning of an airline connection number.

LBENH\

Third key component of the application key From a semantic point of view, this component has the meaning of a flight date.

LBENH\

Fourth key component of the application key From a semantic point of view, this component has the meaning of a booking number for a flight booking.

LBWNH\

Node key returned

The exceptions have the following meaning: 3DUDPHWHU QDPH

0HDQLQJ

LQWHUQDOBHUURU

Error accessing the hash table

WHFNH\BRYHUIORZ

Maximum node key that can be assigned has already been assigned

LQYDOLGBEXVNH\

Application key passed already has a node key

The Method DELETE_BUSINESS_KEY The method '(/(7(B%86,1(66B.(< has one predefined interface (sample), but no implementation (which must be added as required).

The Method DELETE_TECHNICAL_KEY The method '(/(7(B7(&+1,&$/B.(< has one predefined interface (sample), but no implementation (which must be added as required).

The Method GET_BUSINESS_KEY The method *(7B%86,1(66B.(< returns the application key for the node key passed. The interface parameters have the following meaning:

Š SAP AG

BC412

11-12


3DUDPHWHU QDPH

0HDQLQJ

LBWNH\

Node key returned

LBENH\

First key component of the application key From a semantic point of view, this component has the meaning of an airline ID.

LBENH\

Second key component of the application key From a semantic point of view, this component has the meaning of an airline connection number.

LBENH\

Third key component of the application key From a semantic point of view, this component has the meaning of a flight date.

LBENH\

Fourth key component of the application key From a semantic point of view, this component has the meaning of a booking number for a flight booking.

The exceptions have the following meaning: 3DUDPHWHU QDPH

LQYDOLGBWHFNH\

0HDQLQJ Node key passed does not exist.

The Method GET_TECHNICAL_KEY The method *(7B7(&+1,&$/B.(< returns the node key for the application key passed. The interface parameters have the following meaning: 3DUDPHWHU QDPH

LBENH\

0HDQLQJ First key component of the application key From a semantic point of view, this component has the meaning of an airline ID.

LBENH\

Second key component of the application key From a semantic point of view, this component has the meaning of an airline connection number.

LBENH\

Third key component of the application key From a semantic point of view, this component has the meaning of a flight date.

LBENH\

Fourth key component of the application key From a semantic point of view, this component has the meaning of a booking number for a flight booking.

LBWNH\

Node key returned

The exceptions have the following meaning: 3DUDPHWHU QDPH

LQYDOLGBEXVNH\

Š SAP AG

0HDQLQJ Application key passed does not exist.

BC412

11-13


'HILQLWLRQ RI WKH &ODVV

&/$66 &/B%& B0$33,1*B B B75(( '(),1,7,21

&/$66 FOBEF BPDSSLQJB B BWUHH '(),1,7,21 38%/,& ),1$/

&5($7( 38%/,&

SXEOLF FRPSRQHQWV RI FODVV &/B%& B0$33,1*B B B75((

38%/,& 6(&7,21

PHWKRGV

0(7+2'6

LQVHUWBEXVLQHVVBNH\ ,03257,1*

YDOXH LBENH\ 7<3( VBFDUUBLG

YDOXH LBENH\ 7<3( VBFRQQBLG YDOXH LBENH\ 7<3( VBGDWH

YDOXH LBENH\ 7<3( VBERRNBLG (;3257,1*

YDOXH HBWNH\ 7<3( WYBQRGHNH\ (;&(37,216

LQWHUQDOBHUURU

WHFNH\BRYHUIORZ

LQYDOLGBEXVNH\

GHOHWHBEXVLQHVVBNH\ ,03257,1*

YDOXH LBENH\ 7<3( VBFDUUBLG

YDOXH LBENH\ 7<3( VBFRQQBLG YDOXH LBENH\ 7<3( VBGDWH

YDOXH LBENH\ 7<3( VBERRNBLG (;3257,1*

YDOXH HBWNH\ 7<3( WYBQRGHNH\ (;&(37,216

LQYDOLGBEXVNH\

GHOHWHBWHFKQLFDOBNH\ ,03257,1*

© SAP AG

BC412

11-14


YDOXH LBWNH\ 7<3( WYBQRGHNH\ (;3257,1*

YDOXH HBENH\ 7<3( VBFDUUBLG

YDOXH HBENH\ 7<3( VBFRQQBLG YDOXH HBENH\ 7<3( VBGDWH

YDOXH HBENH\ 7<3( VBERRNBLG (;&(37,216

LQYDOLGBWHFNH\

JHWBEXVLQHVVBNH\ ,03257,1*

YDOXH LBWNH\ 7<3( WYBQRGHNH\ (;3257,1*

YDOXH HBENH\ 7<3( VBFDUUBLG

YDOXH HBENH\ 7<3( VBFRQQBLG YDOXH HBENH\ 7<3( VBGDWH

YDOXH HBENH\ 7<3( VBERRNBLG (;&(37,216

LQYDOLGBWHFNH\

JHWBWHFKQLFDOBNH\ ,03257,1*

YDOXH LBENH\ 7<3( VBFDUUBLG

YDOXH LBENH\ 7<3( VBFRQQBLG YDOXH LBENH\ 7<3( VBGDWH

YDOXH LBENH\ 7<3( VBERRNBLG (;3257,1*

YDOXH HBWNH\ 7<3( WYBQRGHNH\ (;&(37,216

LQYDOLGBEXVNH\

SURWHFWHG FRPSRQHQWV RI FODVV &/B%& B0$33,1*B B B75((

3527(&7(' 6(&7,21

W\SHV 7<3(6

EXVNH\B 7<3( VBFDUUBLG

EXVNH\B 7<3( VBFRQQBLG EXVNH\B 7<3( VBGDWH

EXVNH\B 7<3( VBERRNBLG

WHFNH\ 7<3( WYBQRGHNH\

© SAP AG

BC412

11-15


LQVWDQFH DWWULEXWHV '$7$

PDS 7<3( EF BPDSBKDVK

PDS 7<3( EF BPDSBKDVK

SULYDWH FRPSRQHQWV RI FODVV &/B%& B0$33,1*B B B75((

35,9$7( 6(&7,21

LQVWDQFH DWWULEXWHV '$7$

FRXQWHU 7<3( L

,PSOHPHQWDWLRQ RI WKH &ODVV

0(7+2' LQVHUWBEXVLQHVVBNH\ ORFDO GDWD

'$7$ ZDBPDS 7<3( EF BPDSBOLQHW\SH H[LVWHQFH FKHFN YDOLG NH\

5($' 7$%/( PDS :,7+ 7$%/( .(< ENH\ LBENH\

ENH\ LBENH\

ENH\ LBENH\

ENH\ LBENH\

75$163257,1* 12 ),(/'6 ,) V\ VXEUF (4 HQWU\ H[LVWV DOUHDG\

5$,6( LQYDOLGBEXVNH\ (1',)

FKHFN IRU RYHUIORZ RI HBWNH\ ,) FRXQWHU *( 5$,6( WHFNH\BRYHUIORZ (1',)

QRWH PD[LPXP QXPEHU WR EH KDGOHG UHVWULFWHG E\ GDWD W\SH RI

WYBQRGHNH\ &+$5

FUHDWH QHZ HQWU\

$'' 72 FRXQWHU

ZDBPDS ENH\ LBENH\

ZDBPDS ENH\ LBENH\

ZDBPDS ENH\ LBENH\

© SAP AG

BC412

11-16


ZDBPDS ENH\ LBENH\

ZDBPDS WNH\ FRXQWHU

HBWNH\ FRXQWHU UHWXUQ WHFKQLFDO NH\

,16(57 ZDBPDS ,172 7$%/( PDS ,) V\ VXEUF 1(

5$,6( LQWHUQDOBHUURU (1',)

,16(57 ZDBPDS ,172 7$%/( PDS ,) V\ VXEUF 1(

5$,6( LQWHUQDOBHUURU (1',)

(1'0(7+2' 0(7+2' GHOHWHBEXVLQHVVBNH\ WR EH LPSOHPHQWHG (1'0(7+2'

0(7+2' GHOHWHBWHFKQLFDOBNH\ WR EH LPSOHPHQWHG (1'0(7+2'

0(7+2' JHWBEXVLQHVVBNH\ ORFDO GDWD

'$7$ ZDBPDS 7<3( EF BPDSBOLQHW\SH UHDG HQWU\

5($' 7$%/( PDS ,172 ZDBPDS :,7+ 7$%/( .(< WNH\ LBWNH\

,) V\ VXEUF 1(

5$,6( LQYDOLGBWHFNH\ (1',)

HBENH\ ZDBPDS ENH\ UHWXUQ EXVLQHVV NH\

HBENH\ ZDBPDS ENH\ UHWXUQ EXVLQHVV NH\

HBENH\ ZDBPDS ENH\ UHWXUQ EXVLQHVV NH\

© SAP AG

BC412

11-17


HBENH\ ZDBPDS ENH\ UHWXUQ EXVLQHVV NH\

(1'0(7+2' 0(7+2' JHWBWHFKQLFDOBNH\ ORFDO GDWD

'$7$ ZDBPDS 7<3( EF BPDSBOLQHW\SH UHDG HQWU\

5($' 7$%/( PDS ,172 ZDBPDS :,7+ 7$%/( .(< ENH\ LBENH\

ENH\ LBENH\

ENH\ LBENH\

ENH\ LBENH\ ,) V\ VXEUF 1(

5$,6( LQYDOLGBEXVNH\ (1',)

HBWNH\ ZDBPDS WNH\ UHWXUQ WHFKQLFDO NH\

(1'0(7+2'

*OREDO &ODVV &/B%& B)/,*+7B,1)2B75(( *HQHUDO 'HVFULSWLRQ The class CL_BC412_FLIGHT_INFO_TREE1 presents data of the flight data model (tables SCARR, SPFLI, SFLIGHT, SBOOK) by means of a Simple Tree instance in a hierarchical structure. The instances of the class collect the data (by means of incremental database accesses) (data is read if a user requests data for a node for the first time) and manage the application data read in internal tables. The class provides instance methods with which the users of the class can query the application data for a node. The read depth in the hierarchy can be determined using a parameter passed with the constructor.

,QWHUIDFH The class has: •

A constructor

The method FREE to release the resources used by the control at the front-end

Methods to query application data for a node

The event node_double_click which is triggered when a node is double-clicked.

© SAP AG

BC412

11-18


The Method CONSTRUCTOR You use the constructor to generate a Tree Control instance for which you create a root node (text: airlines), register events at the CFW and store texts required in the tree. In addition, the constructor instantiates an object of class CL_BC412_MAPPING_4_2_TREE. Through the interface of the constructor, you pass a container reference (i_container) and three texts, including the text for the root node (I_ROOT_NODE_TEXT) and texts used in the nodes for table SFLIGHT (I_FLIGHT_NODE_TEXT1, I_FLIGHT_NODE_TEXT2). You can use the parameters I_NODE_DOUBLE_CLICK and I_APPL_EVENT_NDC to determine if your instance should trigger the event NODE_DOUBLE_CLICK and if the event should be triggered as an application event or as a system event. Using the parameter I_LEVEL_NO you define the read depth of your instance (the last node level that can be expanded). &5($7( 2%-(&7 REMHFW (;3257,1*

LBFRQWDLQHU YDULDEOHB

LBURRWBQRGHBWH[W YDULDEOHB

LBIOLJKWBQRGHBWH[W YDULDEOHB

LBIOLJKWBQRGHBWH[W YDULDEOH

LBQRGHBGRXEOHBFOLFN YDULDEOH

LBDSSOBHYHQWBQGF YDULDEOHB

LBOHYHOBQR YDULDEOHB (;&(37,216

WUHHBFUHDWHBHUURU YDOXHB

URRWBFUHDWHBHUURU YDOXHB

The interface parameters have the following meaning: 3DUDPHWHU QDPH

LBFRQWDLQHU

0HDQLQJ Container reference You use this parameter to pass a container reference. The Tree Control instance is displayed in the corresponding container instance.

LBURRWBQRGHBWH[W LBIOLJKWBQRGHBWH[W LBIOLJKWBQRGHBWH[W LBQRGHBGRXEOHBFOLFN

Text for the root node Text 1 used in nodes for table SFLIGHT. Pass the text "Number of available seats" (default value: "seats free"). Text 2 used in nodes for table SFLIGHT. Pass the text "No seats available" (default value: "no seats free"). Flag variable You use this parameter to determine if your instance can trigger the event NODE_DOUBLE_CLICK. To assign a value to this parameter, you can use the class constants C_TRUE and C_FALSE: CL_BC412_FLIGHT_INFO_TREE1=>C_TRUE: Instance should trigger event NODE_DOUBLE_CLICK (register at the CFW) CL_BC412_FLIGHT_INFO_TREE1=>C_FALSE: Instance should not trigger event NODE_DOUBLE_CLICK

LBDSSOBHYHQWBQGF

Flag variable You use this parameter to determine if event NODE_DOUBLE_CLICK should be triggered as an application or as a system event.

Š SAP AG

BC412

11-19


CL_BC412_FLIGHT_INFO_TREE1=>C_TRUE: Application event CL_BC412_FLIGHT_INFO_TREE1=>C_FALSE: System event LBOHYHOBQR

Read depth of the instance in the hierarchy To assign a value to the parameter, use the class constants C_LEVEL_x, x = 1, ...4. C_LEVEL_1: SCARR C_LEVEL_2: SPFLI C_LEVEL_3: SFLIGHT C_LEVEL_4: SBOOK

The exceptions have the following meaning: 3DUDPHWHU QDPH

0HDQLQJ

WUHHBFUHDWHBHUURU

Error creating the Tree Control instance

URRWBFUHDWHBHUURU

Error creating the root node

The Method FREE The method )5(( is used to release all resources used by the instantiated control at the front-end.

The Method GET_SCARR_DETAILS Using the method *(7B6&$55B'(7$,/6, you can query detail data for an airline (values of the table fields of the database table at the time the node is read). Use the parameter ,B&$55,' to pass the key of the table 6&$55. The method returns the relevant table row in parameter (B6&$55. The exception 12B'$7$B)281' is triggered if no entry exists for the key passed.

The Method GET_SPFLI_DETAILS Using the method *(7B63)/,B'(7$,/6, you can query detail data for a flight connection (values of the table fields of the database table at the time the node is read). Use the parameters ,B&$55,' and ,B&211,' to pass the key of the table 63)/,. The method returns the relevant table row in parameter (B63)/,. The exception 12B'$7$B)281' is triggered if no entry exists for the key passed.

The Method GET_SFLIGHT_DETAILS Using the method *(7B6)/,*+7B'(7$,/6, you can query detail data for a flight (values of the table fields of the database table at the time the node is read). Use the parameters ,B&$55,' ,B&211,', and ,B)/'$7( to pass the key of table 6)/,*+7. The method returns the relevant table row in parameter (B66)/,*+7. The exception 12B'$7$B)281' is triggered if no entry exists for the key passed.

Š SAP AG

BC412

11-20


The Method GET_SBOOK_DETAILS Using the method *(7B6%22.B'(7$,/6, you can query detail data for a booking (values of the table fields of the database table at the time the node is read). Use the parameters ,B&$55,' ,B&221,' ,B)/'$7(, and ,B%22.,' to pass the key of table 6%22.. The method returns the relevant table row in parameter (B6%22.. The exception 12B'$7$B)281' is triggered if no entry exists for the key passed.

The Method GET_SCUSTOM_DETAILS Using the method *(7B6&86720B'(7$,/6, you can query detail data for a flight customer (values of the table fields of the database table at the time the SBOOK nodes are read). Use the parameter ,B,' to pass the key of table 6&86720. The method returns the relevant table row in parameter (B6&86720. The exception 12B'$7$B)281' is triggered if no entry exists for the key passed.

The Event NODE_DOUBLE_CLICK The event 12'(B'28%/(B&/,&. is triggered if a node is double-clicked (if registered). Through the interface of the event, the application key of the node (parameter (B&$55,', (B&211,', (B)/'$7(, (B%22.,') and the hierarchy level of the node are transmitted (parameter (B/(9(/)

'DWD 0HWKRGV DQG (YHQWV 8VHG ,QWHUQDOO\ LQ WKH &ODVV Each instance of the class buffers the table row assigned to a node displayed at the front-end in the internal tables

,7B6&$55, ,7B63)/,, ,7B6)/,*+7, ,7B6%22., and ,7B6&86720. These internal tables are filled with data in the method 21B(;3$1'B12B&+,/'5(1. The method 21B(;3$1'B12B&+,/'5(1 handles the event (;3$1'B12B&+,/'5(1 of the Tree Control instance. If this method is called, the method determines the application key for the node key that is transmitted at the tree event (method *(7B%86,1(66B.(< of the instance of class &/B%& B0$33,1*B B B75((). The application key tells the system for which node hierarchically

dependent data needs to be read. Database access and node table creation are implemented by means of the methods ),//B6&$55B12'(, ),//B63/)/,B12'(, ),//B6)/,*+7_12'(, and ),//B6%22.B12'(.

The method *(7B&86720(5B1$0(6 is used by the method ),//B6%22.B12'(.

'HILQLWLRQ RI WKH &ODVV

W\SH SRROV 7<3( 322/6 FQWO

&/$66 &/B%& B)/,*+7B,1)2B75(( '(),1,7,21

&/$66 FOBEF BIOLJKWBLQIRBWUHH '(),1,7,21 38%/,& ),1$/

&5($7( 38%/,&

SXEOLF FRPSRQHQWV RI FODVV &/B%& B)/,*+7B,1)2B75((

Š SAP AG

BC412

11-21


38%/,& 6(&7,21

FRQVWDQWV

&2167$176

FBWUXH 7<3( EF BWH[W 9$/8( ;

FBIDOVH 7<3( EF BWH[W 9$/8(

FBWH[W 7<3( EF BWH[W 9$/8( VHDWV IUHH

FBWH[W 7<3( EF BWH[W 9$/8( QR VHDWV IUHH FBOHYHOB 7<3( EF BOHYHO 9$/8(

FBOHYHOB 7<3( EF BOHYHO 9$/8(

FBOHYHOB 7<3( EF BOHYHO 9$/8(

FBOHYHOB 7<3( EF BOHYHO 9$/8(

FBOHYHOB 7<3( EF BOHYHO 9$/8( HYHQWV (9(176

QRGHBGRXEOHBFOLFN (;3257,1*

YDOXH HBFDUULG 7<3( VBFDUUBLG 237,21$/

YDOXH HBFRQQLG 7<3( VBFRQQBLG 237,21$/ YDOXH HBIOGDWH 7<3( VBGDWH 237,21$/

YDOXH HBERRNLG 7<3( VBERRNBLG 237,21$/

YDOXH HBOHYHO 7<3( EF BOHYHO 237,21$/ PHWKRGV 0(7+2'6

FRQVWUXFWRU

,03257,1*

LBFRQWDLQHU 7<3( 5() 72 FOBJXLBFRQWDLQHU

YDOXH LBURRWBQRGHBWH[W 7<3( EF BVLPBWUHHBQRGHBVWUXF WH[W

YDOXH LBIOLJKWBQRGHBWH[W 7<3( EF BWH[W YDOXH LBIOLJKWBQRGHBWH[W 7<3( EF BWH[W YDOXH LBQRGHBGRXEOHBFOLFN 7<3( EF BWH[W YDOXH LBDSSOBHYHQWBQGF 7<3( EF BWH[W

YDOXH LBOHYHOBQR 7<3( EF BOHYHO (;&(37,216

WUHHBFUHDWHBHUURU

URRWBFUHDWHBHUURU

IUHH

JHWBVFDUUBGHWDLOV ,03257,1*

© SAP AG

BC412

11-22


YDOXH LBFDUULG 7<3( VBFDUUBLG (;3257,1*

YDOXH HBVFDUU 7<3( VFDUU (;&(37,216

QRBGDWDBIRXQG

JHWBVSIOLBGHWDLOV ,03257,1*

YDOXH LBFDUULG 7<3( VBFDUUBLG

YDOXH LBFRQQLG 7<3( VBFRQQBLG (;3257,1*

YDOXH HBVSIOL 7<3( VSIOL (;&(37,216

QRBGDWDBIRXQG

JHWBVIOLJKWBGHWDLOV ,03257,1*

YDOXH LBFDUULG 7<3( VBFDUUBLG

YDOXH LBFRQQLG 7<3( VBFRQQBLG YDOXH LBIOGDWH 7<3( VBGDWH (;3257,1*

YDOXH HBVIOLJKW 7<3( VIOLJKW (;&(37,216

QRBGDWDBIRXQG

JHWBVERRNBGHWDLOV ,03257,1*

YDOXH LBFDUULG 7<3( VBFDUUBLG

YDOXH LBFRQQLG 7<3( VBFRQQBLG YDOXH LBIOGDWH 7<3( VBGDWH

YDOXH LBERRNLG 7<3( VBERRNBLG (;3257,1*

YDOXH HBVERRN 7<3( VERRN (;&(37,216

QRBGDWDBIRXQG

JHWBVFXVWRPBGHWDLOV ,03257,1*

YDOXH LBLG 7<3( VBFXVWRPHU (;3257,1*

YDOXH HBVFXVWRP 7<3( VFXVWRP (;&(37,216

QRBGDWDBIRXQG

© SAP AG

BC412

11-23


SURWHFWHG FRPSRQHQWV RI FODVV &/B%& B)/,*+7B,1)2B75((

3527(&7(' 6(&7,21

LQVWDQFH DWWULEXWHV '$7$

LWBVFDUU 7<3( EF BVFDUUBLWW

LWBVSIOL 7<3( EF BVSIOLBLWW

LWBVIOLJKW 7<3( EF BVIOLJKWBLWW LWBVERRN 7<3( EF BVERRNBLWW

LWBVFXVWRP 7<3( EF BVFXVWRPBLWW

RBVLPSOHBWUHH 7<3( 5() 72 FOBJXLBVLPSOHBWUHH

RBPDSSLQJ 7<3( 5() 72 FOBEF BPDSSLQJB B BWUHH

VIOLJKWBQRGHBWH[W 7<3( EF BWH[W

VIOLJKWBQRGHBWH[W 7<3( EF BWH[W OHYHOBQR 7<3( EF BOHYHO PHWKRGV 0(7+2'6

FUHDWHBURRWBQRGH ,03257,1*

YDOXH LBURRWBQRGHBWH[W 7<3( EF BVLPBWUHHBQRGHBVWUXF WH[W

(;&(37,216

URRWBFUHDWHBHUURU

RQBH[SDQGBQRBFKLOGUHQ

)25 (9(17 H[SDQGBQRBFKLOGUHQ 2) FOBJXLBVLPSOHBWUHH ,03257,1*

QRGHBNH\

RQBQRGHBGRXEOHBFOLFN

)25 (9(17 QRGHBGRXEOHBFOLFN 2) FOBJXLBVLPSOHBWUHH ,03257,1*

QRGHBNH\

ILOOBVFDUUBQRGH ,03257,1*

YDOXH LBQRGHBNH\ 7<3( WYBQRGHNH\ (;&(37,216

PDSSLQJBLQVHUWBHUURU QRGHBDGGBHUURU

ILOOBVSIOLBQRGH

© SAP AG

BC412

11-24


,03257,1*

YDOXH LBQRGHBNH\ 7<3( WYBQRGHNH\ YDOXH LBNH\ 7<3( VBFDUUBLG (;&(37,216

PDSSLQJBLQVHUWBHUURU QRGHBDGGBHUURU

ILOOBVIOLJKWBQRGH ,03257,1*

YDOXH LBQRGHBNH\ 7<3( WYBQRGHNH\ YDOXH LBNH\ 7<3( VBFDUUBLG

YDOXH LBNH\ 7<3( VBFRQQBLG (;&(37,216

PDSSLQJBLQVHUWBHUURU QRGHBDGGBHUURU

ILOOBVERRNBQRGH ,03257,1*

YDOXH LBQRGHBNH\ 7<3( WYBQRGHNH\ YDOXH LBNH\ 7<3( VBFDUUBLG

YDOXH LBNH\ 7<3( VBFRQQBLG YDOXH LBNH\ 7<3( VBGDWH (;&(37,216

PDSSLQJBLQVHUWBHUURU QRGHBDGGBHUURU

JHWBFXVWRPHUBQDPHV &+$1*,1*

LBERRNLQJBLQIR 7<3( EF BVERRNBQRGHBLWW (;&(37,216

GDWDBHUURU

,PSOHPHQWDWLRQ RI WKH &ODVV 0(7+2' FRQVWUXFWRU

ORFDO GDWD LQWHUQDO WDEOH ZLWK UHJLVWHUHG HYHQWLGV '$7$ HYHQWV 7<3( FQWOBVLPSOHBHYHQWV '$7$ ZDBHYHQWV 7<3( FQWOBVLPSOHBHYHQW VHW FXUUHQW QXPEHU RI OHYHOV OHYHOBQR LBOHYHOBQR

FUHDWH LQVWDQFHV IRU WUHH FRQWURO DQG PDSSLQJ FODVV D FUHDWH WUHH FRQWURO

© SAP AG

BC412

11-25


&5($7( 2%-(&7 RBVLPSOHBWUHH (;3257,1*

OLIHWLPH FOBJXLBVLPSOHBWUHH !OLIHWLPHBLPRGH

SDUHQW LBFRQWDLQHU

VKHOOVW\OH VKHOOVW\OH

QRGHBVHOHFWLRQBPRGH FOBJXLBVLPSOHBWUHH !QRGHBVHOBPRGHBVLQJOH

KLGHBVHOHFWLRQ

(;&(37,216

OLIHWLPHBHUURU

FQWOBV\VWHPBHUURU

FUHDWHBHUURU

LOOHJDOBQRGHBVHOHFWLRQBPRGH

IDLOHG ,) V\ VXEUF 1(

5$,6( WUHHBFUHDWHBHUURU (1',)

E FUHDWH PDSSLQJ REMHFW &5($7( 2%-(&7 RBPDSSLQJ FUHDWH 5227 QRGH

&$// 0(7+2' PH !FUHDWHBURRWBQRGH (;3257,1*

LBURRWBQRGHBWH[W LBURRWBQRGHBWH[W (;&(37,216

URRWBFUHDWHBHUURU ,) V\ VXEUF 1(

5$,6( URRWBFUHDWHBHUURU (1',)

UHJLVWHU HYHQWV

ILOO ZRUNDUHD IRU HYHQW UHJLVWUDWLRQ HYHQW QRGHBGRXEOHBFOLFN

,) LBQRGHBGRXEOHBFOLFN FBWUXH

ZDBHYHQWV HYHQWLG FOBJXLBVLPSOHBWUHH !HYHQWLGBQRGHBGRXEOHBFOLFN

ZDBHYHQWV DSSOBHYHQW LBDSSOBHYHQWBQGF $33(1' ZDBHYHQWV 72 HYHQWV (1',)

HYHQW H[SDQGBQRBFKLOGUHQ

ZDBHYHQWV HYHQWLG FOBJXLBVLPSOHBWUHH !HYHQWLGBH[SDQGBQRBFKLOGUHQ

ZDBHYHQWV DSSOBHYHQW FBIDOVH

© SAP AG

BC412

11-26


$33(1' ZDBHYHQWV 72 HYHQWV UHJLVWHU HYHQWV

&$// 0(7+2' RBVLPSOHBWUHH !VHWBUHJLVWHUHGBHYHQWV (;3257,1* HYHQWV HYHQWV

,) LBQRGHBGRXEOHBFOLFN FBWUXH

6(7 +$1'/(5 PH !RQBQRGHBGRXEOHBFOLFN )25 RBVLPSOHBWUHH

(1',)

6(7 +$1'/(5 PH !RQBH[SDQGBQRBFKLOGUHQ )25 RBVLPSOHBWUHH VWRUH QRGH WH[WV IRU VIOLJKW QRGHV LQ LQVWDQFH GDWD VIOLJKWBQRGHBWH[W LBIOLJKWBQRGHBWH[W

VIOLJKWBQRGHBWH[W LBIOLJKWBQRGHBWH[W (1'0(7+2'

0(7+2' IUHH

&$// 0(7+2' RBVLPSOHBWUHH !IUHH )5(( RBVLPSOHBWUHH RBPDSSLQJ (1'0(7+2'

0(7+2' JHWBVFDUUBGHWDLOV

5($' 7$%/( LWBVFDUU ,172 HBVFDUU :,7+ 7$%/( .(< FDUULG LBFDUULG ,) V\ VXEUF 1(

5$,6( QRBGDWDBIRXQG (1',)

(1'0(7+2' 0(7+2' JHWBVSIOLBGHWDLOV

5($' 7$%/( LWBVSIOL ,172 HBVSIOL :,7+ 7$%/( .(< FDUULG LBFDUULG

FRQQLG LBFRQQLG ,) V\ VXEUF 1(

5$,6( QRBGDWDBIRXQG (1',)

(1'0(7+2'

© SAP AG

BC412

11-27


0(7+2' JHWBVIOLJKWBGHWDLOV

5($' 7$%/( LWBVIOLJKW ,172 HBVIOLJKW :,7+ 7$%/( .(< FDUULG LBFDUULG

FRQQLG LBFRQQLG

IOGDWH LBIOGDWH ,) V\ VXEUF 1(

5$,6( QRBGDWDBIRXQG (1',)

(1'0(7+2' 0(7+2' JHWBVERRNBGHWDLOV

5($' 7$%/( LWBVERRN ,172 HBVERRN :,7+ 7$%/( .(< FDUULG LBFDUULG

FRQQLG LBFRQQLG

IOGDWH LBIOGDWH

ERRNLG LBERRNLG ,) V\ VXEUF 1(

5$,6( QRBGDWDBIRXQG (1',)

(1'0(7+2' 0(7+2' JHWBVFXVWRPBGHWDLOV

5($' 7$%/( LWBVFXVWRP ,172 HBVFXVWRP :,7+ 7$%/( .(< LG LBLG

,) V\ VXEUF 1(

5$,6( QRBGDWDBIRXQG (1',)

(1'0(7+2' 0(7+2' FUHDWHBURRWBQRGH ORFDO QRGH WDEOH

'$7$ QRGHBWDEOH 7<3( 67$1'$5' 7$%/( 2)

EF BVLPBWUHHBQRGHBVWUXF ZDBQRGH /,.( /,1( 2) QRGHBWDEOH

© SAP AG

BC412

11-28


FUHDWH URRW QRGH HQWU\ &/($5 ZDBQRGH

ZDBQRGH QRGHBNH\ 5227

ZDBQRGH UHODWNH\ VSHFLDO FDVH URRW KDV QR

ZDBQRGH UHODWVKLS UHODWHG HQWU\

ZDBQRGH KLGGHQ YLVLEOH ; LQYLVLEOH

ZDBQRGH GLVDEOHG ; QRGH LV QRW VHOHFWDEOH

ZDBQRGH LVIROGHU ;

ZDBQRGH QBLPDJH XVH GHIDXOW LFRQ FORVHG IROGHU

ZDBQRGH H[SBLPDJH XVH GHIDXOW LFRQ H[SDQG IROGHU

ZDBQRGH VW\OH FOBJXLBVLPSOHBWUHH !VW\OHBGHIDXOW ZDBQRGH ODVWBKLWHP

ZDBQRGH QRBEUDQFK ,) OHYHOBQR FBOHYHOB

ZDBQRGH H[SDQGHU (/6(

ZDBQRGH H[SDQGHU ; (1',)

ZDBQRGH GUDJGURSLG

ZDBQRGH WH[W LBURRWBQRGHBWH[W ,16(57 ZDBQRGH ,172 7$%/( QRGHBWDEOH &$// 0(7+2' RBVLPSOHBWUHH !DGGBQRGHV (;3257,1*

WDEOHBVWUXFWXUHBQDPH %& B6,0B75((B12'(B6758&

QRGHBWDEOH QRGHBWDEOH (;&(37,216

HUURUBLQBQRGHBWDEOH

IDLOHG

GSBHUURU

WDEOHBVWUXFWXUHBQDPHBQRWBIRXQG ,) V\ VXEUF 1(

5$,6( URRWBFUHDWHBHUURU (1',)

(1'0(7+2' 0(7+2' RQBH[SDQGBQRBFKLOGUHQ ORFDO GDWD

'$7$ %(*,1 2) PDSSLQJ

© SAP AG

BC412

11-29


FDUULG 7<3( VBFDUUBLG

FRQQLG 7<3( VBFRQQBLG IOGDWH 7<3( VBGDWH

ERRNLG 7<3( VBERRNBLG (1' 2) PDSSLQJ

WHVW IRU 5227 VSHFLDO FDVH

,) QRGHBNH\ 5227 H[SDQG URRW QRGH ! LBVFDUU

&$// 0(7+2' PH !ILOOBVFDUUBQRGH (;3257,1*

LBQRGHBNH\ 5227

(;&(37,216

PDSSLQJBLQVHUWBHUURU QRGHBDGGBHUURU ,) V\ VXEUF 1(

RSHQ WR LPSOHPHQW (1',)

(/6( DQ\ RWKHU QRGH WR H[SDQG JHW EXVLQHVV NH\ RI VHOHFWHG QRGH

&$// 0(7+2' RBPDSSLQJ !JHWBEXVLQHVVBNH\ (;3257,1*

LBWNH\ QRGHBNH\ ,03257,1*

HBENH\ PDSSLQJ FDUULG

HBENH\ PDSSLQJ FRQQLG

HBENH\ PDSSLQJ IOGDWH

HBENH\ PDSSLQJ ERRNLG (;&(37,216

LQYDOLGBWHFNH\ ,) V\ VXEUF 1(

RSHQ WR LPSOHPHQW (1',)

,) PDSSLQJ FRQQLG ,6 ,1,7,$/ H[SDQG FDUULHU QRGH

! LBVSIOL &$// 0(7+2' PH !ILOOBVSIOLBQRGH (;3257,1*

LBQRGHBNH\ QRGHBNH\

LBNH\ PDSSLQJ FDUULG (;&(37,216

PDSSLQJBLQVHUWBHUURU

QRGHBDGGBHUURU

© SAP AG

BC412

11-30


,) V\ VXEUF 1(

RSHQ WR LPSOHPHQW (1',)

(/6(,) PDSSLQJ IOGDWH ,6 ,1,7,$/ H[SDQG FRQQHFWLRQ QRGH

! LBVIOLJKW &$// 0(7+2' PH !ILOOBVIOLJKWBQRGH (;3257,1*

LBQRGHBNH\ QRGHBNH\

LBNH\ PDSSLQJ FDUULG

LBNH\ PDSSLQJ FRQQLG (;&(37,216

PDSSLQJBLQVHUWBHUURU

QRGHBDGGBHUURU ,) V\ VXEUF 1(

RSHQ WR LPSOHPHQW (1',)

(/6(,) PDSSLQJ ERRNLG ,6 ,1,7,$/ H[SDQG IOLJKW QRGH

! LBVERRN &$// 0(7+2' PH !ILOOBVERRNBQRGH (;3257,1*

LBQRGHBNH\ QRGHBNH\

LBNH\ PDSSLQJ FDUULG

LBNH\ PDSSLQJ FRQQLG

LBNH\ PDSSLQJ IOGDWH (;&(37,216

PDSSLQJBLQVHUWBHUURU

QRGHBDGGBHUURU ,) V\ VXEUF 1(

RSHQ WR LPSOHPHQW (1',) (1',)

(1',)

(1'0(7+2' 0(7+2' RQBQRGHBGRXEOHBFOLFN ORFDO GDWD '$7$

© SAP AG

BC412

11-31


OBFDUULG 7<3( VBFDUUBLG

OBFRQQLG 7<3( VBFRQQBLG OBIOGDWH 7<3( VBGDWH

OBERRNLG 7<3( VBERRNBLG

OBOHYHO 7<3( EF BOHYHO

WUDQVIRUP WHFKQLFDO NH\ RI QRWH WUHH FRQWURO LQWR EXVLQHVV NH\V

RI WKH IOLJKW PRGHO

&$// 0(7+2' RBPDSSLQJ !JHWBEXVLQHVVBNH\ (;3257,1*

LBWNH\ QRGHBNH\ ,03257,1*

HBENH\ OBFDUULG

HBENH\ OBFRQQLG

HBENH\ OBIOGDWH

HBENH\ OBERRNLG (;&(37,216

LQYDOLGBWHFNH\ ,) V\ VXEUF 1(

VKRXOG QRW KDSSHQ (1',)

GHWHUPLQH QRGH OHYHO

,) OBFRQQLG ,6 ,1,7,$/ FDUULHU QRGH VHOHFWHG

OBOHYHO FBOHYHOB

(/6(,) OBIOGDWH ,6 ,1,7,$/ FRQQHFWLRQ QRGH VHOHFWHG

OBOHYHO FBOHYHOB

(/6(,) OBERRNLG ,6 ,1,7,$/ IOLJKW QRGH VHOHFWHG

OBOHYHO FBOHYHOB

(/6( ERRNLQJ QRGH VHOHFWHG

OBOHYHO FBOHYHOB (1',)

UDLVH HYHQW QRGHBGRXEOHBFOLFN ZLWK EXVLQHVV NH\ 5$,6( (9(17 QRGHBGRXEOHBFOLFN (;3257,1*

HBFDUULG OBFDUULG

HBFRQQLG OBFRQQLG

HBIOGDWH OBIOGDWH

HBERRNLG OBERRNLG

HBOHYHO OBOHYHO (1'0(7+2'

0(7+2' ILOOBVFDUUBQRGH

© SAP AG

BC412

11-32


ORFDO QRGH WDEOH

'$7$ QRGHBWDEOH 7<3( 67$1'$5' 7$%/( 2)

EF BVLPBWUHHBQRGHBVWUXF ZDBQRGH /,.( /,1( 2) QRGHBWDEOH KDQGOLQJ RI LQWHUQDO GDWD WDEOH

ZDBVFDUU /,.( /,1( 2) LWBVFDUU

ORFDO PDSSLQJ VWUXFWXUH XVHG WR FRQVWUXFW QRGHBNH\ %(*,1 2) PDSSLQJ

FDUULG 7<3( VBFDUUBLG

FRQQLG 7<3( VBFRQQBLG IOGDWH 7<3( VBGDWH

ERRNLG 7<3( VBERRNBLG (1' 2) PDSSLQJ

UHDG GDWD IURP GDWDEDVH WDEOH VFDUU

QRWH WKLV PHWKRG LV H[HFXWHG RQO\ RQH WLPH GXULQJ SURJUDP UXQ

LW LV FDOOHG WKH ILUVW WLPH WKH XVHU WULHV WR H[SDQG WKH URRW

QRGH ,Q DOO RWKHU FDVHV WKH FRUUHVSRQGLQJ GDWD KDV DOUHDG\

VHQG WR WKH WUHH FRQWURO 7KXV WKH HYHQW H[SDQGBQRBFKLOGUHQ

LV RQO\ ILUHG WKH ILUVW WLPH

6(/(&7 )520 VFDUU ,172 &255(6321',1* ),(/'6 2) 7$%/( LWBVFDUU

FUHDWH QRGH HQWULHV &/($5 ZDBQRGH

ZDBQRGH KLGGHQ YLVLEOH ; LQYLVLEOH

ZDBQRGH GLVDEOHG QRGH LV VHOHFWDEOH

ZDBQRGH LVIROGHU ;

ZDBQRGH QBLPDJH XVH GHIDXOW LFRQ FORVHG IROGHU

ZDBQRGH H[SBLPDJH XVH GHIDXOW LFRQ H[SDQG IROGHU

ZDBQRGH VW\OH FOBJXLBVLPSOHBWUHH !VW\OHBGHIDXOW ZDBQRGH ODVWBKLWHP

ZDBQRGH QRBEUDQFK

,) OHYHOBQR FBOHYHOB

ZDBQRGH H[SDQGHU (/6(

ZDBQRGH H[SDQGHU ; (1',)

ZDBQRGH GUDJGURSLG /223 $7 LWBVFDUU ,172 ZDBVFDUU &/($5 PDSSLQJ

029( &255(6321',1* ZDBVFDUU 72 PDSSLQJ

&$// 0(7+2' RBPDSSLQJ !LQVHUWBEXVLQHVVBNH\ (;3257,1*

© SAP AG

BC412

11-33


LBENH\ PDSSLQJ FDUULG

LBENH\ PDSSLQJ FRQQLG

LBENH\ PDSSLQJ IOGDWH

LBENH\ PDSSLQJ ERRNLG ,03257,1*

HBWNH\ ZDBQRGH QRGHBNH\ (;&(37,216

LQWHUQDOBHUURU

WHFNH\BRYHUIORZ

LQYDOLGBEXVNH\ ,) V\ VXEUF 1(

5$,6( PDSSLQJBLQVHUWBHUURU (1',)

ZDBQRGH WH[W ZDBVFDUU FDUUQDPH ILUVW HQWU\ RI VXE QRGHV

ZDBQRGH UHODWNH\ LBQRGHBNH\

ZDBQRGH UHODWVKLS FOBJXLBVLPSOHBWUHH !UHODWBODVWBFKLOG

,16(57 ZDBQRGH ,172 7$%/( QRGHBWDEOH (1'/223

&$// 0(7+2' RBVLPSOHBWUHH !DGGBQRGHV (;3257,1*

WDEOHBVWUXFWXUHBQDPH %& B6,0B75((B12'(B6758&

QRGHBWDEOH QRGHBWDEOH (;&(37,216

HUURUBLQBQRGHBWDEOH

IDLOHG

GSBHUURU

WDEOHBVWUXFWXUHBQDPHBQRWBIRXQG ,) V\ VXEUF 1(

5$,6( QRGHBDGGBHUURU (1',)

(1'0(7+2' 0(7+2' ILOOBVSIOLBQRGH ORFDO QRGH WDEOH

'$7$ QRGHBWDEOH 7<3( 67$1'$5' 7$%/( 2)

EF BVLPBWUHHBQRGHBVWUXF

ZDBQRGH /,.( /,1( 2) QRGHBWDEOH

ORFDO PDSSLQJ VWUXFWXUH XVHG WR FRQVWUXFW QRGHBNH\ %(*,1 2) PDSSLQJ

© SAP AG

BC412

11-34


FDUULG 7<3( VBFDUUBLG

FRQQLG 7<3( VBFRQQBLG IOGDWH 7<3( VBGDWH

ERRNLG 7<3( VBERRNBLG (1' 2) PDSSLQJ ORFDO VSIOL WDEOH

OLBVSIOL 7<3( 6257(' 7$%/( 2) VSIOL

:,7+ 81,48( .(< FDUULG FRQQLG ORFDO ZRUNDUHD

ZDBVSIOL /,.( /,1( 2) LWBVSIOL UHDG GDWD IURP GDWDEDVH WDEOH

UHPHPEHU WKH HYHQW H[SDQGBQRBFKLOGUHQ LV RQO\ ILUHG LI WKH WUHH

FRQWURO RQ WKH IURQW HQG KDV QR GDWD WR VKRZ DV FKLOGUHQ

6(/(&7 )520 VSIOL ,172 &255(6321',1* ),(/'6 2) 7$%/( OLBVSIOL

:+(5( FDUULG LBNH\ FUHDWH QRGH HQWULHV &/($5 ZDBQRGH

ZDBQRGH KLGGHQ YLVLEOH ; LQYLVLEOH

ZDBQRGH GLVDEOHG QRGH LV VHOHFWDEOH

ZDBQRGH LVIROGHU ;

ZDBQRGH QBLPDJH XVH GHIDXOW LFRQ FORVHG IROGHU

ZDBQRGH H[SBLPDJH XVH GHIDXOW LFRQ H[SDQG IROGHU

ZDBQRGH VW\OH FOBJXLBVLPSOHBWUHH !VW\OHBGHIDXOW ZDBQRGH ODVWBKLWHP

ZDBQRGH QRBEUDQFK ,) OHYHOBQR FBOHYHOB

ZDBQRGH H[SDQGHU (/6(

ZDBQRGH H[SDQGHU ; (1',)

ZDBQRGH GUDJGURSLG /223 $7 OLBVSIOL ,172 ZDBVSIOL &/($5 PDSSLQJ

029( &255(6321',1* ZDBVSIOL 72 PDSSLQJ

&$// 0(7+2' RBPDSSLQJ !LQVHUWBEXVLQHVVBNH\ (;3257,1*

LBENH\ PDSSLQJ FDUULG

LBENH\ PDSSLQJ FRQQLG

LBENH\ PDSSLQJ IOGDWH

© SAP AG

BC412

11-35


LBENH\ PDSSLQJ ERRNLG ,03257,1*

HBWNH\ ZDBQRGH QRGHBNH\ (;&(37,216

LQWHUQDOBHUURU

WHFNH\BRYHUIORZ

LQYDOLGBEXVNH\ ,) V\ VXEUF 1(

5$,6( PDSSLQJBLQVHUWBHUURU (1',)

&21&$7(1$7( ZDBVSIOL FRQQLG ZDBVSIOL FLW\IURP !

ZDBVSIOL FLW\WR

,172 ZDBQRGH WH[W 6(3$5$7(' %< ILUVW HQWU\ RI VXE QRGH ! ILUVW FKLOG ZDBQRGH UHODWNH\ LBQRGHBNH\

ZDBQRGH UHODWVKLS FOBJXLBVLPSOHBWUHH !UHODWBODVWBFKLOG

,16(57 ZDBQRGH ,172 7$%/( QRGHBWDEOH ILOO QRGH WDEOH

,16(57 ZDBVSIOL ,172 7$%/( LWBVSIOL ILOO JOREDO GDWD WDEOH

(1'/223

&$// 0(7+2' RBVLPSOHBWUHH !DGGBQRGHV (;3257,1*

WDEOHBVWUXFWXUHBQDPH %& B6,0B75((B12'(B6758&

QRGHBWDEOH QRGHBWDEOH (;&(37,216

HUURUBLQBQRGHBWDEOH

IDLOHG

GSBHUURU

WDEOHBVWUXFWXUHBQDPHBQRWBIRXQG ,) V\ VXEUF 1(

5$,6( QRGHBDGGBHUURU (1',)

(1'0(7+2' 0(7+2' ILOOBVIOLJKWBQRGH ORFDO QRGH WDEOH

'$7$ QRGHBWDEOH 7<3( 67$1'$5' 7$%/( 2)

EF BVLPBWUHHBQRGHBVWUXF

ZDBQRGH /,.( /,1( 2) QRGHBWDEOH

© SAP AG

BC412

11-36


ORFDO PDSSLQJ VWUXFWXUH XVHG WR FRQVWUXFW QRGHBNH\ %(*,1 2) PDSSLQJ

FDUULG 7<3( VBFDUUBLG

FRQQLG 7<3( VBFRQQBLG IOGDWH 7<3( VBGDWH

ERRNLG 7<3( VBERRNBLG (1' 2) PDSSLQJ ORFDO VIOLJKW WDEOH

OLBVIOLJKW 7<3( 6257(' 7$%/( 2) VIOLJKW

:,7+ 81,48( .(< FDUULG FRQQLG IOGDWH

ORFDO ZRUNDUHD

ZDBVIOLJKW /,.( /,1( 2) LWBVIOLJKW DX[LOLDU\ ILHOGV

IUHHVHDWV WH[W WH[W UHDG GDWDEDVH HQWU\ FRUUHVSRQGLQJ WR QRGH WR H[SDQG

6(/(&7 )520 VIOLJKW ,172 &255(6321',1* ),(/'6 2) 7$%/( OLBVIOLJKW

:+(5( FDUULG LBNH\

$1' FRQQLG LBNH\ FUHDWH QRGH HQWU\ &/($5 ZDBQRGH

ZDBQRGH KLGGHQ YLVLEOH ; LQYLVLEOH

ZDBQRGH GLVDEOHG QRGH LV VHOHFWDEOH

ZDBQRGH LVIROGHU ;

ZDBQRGH QBLPDJH XVH GHIDXOW LFRQ FORVHG IROGHU

ZDBQRGH H[SBLPDJH XVH GHIDXOW LFRQ H[SDQG IROGHU

ZDBQRGH VW\OH FOBJXLBVLPSOHBWUHH !VW\OHBGHIDXOW ZDBQRGH ODVWBKLWHP

ZDBQRGH QRBEUDQFK ,) OHYHOBQR FBOHYHOB

ZDBQRGH H[SDQGHU (/6(

ZDBQRGH H[SDQGHU ; (1',)

ZDBQRGH GUDJGURSLG /223 $7 OLBVIOLJKW ,172 ZDBVIOLJKW &/($5 PDSSLQJ IUHHVHDWV

029( &255(6321',1* ZDBVIOLJKW 72 PDSSLQJ

© SAP AG

BC412

11-37


&$// 0(7+2' RBPDSSLQJ !LQVHUWBEXVLQHVVBNH\ (;3257,1*

LBENH\ PDSSLQJ FDUULG

LBENH\ PDSSLQJ FRQQLG

LBENH\ PDSSLQJ IOGDWH

LBENH\ PDSSLQJ ERRNLG ,03257,1*

HBWNH\ ZDBQRGH QRGHBNH\ (;&(37,216

LQWHUQDOBHUURU

WHFNH\BRYHUIORZ

LQYDOLGBEXVNH\ ,) V\ VXEUF 1(

5$,6( PDSSLQJBLQVHUWBHUURU (1',)

IUHHVHDWV ZDBVIOLJKW VHDWVPD[ ZDBVIOLJKW VHDWVRFF

,) IUHHVHDWV ! VWLOO VHDWV WR ERRN

:5,7( ZDBVIOLJKW IOGDWH 72 WH[W WH[W VIOLJKWBQRGHBWH[W

&21&$7(1$7( WH[W IUHHVHDWV WH[W

,172 ZDBQRGH WH[W 6(3$5$7(' %<

(/6( QR IUHH VHDWV :5,7( ZDBVIOLJKW IOGDWH 72 WH[W WH[W VIOLJKWBQRGHBWH[W

&21&$7(1$7( WH[W WH[W

,172 ZDBQRGH WH[W 6(3$5$7(' %< (1',)

ZDBQRGH UHODWNH\ LBQRGHBNH\

ZDBQRGH UHODWVKLS FOBJXLBVLPSOHBWUHH !UHODWBODVWBFKLOG

,16(57 ZDBQRGH ,172 7$%/( QRGHBWDEOH ILOO QRGH WDEOH

,16(57 ZDBVIOLJKW ,172 7$%/( LWBVIOLJKW ILOO JOREDO GDWD WDEOH

(1'/223

&$// 0(7+2' RBVLPSOHBWUHH !DGGBQRGHV (;3257,1*

WDEOHBVWUXFWXUHBQDPH %& B6,0B75((B12'(B6758&

QRGHBWDEOH QRGHBWDEOH (;&(37,216

HUURUBLQBQRGHBWDEOH

IDLOHG

GSBHUURU

WDEOHBVWUXFWXUHBQDPHBQRWBIRXQG

© SAP AG

BC412

11-38


,) V\ VXEUF 1(

5$,6( QRGHBDGGBHUURU (1',)

(1'0(7+2' 0(7+2' ILOOBVERRNBQRGH ORFDO QRGH WDEOH

'$7$ QRGHBWDEOH 7<3( 67$1'$5' 7$%/( 2)

EF BVLPBWUHHBQRGHBVWUXF

ZDBQRGH /,.( /,1( 2) QRGHBWDEOH ZDBSUHYBQRGH /,.( ZDBQRGH

ORFDO PDSSLQJ VWUXFWXUH XVHG WR FRQVWUXFW QRGHBNH\ %(*,1 2) PDSSLQJ

FDUULG 7<3( VBFDUUBLG

FRQQLG 7<3( VBFRQQBLG IOGDWH 7<3( VBGDWH

ERRNLG 7<3( VBERRNBLG (1' 2) PDSSLQJ ORFDO ZRUNDUHD

ZDBVERRN /,.( /,1( 2) LWBVERRN ORFDO VERRN WDEOH

OLBVERRN 7<3( EF BVERRNBQRGHBLWW ZDBOBVERRN /,.( /,1( 2) OLBVERRN DX[LOLDU\ ILHOGV

IUHHVHDWV WH[W WH[W UHDG GDWDEDVH WDEOH FRUUHVSRQGLQJ WR QRGH WR H[SDQG

6(/(&7 )520 VERRN ,172 &255(6321',1* ),(/'6 2) 7$%/( OLBVERRN

:+(5( FDUULG LBNH\

$1' FRQQLG LBNH\

$1' IOGDWH LBNH\ JHW FXVWRPHU QDPHV FRUUHVSRQGLQJ WR QDPHV &$// 0(7+2' JHWBFXVWRPHUBQDPHV &+$1*,1*

LBERRNLQJBLQIR OLBVERRN (;&(37,216

GDWDBHUURU ,) V\ VXEUF 1(

© SAP AG

BC412

11-39


VKRXOG QRW RFFXU LQFRQVLVWHQW GDWD LQ GDWDEDVH WDEOHV

(1',)

FUHDWH QRGH HQWU\ &/($5 ZDBQRGH

ZDBQRGH KLGGHQ YLVLEOH ; LQYLVLEOH

ZDBQRGH GLVDEOHG QRGH LV VHOHFWDEOH

ZDBQRGH LVIROGHU

ZDBQRGH QBLPDJH XVH GHIDXOW LFRQ FORVHG IROGHU

ZDBQRGH H[SBLPDJH XVH GHIDXOW LFRQ H[SDQG IROGHU

ZDBQRGH VW\OH FOBJXLBVLPSOHBWUHH !VW\OHBGHIDXOW ZDBQRGH ODVWBKLWHP

ZDBQRGH QRBEUDQFK ,) OHYHOBQR FBOHYHOB

ZDBQRGH H[SDQGHU (/6(

ZDBQRGH H[SDQGHU DOZD\V QRW H[SDQGDEOH

(1',)

ZDBQRGH H[SDQGHU ZDBQRGH GUDJGURSLG

/223 $7 OLBVERRN ,172 ZDBOBVERRN :+(5( FDUULG LBNH\

$1' FRQQLG LBNH\

$1' IOGDWH LBNH\ &/($5 PDSSLQJ IUHHVHDWV

029( &255(6321',1* ZDBOBVERRN 72 PDSSLQJ

&$// 0(7+2' RBPDSSLQJ !LQVHUWBEXVLQHVVBNH\ (;3257,1*

LBENH\ PDSSLQJ FDUULG

LBENH\ PDSSLQJ FRQQLG

LBENH\ PDSSLQJ IOGDWH

LBENH\ PDSSLQJ ERRNLG ,03257,1*

HBWNH\ ZDBQRGH QRGHBNH\ (;&(37,216

LQWHUQDOBHUURU

WHFNH\BRYHUIORZ

LQYDOLGBEXVNH\ ,) V\ VXEUF 1(

5$,6( PDSSLQJBLQVHUWBHUURU

© SAP AG

BC412

11-40


(1',) ZDBQRGH WH[W ZDBOBVERRN QDPH FRQVWUXFW KLHUDUFK\

ZDBQRGH UHODWNH\ LBQRGHBNH\

ZDBQRGH UHODWVKLS FOBJXLBVLPSOHBWUHH !UHODWBODVWBFKLOG

,16(57 ZDBQRGH ,172 7$%/( QRGHBWDEOH ILOO QRGH WDEOH

029( &255(6321',1* ZDBOBVERRN 72 ZDBVERRN

,16(57 ZDBVERRN ,172 7$%/( LWBVERRN ILOO JOREDO GDWD WDEOH

ZDBSUHYBQRGH ZDBQRGH (1'/223

&$// 0(7+2' RBVLPSOHBWUHH !DGGBQRGHV (;3257,1*

WDEOHBVWUXFWXUHBQDPH %& B6,0B75((B12'(B6758&

QRGHBWDEOH QRGHBWDEOH (;&(37,216

HUURUBLQBQRGHBWDEOH

IDLOHG

GSBHUURU

WDEOHBVWUXFWXUHBQDPHBQRWBIRXQG ,) V\ VXEUF 1(

5$,6( QRGHBDGGBHUURU (1',)

(1'0(7+2' 0(7+2' JHWBFXVWRPHUBQDPHV

'$7$ ZDBERRNLQJ /,.( /,1( 2) LBERRNLQJBLQIR ZDBVFXVWRP /,.( /,1( 2) LWBVFXVWRP

LWBFXVWBQR /,.( 7$%/( 2) ZDBVFXVWRP LG OLBVFXVWRP 7<3( 7$%/( 2) VFXVWRP

/223 $7 LBERRNLQJBLQIR ,172 ZDBERRNLQJ

5($' 7$%/( LWBVFXVWRP ,172 ZDBVFXVWRP :,7+ 7$%/( .(<

LG ZDBERRNLQJ FXVWRPLG

,) V\ VXEUF 1( FXVWRPHU QRW FDVKHG VR IDU

,16(57 ZDBERRNLQJ FXVWRPLG ,172 7$%/( LWBFXVWBQR

(/6( FXVWRPHU DOUHDG\ FDVKHG

FRS\ QDPH DQG PRGLI\ ERRNLQJBQRGHBWDEOH

© SAP AG

BC412

11-41


ZDBERRNLQJ QDPH ZDBVFXVWRP QDPH

02',)< 7$%/( LBERRNLQJBLQIR )520 ZDBERRNLQJ (1',) (1'/223

FKHFN GDWDEDVH DFFHVV QHHGHG"

5($' 7$%/( LWBFXVWBQR ,1'(; 75$163257,1* 12 ),(/'6 ,) V\ VXEUF (4 QHZ FXVWRPHUV WR UHDG

UHDG QHZ FXVWRPHUV

6(/(&7 )520 VFXVWRP

,172 &255(6321',1* ),(/'6 2) 7$%/( OLBVFXVWRP

)25 $// (175,(6 ,1 LWBFXVWBQR

:+(5( LG LWBFXVWBQR WDEOHBOLQH ,) V\ VXEUF 1(

5$,6( GDWDBHUURU (1',)

/223 $7 OLBVFXVWRP ,172 ZDBVFXVWRP VWRUH LQ JOREDO FDVK WDEOH

,16(57 ZDBVFXVWRP ,172 7$%/( LWBVFXVWRP DGG QHZ QDPHV WR ERRNLQJBQRGHBWDEOH

/223 $7 LBERRNLQJBLQIR ,172 ZDBERRNLQJ :+(5( FXVWRPLG ZDBVFXVWRP LG

ZDBERRNLQJ QDPH ZDBVFXVWRP QDPH

02',)< 7$%/( LBERRNLQJBLQIR )520 ZDBERRNLQJ (1'/223 (1'/223 (/6(

QRWKLQJ WR GR EHFDXVH QDPH KDYH DOUHDG\ EHHQ FRSLHG

(1',)

(1'0(7+2'

*OREDO 'DWD 7\SHV 8VHG LQ WKH $%$3 'LFWLRQDU\ 7DEOH 7\SHV BC412_FUNCTION_ITT The table type %& B)81&7,21B,77 has the type 67$1'$5' and uses the row type %& B)81&7,21B6758&. The row type consists of the following two fields:

© SAP AG

BC412

11-42


)LHOG QDPH

)&2'(

7(;7

'DWD HOHPHQW

7\SH

8,B)81&

&+$5

*8,B7(;7

&+$5

BC412_MAP_HASH1 The table type %& B0$3B+$6+ has the type +$6+ and uses the row type %& B0$3B/,1(7<3(. The row type consists of the following fields: )LHOG QDPH

%.(<

%.(<

%.(<

%.(<

7.(<

'DWD HOHPHQW

6B&$55B,'

6B&211B,'

6B'$7(

6B%22.B,'

79B12'(.(<

The fields %.(< , %.(< , %.(< and %.(< make up the table key.

BC412_MAP_HASH1 The table type %& B0$3B+$6+ has the type +$6+ and uses the row type %& B0$3B/,1(7<3(. The field 7.(< is the table key.

BC412_SBOOK_ITT The table type %& B6%22.B,77 has the type 6257(' and uses the row type 6%22.. The fields &$55,', &211,', )/'$7( and %22.,' are key fields.

BC412_SBOOK_NODE_ITT The table type %& B6%22.B12'(B,77 has the type 67$1'$5' and uses the row type %& B6%22.B12'(B6758&. The row type includes the structure 6%22. and additionally uses the field 1$0( (data element 6B&8671$0().

BC412_SCARR_ITT The table type %& B6&$55B,77 has the type 6257(' and uses the row type 6&$55. The field &$55,' is a key field.

BC412_SUSTOM_ITT The table type %& B6&86720B,77 has the type 6257(' and uses the row type 6&86720. The field ,' is a key field.

BC412_SFLIGHT_ITT The table type %& B6)/,*+7B,77 has the type 6257(' and uses the row type 6)/,*+7. The fields &$55,', &211,', and )/'$7( are key fields.

Š SAP AG

BC412

11-43


BC412_SPFLI_ITT The table type %& B63)/,B,77 has the type 6257(' and uses the row type 63)/,. The fields &$55,' and &211,' are key fields.

6WUXFWXUH 7\SHV BC412_SIM_TREE_NODE_STRUC The structure type %& B6,0B75((B12'(B6758& includes the structure TREEV_NODE and additionally has the field TEXT (CHAR 120).

'DWD (OHPHQWV The following data elements are used: 'DWD HOHPHQW

%& B/(9(/

%& B7(;7

%& B7(;7

%& B7(;7B'(

Š SAP AG

7\SH

,17

&+$5

&+$5

&+$5

BC412

11-44


:RUNEHQFK (GLWLRQ ± &RQWUROV 7HFKQRORJ\ 2YHUYLHZ

&RQWUROV 7HFKQRORJ\ is SAP’s new book about controls programming in ABAP. R/3 Release 4.6 (EnjoySAP) has seen a comprehensive redesign of the user interface of the most important application and Basis transactions in the system. At the center of this initiative is the new controls technology. This book is an introduction to controls programming, containing numerous programming examples and a full programming reference.

$ERXW WKH $XWKRUV

&RQWUROV 7HFKQRORJ\ has been written by the same experienced team of SAP information developers that brought you the successful ABAP/4 Development Workbench Documentation Set in Release 3.0. &RQWUROV 7HFKQRORJ\ is the ideal companion to this existing documentation.

7DUJHW *URXS

&RQWUROV 7HFKQRORJ\ is aimed at ABAP programmers and project managers who are interested in the new features of the R/3 Basis system in Release 4.6.

)HDWXUHV DW D *ODQFH •

Four-color printing on high-quality paper

Over 400 pages of comprehensive documentation

Easy introduction to controls technology

Numerous programming examples and illustrations

Full control programming reference

• An indispensable companion for all ABAP professionals •

Release 4.6A

Notes on performance optimization

&RQWHQW 6XPPDU\ •

Introduction to control technology

The Control Framework

Container controls

SAP Toolbar Control

SAP Picture and SAP HTML Viewer

SAP Textedit Control

SAP Simple Tree, List Tree, and Column Tree Control

ALV Grid Control

Control tutorial

+RZ WR 2UGHU 6$3 3DUWQHUV DQG &XVWRPHUV LQ (XURSH

SAP customers and partners can order &RQWUROV 7HFKQRORJ\ online from the SAP Store (www.sap.com) using material number 500 32 529.

© SAP AG

BC412

11-45


+RZ WR 2UGHU 6$3 3DUWQHUV DQG &XVWRPHUV 2XWVLGH (XURSH You can order &RQWUROV 7HFKQRORJ\ online at www.fatbrain.com

Karl Kessler

© SAP AG

BC412

11-46


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.