In an SAP development system, you have created a Web Dynpro application and created an initial screen. For more information, see:
Creation of UI Structure
In an SAP development system, enter transaction SE11. The ABAP Dictionary: Initial Screen appears.
Select the Data Type radio button.
Enter name for the data type.
Choose Create. The Create Type dialog box appears.
Select Structure and choose Continue. The Dictionary : Change Structure screen appears.
Enter the description in the Short Description field.
Enter the following fields in the Component Column:
Component |
Typing Method |
Component Type |
---|---|---|
PAR_KEY |
TYPES |
/BOBF/CONF_KEY |
IS_LEAF |
TYPES |
BOOLEAN |
EXAPNDED |
TYPES |
BOOLEAN |
IMAGE_SRC |
TYPES |
FPMGB_IMAGE_SRC |
CHILDREN_LOADED |
TYPES |
BOOLEAN |
TEXT |
TYPES |
FPM_TEXT |
Save and Activate your entries.
Creation of Class to Map UI Structure and BO Node Structure
In an SAP development system, enter transaction SE80.
In the navigation area select Package.
Enter the name of the package in which the class has to be created.
Choose Display. The selected package structure appears.
Navigate to Class Library.
Right-click Class Library and choose Create ->Class. The Create Class dialog box appears.
Enter the class name in the Class field.
Enter a description.
Choose Public in the Instantiation field.
Select Usual ABAP Class in the Class Type radio button.
Select Final checkbox.
Save your entries. The Class Builder screen appears.
Maintaining the Class
Choose the Properties tab.
Choose the Superclass pushbutton.
Enter /BOFU/CL_FBI_VIEW_MAPPER in the Superclass field.
Save your entries.
Choose Methods tab.
Select /BOFU/IF_FBI_VIEW_DATA_MAPPER~MAP_DATA_BO_NODE_TO_UI method.
Choose the Redefine pushbutton.
Enter the following code in the method.
FIELD-SYMBOLS:
<is_ui_data> (Type the UI structure created in the section Creation of UI Structure)
CALL METHOD Super -> /bofu/if_fbi_view_data_mapper~map_data_bo_node_to_ui
Exporting
it_node_data - it_node_data
IMPORTING
et_ui_data = et_ui_data
LOOP AT et_ui_data ASSIGNING <is_ui_data>
IF <is_ui_data>-par_key = <is_ui_data>-log_parent_key.
CLEAR <is_ui_data>-log_parent_key.
ELSE.
<is_ui_data>-par_key = <is_ui_data>-log_parent_key.
ENDIF.
ENDLOOP.
Save your entries.
Check and Activate the class.
Creating an FBI View for Tree UIBB
Create an FBI View. For more information refer to Configuring an FBI View.
In the Header tab, enter the following additional details:
Node UI Structure — As created in the section Creation of UI Structure.
Mapper Class — As created in the section Creation of Class to Map UI Structure and BO Node Structure.
Save the FBI view configuration.
Creating a tree UIBB
Choose the Main Screen row in the table below the Navigation pane of the component configuration of your application.
To create a tree UIBB for the main page, on the Object Instance Schema tab, choose the UIBB button and select Tree Component.
Enter the following details for the tree GUIBB:
Component: FPM_TREE_UIBB
View: TREE_WINDOW
Configuration Name: An appropriate configuration name
Save your entries.
Configuring a Tree UIBB
Choose Configure UIBB.
To create the configuration for your UIBB, in the Editor for the Web Dynpro ABAP Component Configuration screen, choose New.
In the Create Configuration dialog box, enter the description and confirm your entry.
In the Select Package dialog box, enter the package and confirm your entry.
In the Edit Feeder Class dialog box, enter the /BOFU/CL_FBI_GUIBB_TREE feeder class and choose Edit Parameters.
In the Edit Parameters dialog box, enter the following feeder parameters and choose OK:
FBI view name as created in the section Creating an FBI View for Tree UIBB.
Select the Handles Toolbar checkbox.
Parent Key - LOG_PARENT_KEY
Row Key -KEY
Expanded -EXAPNDED
Is Leaf - IS_LEAF
Text -NAME
Children Loaded -CHILDREN LOADED
Image Source -IMAGE_SRC
On the Component Configuration screen, choose the Tree UIBB Schema tab.
Choose Column.
In the Edit Column dialog box, select the elements to be displayed on the tree and choose OK.
Save the tree UIBB configuration.
Return to the Component Configuration screen.
Creating Wires in Wiring Schema
On the Wire Schema tab, choose the Graphical Wire Editor.
Perform the required wiring. For more information, see Creating Wires in Wiring Schema.