ISH Imp AdminGuidesmartUI V1-1 en
ISH Imp AdminGuidesmartUI V1-1 en
ISH Imp AdminGuidesmartUI V1-1 en
Font Description
Example Words or characters quoted from the screen. These include field names, screen titles,
pushbutton labels, menu names, menu paths and menu options.
Textual cross-references to other documents.
Example Technical names of system objects. These include report names, program names,
transaction codes, table names and key concepts of a programming language when they are
surrounded by body text, for example, SELECT and INCLUDE.
Example Output on the screen. This includes file and directory names and their paths, messages,
names of variables, parameters, source code as well as names of installation, upgrade and
database tools.
Example Exact user input. These are words or characters that you enter in the system exactly as they
appear in the documentation.
<Example> Variable user input. Angle brackets indicate that you replace these words and characters
with appropriate entries to make entries in the system.
2 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
Document History
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 3
Contents
1 Introduction.............................................................................................................................................. 5
1.1 Use ............................................................................................................................................................................ 5
1.2 Prerequisites ............................................................................................................................................................ 5
1.3 Methodology ............................................................................................................................................................ 5
1.4 Structure .................................................................................................................................................................. 6
4 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
1 Introduction
1.1 Use
The purpose of this administrator's guide is to provide the information needed to add custom clinical order
components to service ordering in Smart UI. It demonstrates the basic steps when creating the required additions
for the clinical order components to be used in the Web Dynpro landscape. At the end of this tutorial you will be
able to add custom clinical order components to service ordering in Smart UI. You will also be familiar with most
of the classes and methods required for this purpose.
Service ordering in Smart UI uses the classical clinical order backbone (classes, function groups, tables) and adds
Web Dynpro technology to it.
1.2 Prerequisites
You are using i.s.h.med as of ERP 6.0 EHP6/10 and want to use your existing custom clinical order components
for the clinical order also in Smart UI.
To understand the various steps, you should have technical background knowledge in the following areas:
ABAP Workbench
Object-oriented ABAP programming
Web Dynpro Framework
The administrator's guide focuses on the specifics of the i.s.h.med implementation and does not explain the above
aspects in detail.
Your existing custom clinical order components form the basis for the steps described hereafter. This means that
these custom clinical order components must be created and you need to be familiar with them so as to embed
the components in service ordering in Smart UI as described in this document. If you only want to use the custom
clinical order components in service ordering in Smart UI, you do not require the corresponding display classes.
You can use, among other things, the Web Dynpro components from the standard i.s.h.med system as a
reference.
Note
Header components and item components basically behave in the same way in the clinical order and in
service ordering. However, the system synchronizes the fields of header components in service ordering,
as standard, if you specify this in the component configuration.
1.3 Methodology
This administrator's guide describes step-for-step the approach with the ABAP Workbench. Create the example
component ZN1CORD_COMP_TUTORIAL as the example to be used throughout. The guide uses the i.s.h.med Web
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 5
Dynpro component N1CORD_COMP_COMMENT and the related UIBB controller class
CL_ISHMED_CORD_UC_COMMENT as a reference.
1.4 Structure
First, Chapter 2.1 describes how you create the objects required for a custom Web Dynpro component for service
ordering in Smart UI. Chapter 2.2 describes how to add interface functionality to the component and how to
configure a single view. Next, Chapter 2.3 covers the capabilities of the cross-UICC layout configuration and the
configuration options for individual fields offered by transaction N1COT. Chapter 2.4 describes the final integration
between clinical order component and the Web Dynpro environment through changes to the clinical order
component itself.
6 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2 Adding Custom Clinical Order Components
to Smart UI
2.1 Preparations
This chapter describes how to create the objects required for a custom clinical order component in the Smart UI
landscape. The following steps are required for this:
Create a Web Dynpro component
Create a UIBB controller class for the Web Dynpro component
Implement the specific methods for Web Dynpro UIBBs
You create the basic Web Dynpro component ZN1CORD_COMP_TUTORIAL and the related UIBB controller class
ZCL_ISHMED_CORD_UC_TUTORIAL for the example.
Note
The specifications for Window Name and View Name respect the naming convention for service ordering
in Smart UI Web Dynpro. If you want to use other names, make sure that you use the correct names when
referring to the window and the view.
3. Confirm your input by clicking E n t e r or Confirm and save the Web Dynpro component you have created.
To be able to use the Web Dynpro component in Smart UI, you need to implement the interface
IF_FPM_UI_BUILDING_BLOCK. To do this, perform the following steps:
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 7
1. Navigate to the Implemented Interfaces tab in your component and add the interface
IF_FPM_UI_BUILDING_BLOCK to the list:
2. Press E n t e r and click the Reimplement pushbutton that appears in the Action column.
3. Choose Save. By adding this interface, you add the methods listed below to the COMPONENTCONTROLLER.
These are used later on to enable the component to take part in the event loop and in the phases of the
Floorplan Manager (FPM):
o AFTER_FAILED_EVENT
o FLUSH
o NEEDS_CONFIRMATION
o PROCESS_BEFORE_EVENT
o PROCESS_EVENT
4. Activate the component.
In the following section, you create a UIBB controller class for the Web Dynpro component. You use this class to
map the Web Dynpro functionality and logic and to enable integration into the architecture of service ordering in
Smart UI Web Dynpro. To do this, perform the following steps:
1. Call transaction SE80 and choose Classes/Interfaces in the selection list in the Repository Browser.
The naming convention for the delivered classes of service ordering in Smart UI Web Dynpro is:
CL_<ProjectName>_CORD_UC_<ComponentName>.
The class name has the following format:
o CL stands for class.
o CORD stands for clinical order.
o UC stands for UIBB (User Interface Building Block) Controller.
The name of the example class used in the customer namespace is ZCL_ISHMED_CORD_UC_TUTORIAL.
2. Choose the following class in the Superclass input field: CL_ISHMED_CORD_UC_COMPONENT.
8 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
3. Choose Save and redefine the following methods of the superclass without implementing them:
o _LOAD_CORD_COMPONENT
o _REFRESH_DISPLAY
Also create the new method SUPPLY_DATA. On the Attributes tab, choose Public visibility and the Instance
method. On the Parameters tab, define the signature in the Create Method dialog box, as illustrated in the
screenshot below:
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 9
2.1.3 Implementing UIBB-Specific Methods
This chapter describes the implementation of the methods in the COMPONENTCONTROLLER of the Web Dynpro
component. The example implementation is based on the component N1CORD_COMP_COMMENT.
You can copy the source code examples from this chapter into your implementation.
Alternatively, you can display the Web Dynpro component N1CORD_COMP_COMMENT and copy the methods from
there.
Note
Note the following when copying the implementation from the component N1CORD_COMP_COMMENT:
In the method WDDOINIT, adjust the class name i_clsname in accordance with the UIBB controller
class used.
If you have changed it, also adjust the name GR_UIBBCTRL for the reference to the UIBB controller
class.
Double-click COMPONENTCONTROLLER in the tree view of the example component
ZN1CORD_COMP_TUTORIAL and navigate to the Methods tab.
Double-click the respective method name to access the method implementation.
Perform the following steps to implement the interface to the Floorplan Manager and the transfer to the UIBB
controller class:
METHOD after_failed_event .
cl_ishmed_fpm_manager=>uibb_after_failed_event(
ir_uibbctrl = wd_this->gr_uibbctrl
io_event = io_event
it_interface_views = it_interface_views
iv_revert = iv_revert ).
ENDMETHOD.
METHOD flush .
cl_ishmed_fpm_manager=>uibb_flush(
ir_uibbctrl = wd_this->gr_uibbctrl
it_interface_views = it_interface_views ).
ENDMETHOD.
10 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
3. Implement the method NEEDS_CONFIRMATION as follows:
METHOD needs_confirmation .
ENDMETHOD.
METHOD process_before_output .
cl_ishmed_fpm_manager=>uibb_process_before_output(
ir_uibbctrl = wd_this->gr_uibbctrl
io_event = io_event
it_interface_views = it_interface_views ).
ENDMETHOD.
METHOD process_event .
ENDMETHOD.
METHOD WDDOAPPLICATIONSTATECHANGE .
CHECK wd_this->gr_uibbctrl IS BOUND.
wd_this->gr_uibbctrl->WDDOAPPLICATIONSTATECHANGE(state_change = state_change).
ENDMETHOD.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 11
7. Implement the method WDDOBEFORENAVIGATION as follows:
METHOD wddobeforenavigation .
wd_this->gr_uibbctrl-
>wddobeforenavigation( is_current_root = is_current_root ).
ENDMETHOD.
METHOD wddoexit .
ENDMETHOD.
9. Implement the method WDDOINIT as follows to initialize the reference to the UIBB controller class:
METHOD wddoinit .
ENDMETHOD.
Note
If you use a name other than that suggested for the UIBB controller class, adjust the value of the
parameter i_clsname.
12 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
10. Implement the method WDDOPOSTPROCESSING as follows:
METHOD wddopostprocessing .
ENDMETHOD.
This chapter describes the enhancement of the Web Dynpro component through the following steps:
Add a CONTEXT node to the COMPONENTCONTROLLER
Modify the layout of the view V_MAIN
Implement the methods of the view V_MAIN
This chapter describes how to create the nodes and attributes in the CONTEXT of the COMPONENTCONTROLLER.
The DATA node contains all relevant data for the clinical order component. The system needs the SCRM_DATA
node for the screen display of the order type, based on the layout configuration. For more information, see
Chapter 2.3.
The SCRM_DATA node is connected with the SCRM_CONFIG controller. How to create the SCRM_CONFIG controller
is described in Chapter 2.4.1.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 13
Perform the following steps to complete the CONTEXT:
1. Define the attributes of the DATA node and of the SCRM_DATA node with the same names and types as
in the i.s.h.med component N1CORD_COMP_COMMENT:
You can choose any name for the DATA node. In this case, you need to adjust the name of the node to
your chosen name in the subsequent process. However, we recommend that you use SCRM_DATA as the
node name for layout data, as otherwise more extensive modifications are required.
Note
Define the nodes in the CONTEXT as interface nodes to be able to access them from outside the Web
Dynpro component.
2. To fill the CONTEXT node at initialization, create a SUPPLY_DATA method for the DATA node with call to
the UIBB controller class, as follows:
METHOD supply_data .
wd_this->gr_uibbctrl->supply_data(
node = node
parent_element = parent_element ).
ENDMETHOD.
14 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2.2.2 Configuring the View Layout
Based on the creation and configuration of the COMPONENTCONTROLLER in the previous chapter, this chapter
describes how to set up the view V_MAIN. You are free to define the layout of the view provided that the element
properties below are connected as follows. Here you can again use the We Dynpro component
N1CORD_COMP_COMMENT from the standard i.s.h.med system as a reference.
For the example, select the input field COMMENT in the tree view of the ROOTUIELEMENTCONTAINER. Call the Define
Context Binding dialog box to connect properties of UI elements of the CONTEXT by clicking the pushbutton in the
Binding column of the row of the relevant property. For the example, define the connection to the element
COMMENT of the DATA node, as follows:
1. Call the Define Context Binding dialog box and bind the COMMENT attribute of the DATA node to the
property value of the input field in the view.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 15
2. Call the Define Context Binding dialog box for the property enabled.
Choose the attribute COMMENT of the DATA node in the tree view of the CONTEXT and choose the radio
button Bind to the Property of the Selected Attribute.
Choose the property Enabled from the selection list Property and confirm your entries.
3. Call the Define Context Binding dialog box for the property readOnly.
Choose the attribute COMMENT of the DATA node in the tree view of the CONTEXT and choose the radio
button Bind to the Property of the Selected Attribute.
Choose the property Read Only from the selection list Property.
4. Call the Define Context Binding dialog box for the property state.
Choose the attribute COMMENT of the DATA node in the tree view of the CONTEXT and choose the radio
button Bind to the Property of the Selected Attribute.
Choose the property Required from the selection list Property.
5. Call the Define Context Binding dialog box for the property visible.
Choose the attribute COMMENT of the DATA node in the tree view of the CONTEXT and choose the radio
button Bind to the Property of the Selected Attribute.
Choose the property Visible from the selection list Property.
16 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2.2.3Implementing View Methods
Subsequent to the creation of the view layout and the connection with the Web Dynpro component data, this
chapter describes the methods of the view. The implementation basically just wraps the calls to the UIBB
controller class. As in Chapter 2.1.3, the implementation is based on the component N1CORD_COMP_COMMMENT.
You can copy the source code examples from this chapter into your implementation.
Alternatively, you can copy the implementation from the Web Dynpro component N1CORD_COMP_COMMENT of the
standard i.s.h.med system.
Note
If necessary, adjust the name GR_UIBBCTRL for the reference to the UIBB controller class in your
implementation.
Double-click the V_MAIN view in the tree view of the example component ZN1CORD_COMP_TUTORIAL and
navigate to the Methods tab.
Call the implementation of the respective methods by double-clicking the relevant row.
1. Implement the method WDDOAFTERACTION as follows:
METHOD wddoafteraction .
ENDMETHOD.
METHOD wddobeforeaction .
ENDMETHOD.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 17
3. Implement the method WDDOEXIT as follows:
METHOD wddoexit .
ENDMETHOD.
METHOD wddoinit .
ENDMETHOD.
METHOD wddomodifyview .
wd_comp_controller->gr_uibbctrl->wddomodifyview(
first_time = first_time
view = view ).
ENDMETHOD.
METHOD wddocontextmenu .
menu = wd_comp_controller->gr_uibbctrl->wddooncontextmenu(
ir_view_controller = wd_this->wd_get_api( )
context_menu_event = context_menu_event
context_menu_manager = context_menu_manager ).
ENDMETHOD.
18 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2.3 Enhancements in Transaction N1COT
This chapter describes how to add the following Smart UI configuration options to transaction N1COT:
Layout configuration for individual order types
Field attribute configuration for individual Web Dynpro components
If you want to use the Customizing activities for your Web Dynpro component, you need to add a custom
controller to your Web Dynpro component as described in Chapter 2.4.1.
You call the configuration of the order type for Smart UI from transaction N1COT by clicking the Configure Layout
pushbutton on the Structuring tab. The system displays a preview of the display of the order type in Smart UI in
the Configure Layout screen.
Service ordering does not use the tab page design elements from the Structuring tab. Instead, you can use the
Floorplan Manager (FPM) to define a layout configuration that is valid for all Web Dynpro components. This
provides the following options for configuring the display of an order type in Smart UI:
Split Web Dynpro components into columns
Combine or stack Web Dynpro components in tabs
For example, you can combine the example comment field for displaying the order type in Smart UI on a tab with
further textual or administrative information.
You call the layout configuration in the Configure Layout screen by clicking the pushbutton with the quick info text
Personalize.
For information about personalizing an order type using a Floorplan, see the SAP Help Portal (help.sap.com)
under:
SAP NetWeaver SAP NetWeaver Platform SAP NetWeaver 7.0 Including Enhancement Package 3
Application Help English SAP NetWeaver by Key Capability Application Platform by Key Capability ABAP
Technology UI Technologies in ABAP Floorplan Manager Web Dynpro ABAP Floorplans Floorplan for
Overview Page (OVP) Personalizing Pages in an Overview Page Floorplan
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 19
2.3.2Field Attribute Configuration for Web Dynpro Components
Service ordering provides an overview of the order type's Web Dynpro components in the UIBB Settings dialog
box. You can select an existing configuration in the Config ID column or create or change a field attribute
configuration for the respective Web Dynpro component using the hotspot on Create/Edit Configuration. In the
Interface Views column, you can define the window and the associated view of the Web Dynpro component that
the system is to use for this order type.
Note
The system generally uses the term Interface View for the window assigned to a Web Dynpro component
in connection with the Floorplan Manager.
The Component Configuration screen for creating and editing a field attribute configuration enables you to define
the following attributes for each field, irrespective of status, via a selection list for each Web Dynpro component:
Optional: The system displays the field as active; the user is not required to make an entry.
Mandatory: The system displays the field as active; the user is required to make an entry and the system
displays a relevant error message.
Display: The system displays the field; however the field is not active.
Inactive: The system does not display the field.
The configuration for service ordering overwrites the status-dependent settings from Customizing for the clinical
order on the Screen Modification, subject to the following conditions:
Fields that are defined as mandatory in one of the settings are required entry fields.
Fields that are defined as mandatory in none of the settings and are defined as inactive in one setting are
configured as inactive.
Fields that are defined as mandatory or inactive in none of the settings are configured as display if you
have specified this in one of the settings.
20 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
The settings thus have the following priority:
Mandatory
Inactive
Display
Optional
For fields you define as "optional" in the field attribute configuration of service ordering, the status-dependent
settings from the Screen Modification apply without restriction.
Recommendation
Do not use the additional configuration option in the Web Dynpro Built-In group box on the Component
Configuration screen. The system does not interpret these settings. You can, however, hide optional fields
by means of this group box, making input impossible.
You call the UIBB Settings dialog box via the corresponding pushbutton on the Configure Layout screen.
For information about setting up order types, see the Implementation Guide under:
SAP Healthcare - Industry-Specific Component Clinical System Clinical Order Clinical Order Basic
Data Set Up Order Types for Clinical Order
SAP Healthcare - Industry-Specific Component Clinical System Smart UI Applications Service
Ordering General Information on Service Ordering
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 21
2.4 Completing the Web Dynpro Component, the UIBB Controller
Class and the Clinical Order Component
This chapter describes the final steps to complete the participating classes, as follows:
Add a configuration controller to the Web Dynpro component
Complete the UIBB controller class
Implement the Web Dynpro interface in the clinical order component
To create a configuration controller for the Web Dynpro component, perform the following steps:
1. Select the custom controller for the Web Dynpro component. To do this, select the Web Dynpro
component and choose Edit Configuration Data. In the Configuration Editor field, select the
configuration controller N1CORD_CONF_COMPONENT.
2. To create a custom controller, choose Create Custom Controller in the context menu for the Web
Dynpro component in the tree view.
In the Controller input field, enter SCRM_CONFIG as the name of the controller.
In the Description input field, enter a description, such as Configuration controller.
3. Change the controller type to configuration controller by choosing Change to Configuration Controller in
the context menu for the controller in the tree view of the Web Dynpro component.
4. Create the CONTEXT node on the Context tab for SCRM_CONFIG, as illustrated in the screenshot below.
Use the CONTEXT of the standard component N1CORD_COMP_COMMENT as a reference to copy attributes
and types. To do this, choose the Create Using the Wizard Copy Nodes of Different Context function in
the context menu of the CONTEXT node. Enter N1CORD_CONF_COMPONENT in the Component Name field
and choose SCRM_CONFIG in the View/Controller Name field. Confirm your selection and choose the node
SCRM_DATA in the resulting dialog box. Confirm your selection.
5. Create a new controller usage for the COMPONENTCONTROLLER. To do this, choose the
COMPONENTCONTROLLER and choose Controller Usage. Select the SCRM_CONFIG controller for the Web
Dynpro component TUTORIAL.SCRM_CONFIG. Use drag&drop to map the node SCRM_DATA to the
context of the COMPONENTCONTROLLER of the Web Dynpro component.
22 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
6. Create the method SUPPLY_SCRM_DATA for the SCRM_DATA node that contains the definitive field
properties and layout configuration as described in Chapter 2.3.
The controller N1CORD_CONF_COMPONENT overwrites the configuration controller of the Web Dynpro component.
A separate COMPONENTCONTROLLER exists for the clinical order components Services and Surgery Team:
N1CORD_CONF_SERVICES
N1CORD_CONF_SURG_TEAM
This chapter describes how to complete the UIBB controller class (in the example:
ZCL_ISHMED_CORD_UC_TUTORIAL), in the following steps:
Configure data transfer between the clinical order component and the Web Dynpro component
React to the events of the Floorplan Manager at Web Dynpro component level
Resource cleanup
You have the possibility to call the functions of the service ordering API. The API is implemented as a singleton
and you can access the API via the reference gr_instance. Amongst other things, you can determine the
services for an order using the method ordsrv_get as follows:
cl_ishmed_cord_appapi=>gr_instance->if_ishmed_cord_appapi~ordsrv_get( ir_cordpos =
lr_cordpos ).
Note
You can find further examples of how to configure the data transfer in the components of the standard
i.s.h.med system, which inherit from CL_ISHMED_UC_COMPONENT and implement the method
SUPPLY_DATA.
Perform the following steps to implement the methods created in Chapter 2.1.2 and thus set up data transfer
between the clinical order component and the UIBB controller class:
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 23
1. Implement the method SUPPLY_DATA to determine the relevant information from the clinical order
component and then bind it to the CONTEXT of the Web Dynpro component. You can use the
implementation in the UIBB controller class CL_ISHMED_CORD_UC_COMMENT in the example:
METHOD supply_data.
DO 1 TIMES.
CHECK gr_corder IS BOUND.
CALL METHOD gr_corder->get_data
IMPORTING
es_n1corder = ls_n1corder
e_rc = l_rc
CHANGING
cr_errorhandler = lr_errorhandler.
IF l_rc <> 0.
_report_errorhandler_messages( ir_errorhandler = lr_errorhandler ).
EXIT.
ENDIF.
TRY.
ls_data-comment = cl_ishmed_cord_utl_webdynpro=>get_ltx_string(
ir_textmodule = gr_corder
i_text_id = cl_ish_corder=>co_text_rmcord
i_first_line = ls_n1corder-rmcord ).
CATCH cx_ish_static_handler INTO lx_root.
_report_exception( ir_exception = lx_root ).
ENDTRY.
ENDDO.
IF gr_handler_prop IS BOUND.
gr_handler_prop->set_properties( ir_context_node = node ).
ENDIF.
ENDMETHOD.
24 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2. Implement the method _LOAD_CORD_COMPONENT to load the reference to the clinical order component in
the following steps:
1. Load the definition of the clinical order component
2. Check the correctness of the reference
For the parameter i_classid, use the class name of the clinical order component you want to make
available in Smart UI.
In the following source code example, you use the reference gr_corder as the reference to a header
component. If you work with an item component, instead use the reference gr_cordpos in the relevant
places.
Note
The implementation in the UIBB controller class CL_ISHMED_CORD_UC_COMMENT uses
gr_comp_comment as the name for the reference to the associated clinical order component.
Implement the method in the same way as the implementation in CL_ISHMED_CORD_UC_COMMENT, as
follows:
METHOD _load_cord_component.
rr_cord_component = gr_comp_my_comp_name.
ENDMETHOD.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 25
3. Implement the method _REFRESH_DISPLAY to refresh the display. To do this, call the method
SUPPLY_DATA created in step 1:
METHOD _refresh_display.
ENDMETHOD.
4. Redefine the method __PROCESS_CONTEXT_CHANGE_LOG in the UIBB controller class. This lets you
process user input in the following cases:
o Exit the Web Dynpro Component
o Save the orders
o Check the orders
You save the user input in the relevant tables by accessing the data object of the order component via the
reference gr_comp_my_component. This extract from the implementation of the class
CL_ISHMED_CORD_UC_CPOS describes the work with the context change log:
METHOD __process_context_change_log.
super->__process_context_change_log( ).
26 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
ls_corder_x-ordpri_x = abap_true.
WHEN co_attr_date_apcn.
CHECK <ls_log>-new_value IS BOUND.
ASSIGN <ls_log>-new_value->* TO <l_wdate>.
ls_apcn_x-wdate = <l_wdate>.
ls_apcn_x-wdate_x = abap_true.
WHEN co_attr_time_apcn.
CHECK <ls_log>-new_value IS BOUND.
ASSIGN <ls_log>-new_value->* TO <l_wtime>.
ls_apcn_x-wtime = <l_wtime>.
ls_apcn_x-wtime_x = abap_true.
ENDCASE.
ENDLOOP.
If you want to be able to react to the Floorplan Manager (FPM) events at the level of the individual Web Dynpro
components, redefine the method _PROCESS_EVENT, also. You can also use this method if you want to react to
user actions in one single place.
This source code from the class CL_ISHMED_CORD_UC_SERVICES describes an example implementation in which
the system generates individual services upon a user action:
METHOD _process_event.
CLEAR ev_result.
IF io_event IS INITIAL.
RETURN.
ENDIF.
CASE io_event->mv_event_id.
WHEN cl_ishmed_cord_fpmevents=>co_id_generate_indservices.
lr_cordpos = cl_ishmed_cord_fpmparams=>generate_indservices( ir_event = io_event
).
IF lr_cordpos = gr_cordpos.
_cmd_generate_indservices( ir_event = io_event ).
ELSE.
CALL METHOD super->_process_event
EXPORTING
io_event = io_event
it_interface_views = it_interface_views
IMPORTING
ev_result = ev_result.
ENDIF.
WHEN 'SERVICES_SET_DETAILS'.
CHECK gr_details_data_element IS BOUND.
_show_details( ir_data_element = gr_details_data_element ).
WHEN co_action_generate.
_generate_indservices( ).
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 27
* WHEN cl_ishmed_cord_fpmevents=>co_id_goto_indsrv_full.
* _cmd_goto_indsrv_full_scrm( ir_event = io_event ).
WHEN OTHERS.
CALL METHOD super->_process_event
EXPORTING
io_event = io_event
it_interface_views = it_interface_views
IMPORTING
ev_result = ev_result.
ENDCASE.
ENDMETHOD.
Now redefine the method _WDDOEXIT as follows to release the resources for the clinical order component and to
pass on the further release of resources in the hierarchy. Depending on the respective clinical order component,
release steps of differing complexity are possible:
METHOD _wddoexit.
CLEAR gr_comp_my_comp_name.
ENDMETHOD.
28 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
2.4.3Implementing Interface to the Web Dynpro Component in the
Clinical Order Component
This chapter describes the completion of the connection between Web Dynpro component and the clinical order
component.
Note
For the example, this guide uses the clinical order component CL_ISHMED_COMP_COMMENT, in which the
modifications discussed here have already been made.
Add the interface IF_ISHMED_CORD_WDCOMPONENT to the clinical order component and implement the interface
methods for the last step, as illustrated in the following steps:
1. Implement the method GET_UIBB in the same way as the implementation in the class
CL_ISHMED_COMP_COMMENT. Adjust the name of the Web Dynpro component and of the window in
accordance with your entries in Chapter 2.1.1:
Rs_uibb-component: Name of the Web Dynpro component (in the example:
ZN1CORD_COMP_TUTORIAL)
Rs_uibb-interface_view: Name of the window (in the example: W_MAIN)
The source code below shows the implementation in the class CL_ISHMED_COMP_COMMENT in the
standard i.s.h.med system:
method IF_ISHMED_CORD_WDCOMPONENT~GET_UIBB.
rs_uibb-component = 'N1CORD_COMP_COMMENT'.
rs_uibb-interface_view = 'W_MAIN'.
lr_compdef = get_compdef( ).
IF lr_compdef IS BOUND.
rs_uibb-title = lr_compdef->get_compname( ).
ENDIF.
endmethod.
Using Custom Clinical Order Components in Smart UI © 2013 SAP AG. All rights reserved. 29
METHOD if_ishmed_cord_wdcomponent~get_fielddefs.
CLEAR ls_msgmap.
ls_msgmap-object_type = cl_ishmed_corder=>co_otype_corder_med.
ls_msgmap-msg_parameter = 'FRAME_COMMENT'.
ls_msgmap-msg_field = ''.
INSERT ls_msgmap INTO TABLE <ls_fielddef>-t_msgmap.
ENDCASE.
ENDLOOP.
ENDMETHOD.
Upon completion of these steps, you can use the clinical order component in service ordering in Smart UI.
30 © 2013 SAP AG. All rights reserved. Using Custom Clinical Order Components in Smart UI
www.sap.com/contactsap