Service Classes and Reusable Components
Factory Class
The factory /PLMU/CL_FRW_FACTORY offers methods to get the most important objects of the FPM SPI Integration (FSI) that can be used by its consumers:
- Action Utilities (/PLMU/IF_FRW_ACTION_UTIL) – Utilities for service and navigation handling
- Application Model (/PLMU/IF_FRW_APPL_MODEL) – The single point of access to the backend, bound to the context of a Web Dynpro component
- Basic Application Model (/PLMU/IF_FRW_BASIC_APPL_MODEL) – The single point of access to the backend without any context binding
- Message Manager (/PLMU/IF_FRW_MESSAGE_MANAGER) – To report messages on UI-level
- Wire Model (/PLMU/IF_FRW_W_MODEL_ACCESS) – For connecting a freestyle UIBB with the FPM Wire
Message Manager
The message manager /PLMU/IF_FRW_MESSAGE_MANAGER allows to hand over messages to Web Dynpro while filtering duplicate messages.
It offers the following methods:
PUBLISH_MESSAGE
This method forwards a single standard message to Web Dynpro.
Method signature:
Parameter | Data Type | Description |
---|---|---|
IS_MESSAGE | SYMSG | Standard message (mandatory) |
IV_MESSAGE_INDEX | SYTABIX | Index of the message in the UI (Default: '1') |
IO_WD_CONTEXT_ELEMENT | IF_WD_CONTEXT_ELEMENT | WD Context element the message should refer to |
IV_ATTRIBUTE_NAME | STRING | Attribute of the context element the message should refer to |
PUBLISH_MESSAGE_FREE_TEXT
This method forwards a single free text message to Web Dynpro.
Method signature:
Parameter | Data Type | Description |
---|---|---|
IS_MESSAGE | /PLMB/S_SPI_MSG_FREE_TEXT | Free text message (mandatory) |
IV_MESSAGE_INDEX | SYTABIX | Index of the message in the UI (Default: '1') |
IO_WD_CONTEXT_ELEMENT | IF_WD_CONTEXT_ELEMENT | WD Context element the message should refer to |
IV_ATTRIBUTE_NAME | STRING | Attribute of the context element the message should refer to |
PUBLISH_SYSTEM_MESSAGE
This method forwards a single system message (i.e. a message that is stored in the SY-fields) to Web Dynpro.
Method signature:
Parameter | Data Type | Description |
---|---|---|
IV_MESSAGE_INDEX | SYTABIX | Index of the message in the UI (Default: '1') |
IO_WD_CONTEXT_ELEMENT | IF_WD_CONTEXT_ELEMENT | WD Context element the message should refer to |
IV_ATTRIBUTE_NAME | STRING | Attribute of the context element the message should refer to |
HAS_VALIDATION_ERRORS
This method provides the info if the message manager contains validation errors.
Method signature:
Parameter | Data Type | Description |
---|---|---|
RV_RESULT | BOOLE_D | Returns ABAP_TRUE if there are validation errors |
Side-Panel Integration
The FSI offers a side-panel integration which automatically creates a side-panel link and handles the communication from main screen to the side-panel.
The only thing the application has to do is:
- Identify the desired side-panel by setting the application parameter 'wdSidePanelConfigurationId' in the Web Dynpro application configuration (e.g. to '/BCV/SIDEPANEL').
- Create an implementation for BAdI /PLMU/EX_FRW_SIDEPANEL which is part of enhancement spot /PLMU/ES_FRW_SIDEPANEL.
This BAdI will simply provide the parameters that should be handed over from the application to the side-panel. - Maintain the BAdI filter which consists of Web Dynpro application name and application configuration ID.
Usage of BAdI Filter Parameters
If you don't need a Web Dynpro application configuration specific BAdI implementation you should only use the Web Dynpro application as a filter parameter for your BAdI implementation.
This allows customers creating own configurations more easily while keeping the side-panel logic intact.
The BAdI interface (/PLMU/IF_EX_FRW_SIDEPANEL) offers the following methods:
GET_PARAM_TAG_MAP
This method will get called every time the side-panel gets opened or refreshed to retrieve a list of the parameters that should be passed to it.
If the side-panel should not get opened for some reason an error message can be returned instead.
Method signature:
Parameter | Data Type | Description |
---|---|---|
CT_PARAM_TAG_MAP | /PLMU/T_FRW_PARAM_TAG_MAP | Parameter to tag map for the side-panel |
CS_NO_SIDEPANEL_MESSAGE | SYMSG | Error message which will cancel opening the side-panel |
The parameters are handed over to the side-panel in the following format (/PLMU/T_FRW_PARAM_TAG_MAP):
Component | Data Type | Description |
---|---|---|
NAME | STRING | Name of the parameter |
VALUE | STRING | Value of the parameter |
TAG | STRING | Identifier for the parameter that was maintained in the tag repository of the side-panel |
METHOD /plmu/if_ex_frw_sidepanel~get_param_tag_map. DATA: lv_sysalias TYPE string, ls_param_tag_map TYPE /plmu/s_frw_param_tag_map. "Set the context key ls_param_tag_map-name = 'CONTEXT_KEY'. ls_param_tag_map-tag = '/BCV/:CONTEXT_KEY'. ls_param_tag_map-value = 'MY_CONTEXT_KEY'. INSERT ls_param_tag_map INTO TABLE ct_param_tag_map. "Tag the system alias in case your application runs in SAP Portal lv_sysalias = cl_wd_runtime_services=>get_url_parameter( 'SYSTEM_ALIAS' ). IF lv_sysalias IS NOT INITIAL. CLEAR ls_param_tag_map. ls_param_tag_map-name = 'SYSALIAS'. ls_param_tag_map-tag = '/BCV/:SYSALIAS'. ls_param_tag_map-value = lv_sysalias. INSERT ls_param_tag_map INTO TABLE ct_param_tag_map. ENDIF. "Pass application specific parameters e.g. material number in this case IF gv_matnr IS NOT INITIAL. CLEAR ls_param_tag_map. ls_param_tag_map-name = 'MATNR'. ls_param_tag_map-tag = '/BCV/:1MATERIAL'. ls_param_tag_map-value = gv_matnr. INSERT ls_param_tag_map INTO TABLE ct_param_tag_map. ENDIF. "Pass additional parameters... ENDMETHOD.
Parameters and Tags Must be Unique
The application needs to ensure that the tags and parameters that are handed over to the side-panel are unique.
CHECK_AUTHORITY
Before the side-panel link is displayed this method will get called and if the check fails (parameter CV_FAILED is set to ABAP_TRUE) the link won't get displayed.
METHOD /plmu/if_ex_frw_sidepanel~check_authority. DATA lv_authorized TYPE boole_d. "If the authorization check already failed "in another BAdI implementation, skip this one. IF cv_failed = abap_true. RETURN. ENDIF. "Check if BCV switch is active. IF /bcv/cl_fnd_bcv_switch_check=>bcv_img_01( ) = abap_false. cv_failed = abap_true. RETURN. ENDIF. "Check if the user has the authority to execute the side panel "with this context key lv_authorized = /bcv/cl_uif_ext_assist=>check_execute_sidepanel( iv_context_key = 'MY_CONTEXT_KEY'. iv_uname = sy-uname ). IF lv_authorized = abap_false. cv_failed = abap_true. RETURN. ENDIF. ENDMETHOD.
Refreshing the Side-Panel
When the user clicks on the refresh button of the side-panel the FSI will automatically request the application parameters again.
However it is also possible to explicitly refresh the parameters via method REFRESH_SIDEPANEL of class /PLMU/CL_FRW_APPL_CNTRL.
Deactivate the side-panel
The side-panel functionality is active by default when 'wdSidePanelConfigurationId' is set as described above.
To deactivate the side-panel you can cancel the FPM event with the ID /PLMU/IF_FRW_CONSTANTS=>GC_FPM_EVENT_ID-ACTIVATE_SIDEPANEL.
Preview Component
A preview represents a 'snap shot' of a foreign object type. Therefore it has a display only character.
The FPM SPI Integration (FSI) offers a generic UIBB (/PLMU/WDC_FRW_PREVIEW) for displaying previews. This generic preview component embeds other components that are maintained in the preview customizing table (/PLMU/FRW_PREVW). For each GOS object type, a preview component can be maintained in the mentioned customizing table.
The data supply of the generic preview component is realized with the wiring functionality.
In the wiring settings, the mapping mode 'Parameter Mapping' must be taken – with the default mapping mode (MOVE-CORRESPONDING) the data supply won't work.
Limitations
Currently the preview component is enabled for the OIF only.
Constants
General Constants – /PLMU/IF_FRW_CONSTANTS
This Interface includes the interfaces /PLMB/IF_SPI_C and /PLMB/IF_MDP_C, defines aliases for all their constants and provides the following set of own constants that can be used by the application UI in the context of the FSI:
Constant | Description |
---|---|
GC_AFTER_SAVE_REASON | Context of a SAVE call (needed in AFTER_SAVE of Application Controller) |
GC_APPLICATION_PARAMETER | Application parameters that are interpreted by the FSI (e.g. FRW_MODE) |
GC_CHANGE_KIND | Kind of change performed by the Application Model on the Context's data] |
GC_COMPONENT | Name of components that (only used FSI internally) |
GC_COMPONENT | Name of components that (only used FSI internally) |
GC_CONTEXT_MENU_ACTION | Name of the action handler for context menu actions |
GC_DATA_SOURCE | Data source (obsolete) |
GC_DATA_SOURCE | Data source (obsolete) |
GC_DEFAULT_WIRE_PORT_ID | Default wire port that will be used by the automatic wiring logic |
GC_DUMMY_SYSALIAS | Dummy system alias for navigation |
GC_FLUSH_STATUS | Status of the data flush (only used FSI internally) |
GC_FLUSH_STATUS | Status of the data flush (only used FSI internally) |
GC_FPM_EVENT_ID | FPM Event IDs that are used by the FSI |
GC_FPM_EVENT_PARAMETER | FPM Event parameters that are used by the FSI |
GC_FRW_MODE | Application parameter name FRW_MODE |
GC_FRW_PROCEED_TO_CHANGE | FPM Event ID for 'Proceed to Change' |
GC_FRW_PROCEED_TO_CREATE | FPM Event ID for 'Proceed to Create' |
GC_FRW_PROCEED_TO_DISPLAY | FPM Event ID for 'Proceed to Display' |
GC_FRW_PROCEED_TO_CHANGE | FPM Event ID for 'Proceed to Change' |
GC_FRW_PROCEED_TO_CREATE | FPM Event ID for 'Proceed to Create' |
GC_FRW_PROCEED_TO_DISPLAY | FPM Event ID for 'Proceed to Display' |
GC_G_FEEDER_PARAMETER | GUIBB feeder parameters |
GC_G_FEEDER_PARAMETER_TYPE | GUIBB feeder parameter data types |
GC_NAVIGATION_TARGET | Navigation targets |
GC_PATH | Path (obsolete) |
GC_PHASE | Phase (only used FSI internally) |
GC_PATH | Path (obsolete) |
GC_PHASE | Phase (only used FSI internally) |
GC_PREVIEW_INTERFACE | Web Dynpro component interfaces of the preview component |
GC_RETRIEVE_MODE | |
GC_SIDE_PANEL | |
GC_SINGLETON | Singleton (obsolete) |
GC_TLBR_ELEM_POSITION | Position of table element (obsolete) |
GC_TRANSACTION_CONTROLLER | Identifiers of the transaction controller (obsolete) |
GC_SINGLETON | Singleton (obsolete) |
GC_TLBR_ELEM_POSITION | Position of table element (obsolete) |
GC_TRANSACTION_CONTROLLER | Identifiers of the transaction controller (obsolete) |
GC_TYPE | Data type names that are dynamically used by the FSI |
GC_UPDATE_MODE | Update mode (obsolete) |
GC_WDA_NAME | Web Dynpro ABAP Name (obsolete) |
GC_WDC_TBV_PERS | Web Dynpro Component name of the personalization popup (obsolete) |
GC_UPDATE_MODE | Update mode (obsolete) |
GC_WDA_NAME | Web Dynpro ABAP Name (obsolete) |
GC_WDC_TBV_PERS | Web Dynpro Component name of the personalization popup (obsolete) |
GC_WD_COMPONENT | Web Dynpro component names |
GC_WD_EVENT_PARAMETER | Web Dynpro event parameter names |
GC_WIRE_CONNECTOR | Wire Connector names |
GC_WIRE_CONNECTOR_PARAMETERS | Wire Connector parameter names |
GC_WIRE_MODEL_NAME_SPACE | Wire feeder model namespace |
Navigation Related Constants – /PLMU/IF_FRW_ACTION_C
This interface offers constants that can be used when implementing the Navigation.
Constant | Description |
---|---|
GC_NAVTGT_NAVIGATOR | Navigation target: Object Navigator |
GC_NAVTGT_OBJ_CHANGE | Navigation target: change object |
GC_NAVTGT_OBJ_CHANGE_ALT1 | Navigation target: change object (alternative 1) |
GC_NAVTGT_OBJ_COPY | Navigation target: copy object |
GC_NAVTGT_OBJ_CREATE | Navigation target: create object |
GC_NAVTGT_OBJ_DEFAULT | Navigation target: default mode of object |
GC_NAVTGT_OBJ_DEFAULT_ALT1 | Navigation target: default mode of object (alternative 1) |
GC_NAVTGT_OBJ_DISPLAY | Navigation target: display object |
GC_NAVTGT_OBJ_DISPLAY_ALT1 | Navigation target: display object (alternative 1) |
GC_PARAM_FRW_WINDOW_LABEL | FPM Event parameter: window label |