SAP Tech Pro

SAP Technical Blog
Topprice Price Comparison

SAP Web Dynpro – Generic APIs (Window Manager, Message Manager…)

SAP Web Dynpro – Generic APIs (Window Manager, Message Manager…)

SAP Web Dynpro – Generic APIs

IF_WD_CONTROLLER contains the functionality available for all controllers. Thus, this interface is embedded in the interfaces IF_WD_VIEW_CONTROLLER and IF_WD_COMPONENT.

Except for the View Controller, which has no public interface, the wd_get_api() is defined in the public interface of all the controllers. Therefore, it can be called from any controller that declares the usage of that controller. Is the following correct?

wd_this->wd_cpifc_<COMPONENT_USAGE>-wd_get_api()

Web Dynpro API for custom controllers (and embedded in view/window & component controllers)

IF_WD_CONTROLLER

NAME: string

GET_ACTION()
GET_COMPONENT()
GET_CONTEXT()
GET_CONTROLLER_INFO()
GET_MESSAGE()
GET_MESSAGE_MANAGER()
GET_PERSONALIZATION_MANAGER()
IS_ALIVE()

GET_ACTION() Returns IF_WD_ACTION used to read & redefine action properties. Can only be called from view controller methods

GET_COMPONENT() Returns IF_WD_COMPONENT. The following are equivalent when not component controller:

  • WD_THIS->get_componentcontroller_ctr()->wd_get_api()
  • WD_COMP_CONTROLLER->wd_get_api()
  • WD_THIS->wd_get_api()->get_component

GET_CONTEXT() Returns IF_WD_CONTEXT. The following are equivalent ways to access controller's root node:

  • WD_CONTEXT
  • WD_THIS->wd_get_api()->get_context()->ROOT_NODE

