Depending of the widget type, one of the following enhancement spots can be used:
- /PCH/CFW_WIDGET_ALV_GRID
- /PCH/CFW_WIDGET_COL_TREE
- /PCH/CFW_WIDGET_LIST_TREE
- /PCH/CFW_WIDGET_FORM
...
...
General
...
...
All these BAdIs share the following methods to extend general widget and model tasks:
Method | Description |
---|---|
Widget enhancements | |
/PCH/IF_CFW_BADI_WI_ROOT~INIT | Called once per session to setup the widget. |
/PCH/IF_CFW_BADI_WI_ROOT~BEFORE_FREE | Called once per session before the widgets is released. |
/PCH/IF_CFW_BADI_WI_ROOT~FREE | Called once per session when the widgets is released. Should be used to release specific global data. |
/PCH/IF_CFW_BADI_WI_ROOT~TITLE_DEFINE | Can be used to override the widget's title. |
/PCH/IF_CFW_BADI_WI_ROOT~MENU_DEFINE | Can be used to define or adjust menu entries for context menu (if provided by widget type) or title functions. |
/PCH/IF_CFW_BADI_WI_ROOT~FUNCTION_HANDLE | Handle of local actions. For global actions please check the function controller enhancements. |
/PCH/IF_CFW_BADI_WI_ROOT~FUNCTION_PROVIDE | Provides meta data of local actions. For global actions please check the function controller enhancements. |
Model enhancements | |
/PCH/IF_CFW_BADI_MDL_ROOT~INIT | Called once per session to setup the model. |
/PCH/IF_CFW_BADI_MDL_ROOT~FREE | Called once per session when the model is released. Should be used to release specific global data. |
/PCH/IF_CFW_BADI_MDL_ROOT~REFRESH | Called whenever a refresh is requested by the user. |
/PCH/IF_CFW_BADI_MDL_ROOT~INVALIDATE | Called when the current data is invalid, should be used to initialize the current data. |
...
ALV
...
Grid Widgets
ALV grid widgets can be extend by implementing the interface /PCH/CFW_WIDGET_ALV_GRID. The following methods are provided to extend widget and model functionality:
Method | Description | |
---|---|---|
Widget enhancements |
| |
/PCH/IF_CFW_BADI_WI_ALV_GRID~TOOLBAR_FUNCTIONS_DEFINE | Definition of own toolbar functions | |
/PCH/IF_CFW_BADI_WI_ALV_GRID~TOOLBAR_FUNCTION_HANDLE | Handling of toolbar functions. | |
/PCH/IF_CFW_BADI_WI_ALV_GRID~CONTEXT_MENU_REQ | Defining a context menu. | |
/PCH/IF_CFW_BADI_WI_ALV_GRID~DOUBLE_CLICK | Custom double click action. | |
/PCH/IF_CFW_BADI_WI_ALV_GRID~HOTSPOT_CLICK | Custom hotspot click action. | |
/PCH/IF_CFW_BADI_WI_ALV_GRID~BUTTON_CLICK | Custom button click action. | |
Model enhancements |
| |
/PCH/IF_CFW_BADI_MDL_ALV_GRID~STRUCTURE_EXTEND | If the field catalogue of the ALV is based on a structure this method can be used to extend the field catalogue by additional fields. | |
/PCH/IF_CFW_BADI_MDL_ALV_GRID~RETRIEVE_COLUMNS | This method can be used to adjust the column catalogue. This method must not be used to add additional columns. | |
/PCH/IF_CFW_BADI_MDL_ALV_GRID~LOAD | When adding additional fields they can be filled with data within this method. |
...
...
Tree
...
and
...
Column
...
Tree
...
Widgets
Tree widgets can be extend by implementing the interface /PCH/CFW_WIDGET_LIST_TREE or /PCH/CFW_WIDGET_COL_TREE. The following methods are provided to extend widget and model functionality:
Method | Description |
---|---|
Widget enhancements | |
/PCH/IF_CFW_BADI_WI_TREE~ITEM_DBL_CLICK | Custom item double click action. |
/PCH/IF_CFW_BADI_WI_TREE~NODE_DBL_CLICK | Custom node double click action. |
/PCH/IF_CFW_BADI_WI_TREE~NODE_CONTEXT_MENU_REQUEST | Build custom node context menu. |
/PCH/IF_CFW_BADI_WI_TREE~NODE_CONTEXT_MENU_SELECT | Handle custom node context menu function. |
/PCH/IF_CFW_BADI_WI_TREE~ITEM_CONTEXT_MENU_REQUEST | Build custom item context menu. |
/PCH/IF_CFW_BADI_WI_TREE~ITEM_CONTEXT_MENU_SELECT | Handle custom item context menu function. |
/PCH/IF_CFW_BADI_WI_TREE~DEFAULT_CONTEXT_MENU_REQ | Build custom default context menu (context menu on empty area). |
/PCH/IF_CFW_BADI_WI_TREE~DEFAULT_CONTEXT_MENU_SEL | Handle custom default context menu function. |
/PCH/IF_CFW_BADI_WI_TREE~NODE_KEY_PRESS | Handle key press when nodes are selected. |
/PCH/IF_CFW_BADI_WI_TREE~ITEM_KEY_PRESS | Handle key press when items are selection. |
Model enhancements | |
/PCH/IF_CFW_BADI_MDL_LIST_TREE~LOAD | Called when the model data is loaded. |
/PCH/IF_CFW_BADI_MDL_LIST_TREE~LOAD_CHILDREN | Called when a node is expanded and child data has to be loaded. |
/PCH/IF_CFW_BADI_MDL_LIST_TREE~LOAD_LATE | Called when additional data is loaded. |
/PCH/IF_CFW_BADI_MDL_LIST_TREE~NODE_REFRESH | Called when the data for a node has to be refreshed. |
The above context menu enhancements should only be used if you plan to enhance a menu based on special context. Normally context menu enhancements should be done by implementing the general methods /PCH/IF_CFW_BADI_WI_ROOT~MENU_DEFINE and /PCH/IF_CFW_BADI_WI_ROOT~FUNCTION_... for local functions or by enhancing the global function controller. |
...
...
Column
...
Tree
...
Widgets
Column tree widgets can be enhanced using the above methods. There are additional methods which are available in the BAdI /PCH/CFW_WIDGET_COL_TREE only.
Method | Description | |
---|---|---|
Model enhancements |
| |
/PCH/IF_CFW_BADI_MDL_COL_TREE~STRUCTURE_EXTEND | If the field catalogue of the column tree is based on a structure. This method can be used to extend the fieldcatalogue by additional fields. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~RETRIEVE_COLUMNS | This method can be used to adjust the column catalogue. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~LOAD | Called when the column tree data is loaded. Can be used to extend by own data or to adjust current data. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~LOAD_CHILDREN | Called when a node is expanded an child data has to be loaded. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~LOAD_LAZY | When new columns are displayed this method is called to load the columns data. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~LOAD_LATE | Called when additional data is loaded. | |
/PCH/IF_CFW_BADI_MDL_COL_TREE~NODE_REFRESH | Called when the data for a node has to be refreshed. |
...
Form
...
Widgets
Form widgets can be extend by implementing the interface /PCH/CFW_WIDGET_FORM. The following methods are provided to extend widget and model functionality:
Method | Description | |
---|---|---|
Widget enhancements |
| |
/PCH/IF_CFW_BADI_WI_FORM~SAPEVENT | Called on every event in the form (validation, buttons, links). | |
Model enhancements | ||
/PCH/IF_CFW_BADI_MDL_FORM~CHANGE_FORM | Change form before output. | |
/PCH/IF_CFW_BADI_MDL_FORM~UPDATE | Update form. |
...