GET_CONTROLLER_INFO() Returns IF_WD_RR_CONTROLLER (controller's name)

GET_MESSAGE_MANAGER() Returns IF_WD_MESSAGE_MANAGER (methods used to report messages, clear the message stack or check existance of messages)

GET_PERSONALIZATION_MANAGER() Returns IF_WD_PERSONALIZATION_MANAGER (methods used to load, save or delete personalization variants. Not accessible from view or window controllers)

IS_ALIVE() Returns whether controller object has been cleared

Web Dynpro API for view & window controllers

IF_WD_CONTROLLER (see above)

IF_WD_NAVIGATION_SERVICES

PREPARE_DYNAMIC_NAVIGATION()
DO_DYNAMIC_NAVIGATION()
REMOVE_DYNAMIC_META_DATA()

IF_WD_NAVIG_SERVICES_NEW

PREPARE_DYNAMIC_NAVIGATION()
DO_DYNAMIC_NAVIGATION()

IF_WD_VIEW_CONTROLLER

FIRE_PLUG()
GET_EMBEDDING_WINDOW_CTLR()
GET_VIEW_INFO()
REQUEST_FOCUS()
REQUEST_FOCUS_ON_ACTION()
GET_CURRENT_ACTION()
GET_CURRENT_ACTION_INFO()
IS_CURRENT_ACTION_VALIDATING()
GET_VIEW_USAGE()
GET_CONTEXT_MENU_MANAGER()

FIRE_PLUG() Fires any plug using it's name as string parameter

GET_EMBEDDING_WINDOW_CTLR() Returns IF_WD_WINDOW_CONTROLLER if the view or window is embedded in another window (methods allow access to the meta data description of the window controller, e.g., embedded views, navigation links, name of default view)

GET_VIEW_INFO() Returns IF_WD_RR_VIEW methods allow access to the meta data description of the view controller (e.g., view name, life span, description)

REQUEST_FOCUS() sets the focus to a certain UI element if the element has its value property bound to a context attribute. Can not be called from window controller.

REQUEST_FOCUS_ON_ACTION() sets the focus to a certain UI element if the element has the event property on_ bound to an action. Can not be called from window controller.

GET_CURRENT_ACTION() Returns IF_WD_ACTION used to determine which client side event was fired. Typically used in method wddobeforeaction(). Can not be called from window controller.

GET_CURRENT_ACTION_INFO() Returns WDAPI_ACTION used to determine which client side event was fired. Typically used in method wddobeforeaction().

IS_CURRENT_ACTION_VALIDATING() Returns ABAP_BOOL used to determine if the current action is of type Standard (ABAP_TRUE) or Validation-Independent (ABAP_FALSE). Used in connection with handling application errors. Can not be called from window controller.

GET_VIEW_USAGE() Returns IF_WD_RR_VIEW_USAGE methods allow access to the meta data about the view usage (view, name of the view usage, embedding container). In addition, there are methods to define or create temporary container assignments for the view usage and to create or delete temporary navigation links between outbound plugs. Can not be called from the window controller.

GET_CONTEXT_MENU_MANAGER() Returns IF_WD_CONTEXT_MENU_MANAGER methods allow access to the runtime objects of context menus. Can not be called from window controller.

PREPARE_DYNAMIC_NAVIGATION() & DO_DYNAMIC_NAVIGATION() Returns IF_WD_NAVIGATION_SERVICES or IF_WD_NAVIGATION_SERVICES_NEW methods allow the definition of navigation links dynamically. This is necessary if component usages are defined and instantiated at runtime. Then the inbound plugs of the related interface views do not exist at design time, which is the prerequisite to define static navigation links. If you dynamically create plugs, you must dynamically delete them. The methods in IF_WD_NAVIGATION_SERVICES_NEW return handles that may be used to delete the dynamically defined navigation links subsequently. If the methods of the interface IF_WD_NAVIGATION_SERVICES are used to create the navigation links, the method remove_dynamic_meta_data() has to be called to remove the links.

Web Dynpro API for component controllers

IF_WD_CONTROLLER (see above)

IF_WD_COMPONENT

ID: String
ASSISTANCE_CLASS: CL_WD_COMPONENT_ASSISTANCE()

GET_ID()
GET_WINDOW_MANAGER()
GET_COMPONENT_INFO()
GET_PORTAL_MANAGER()
GET_CONFIGURATION_KEY()
GET_PERSONALIZATION_MANAGER()
GET_APPLICATION()
CANCEL_NAVIGATION()
ADD_EVENT_HANDLER()
REMOVE_EVENT_HANDLER()
GET_CMP_USAGE_GROUP()
CREATE_CMP_USAGE_GROUP()
HAS_CMP_USAGE_GROUP()
REMOVE_CMP_USAGE_GROUP()
REMOVE_PENDING_INPUT()

GET_ID() Returns unique ID (string) of the actual WD component

GET_WINDOW_MANAGER() Returns unique IF_WD_WINDOW_MANAGER. Used to create modal popups or external dialog screens.

GET_COMPONENT_INFO() Returns unique IF_WD_RR_COMPONENT. Used to access meta data description of the component and included entities.

GET_PORTAL_MANAGER() Returns unique IF_WD_PORTAL_INTEGRATION. Allows access to information about the portal type and version embedding the WD application. Contains methods to access portal functionality.

GET_APPLICATION() Returns unique IF_WD_APPLICATION.Used to access meta data description of the application.

CANCEL_NAVIGATION() Used to prevent navigation. Must be called before wddobeforenativation() is finished.

ADD_EVENT_HANDLER() Used to dynamically register an event handler method.

REMOVE_EVENT_HANDLER() Used to dynamically delete any dynamically defined registration of an event handler for an event.

xxx_CMP_USAGE_GROUP() Used to handle component usages that are defined dynamically. GET_ & CREATE_ return IF_WD_COMPONENT_USAGE_GROUP.

MESSAGE MANAGER API

SAP Web Dynpro – Generic APIs

WD_THIS->wd_get_api->get_message_manager()

IF_WD_MESSAGE_MANAGER

Category TEXT
REPORT_SUCCESS()
REPORT_WARNING()
REPORT_ERROR_MESSAGE()
REPORT_FATAL_ERROR_MESSAGE()
REPORT_ATTRIBUTE_ERROR_MESSAGE()
REPORT_ELEMENT_ERROR_MESSAGE()

Category EXCEPTION
REPORT_EXCEPTION()
REPORT_FATAL_EXCEPTION()
REPORT_ATTRIBUTE_EXCEPTION()
REPORT_ELEMENT_EXCEPTION()

Category T100
REPORT_T100_MESSAGE()
REPORT_ATTRIBUTE_T100_MESSAGE()
REPORT_ELEMENT_T100_MESSAGE()

IS_EMPTY()
HAS_VAL_ERRORS_FOR_WINDOW()
HAS_VALIDATION_ERRORS()
CLEAR_MESSAGES()
REMOVE_MESSAGE()
GET_MESSAGES()
GET_MESAGE_FOR_ID()

Standard Messages

  1. report_success()
  2. report_t100_message() with MSGTY = S, I
  3. report_exception() with MESSAGE_TYPE = 0

Warnings

  1. report_warning()
  2. report_t100_message() with MSGTY = W
  3. report_exception() with MESSAGE_TYPE = 1

Error Messages

  1. report_error_message()
  2. report_t100_message() with MSGTY = E
report_exception() with MESSAGE_TYPE = 2

Add comment

Before Buying, Compare Prices at Topprice.in

Topprice.in