Implementing a Feeder Class

Use

Defining List Output Structure

The list output structure contains the Query and the List area. The Query area contains:

  • Tabs for easily accessing predefined queries

  • Options for creating, changing, categorizing, or temporarily hiding details

The List area contains:

  • Selection criteria for quickly changing a query search criteria

  • Buttons for providing object-based functionality

  • A filter setting for allowing filtering within the data table

  • Options for navigating through the worklist

Defining Selection Criteria

You define a selection criteria to further filter the results based on your criteria.

GET_SEL_CRITERIA: This method provides the definitions of all selection criteria available for query creation, including the combination of user ID and POWL iView (reflected by the importing parameters bname and applid). The POWL runtime expects the selection criteria definitions to be returned as an internal table with line type POWL_SELCRIT_STY.

The table below defines the filter components:

Component

Type

Description

FIELDNAME

CHAR (30)

Internal name of the selection criteria

CRITTYPE

POWL_CRITTYPE_TY

Display type of the selection criteria

MANDATORY

POWL_XFLAG_TY

Criteria is mandatory

DOMNAME

DOMNAME

Name of a DDIC domain

DATATYPE

DATATYPE

Name of a DDIC datatype

REF_TABLE

CHAR(30)

Name of a DDIC reference table

REF_FIELD

CHAR(30)

Name of a reference field in the reference table

INTTYPE

CHAR(1)

ABAP built-in type (C,D,N…)

OUTPUTLEN

NUMC(6)

Output length

CRITTEXT

CHAR(40)

Output text for the criteria

TOOLTIP

CHAR(40)

Tooltip for the criteria

HEADER

CHAR(40)

Headline for the criteria

VALUESET

POWL_NAMEVALUE_STY

Set of valid values with corresponding descriptions

CRITTYPE defines the display style of the criteria. The following styles are supported:

  • Select option field with interval and multiple selection

  • Select option field with interval, but without multiple selection

  • Select option field with multiple selection, but without interval

  • Parameter field (that is, simple input field)

  • Drop-down list

  • Checkbox

The HEADER component uses intermediate headlines to separate the individual criteria. The HEADER component thus enables you to view semantic coherent groups of selection criteria. The VALUESET component is used to define an F4 help that is not dictionary-based. Each entry in the value set table consists of an internal name (which is interpreted as the actual value) and a descriptive text that is displayed to the user.

Defining a Field Catalog

You define a field catalog to customize the list headers. You can have a customized field catalog for the ALV table inside POWL by specifying the components listed in the table below:

Component

Type

Description

COLID

CHAR(30)

ID of the column (also key of the fieldcat table type)

COLPOS

INT4

Defines order for positioning of the columns

WIDTH

NUMC(6)

Output length of the field

HEADER

CHAR(30)

Column header text

HEADER_DDIC

DATATYPE

DDIC element that supplies the header text

DISPLAY_TYPE

POWL_DISPLAY_TY

Display type: text, icon, checkbox, link (for action binding)

H_ALIGN

POWL_ALIGN_TY

Horizontal output alignment of the column (left, center, right)

FIXED

POWL_XFLAG_TY

Fixed column

TEXT

STRING

Text to be displayed (max. length, depending on display type)

EDITABLE

POWL_XFLAG_TY

Set column editability

EDITABLE_REF

CHAR(30)

Output table reference field that determines editability status

WRAPPING

POWL_XFLAG_TY

Enable text wrapping

WRAPPING_REF

CHAR(30)

Output table reference field for text wrapping enabling

ICON_SRC

STRING

Source for icon display

ICON_SRC_REF

CHAR(30)

Output table reference field for icon display source

ICON_ALT

POWL_XFLAG_TY

Icon display alternative text

ICON_ALT_REF

CHAR(30)

Output table reference field for icon display alternative text

ICON_FIRST

POWL_XFLAG_TY

Output Icon before text

ICON_FIRST_REF

CHAR(30)

Output table reference field for icon positioning before text

CBOX_CHECK

POWL_XFLAG_TY

Checkbox-checked status

CBOX_CHECK_REF

CHAR(30)

Output table reference field for checkbox-checked status

COL_VISIBLE

POWL_XFLAG_TY

Set visibility of entire column

ENABLED

POWL_XFLAG_TY

Enable or disable entire column

ENABLE_REF

CHAR(30)

Output table reference field for enabling or disabling

TOOLTIP

CHAR(100)

Tooltip for the entire column

TOOLTIP_REF

CHAR(30)

Output table reference field for tooltip

ALLOW_FILTER

POWL_XFLAG_TY

Allow filtering of column

ALLOW_SORT

POWL_XFLAG_TY

Allow sorting of column

CQ_REF

CHAR(30)

Output table reference field for either currency or quantity

SORT_REF

CHAR(30)

Output table reference field containing sort index

FILTER_REF

CHAR(30)

Output table reference field containing filter value

Implementing an Action Handler

You need to implement an action handler to define actions for the worklist items. You have to handle action IDs that you have defined. If the end user triggers one of your actions, POWL will dispatch it to the action handler that you defined. You can perform any of the following actions:

  • Navigate to another portal target

  • Trigger a portal event

  • Work with the back end

  • Trigger a WD ABAP event (only necessary in case of direct embedding )

Implementing Data Retrieval

You need to implement data retrieval to retrieve worklist data. You can select your data using the feeder method. POWL will pass your selection criteria to this method.

Describing Interface Methods

You use the following methods to implement POWL.

GET_DETAIL_COMP: This method is used to show a detailed view of a specific business object below the POWER List. This method is helpful if you have large data sets where horizontal scrolling is too time-consuming or not quite usable. In such a case, the detailed component offers a good alternative as it provides a detailed view area below the list. You can show all the different fields without the need for horizontal scrolling. (Optionally, custom details can be displayed for one query result at a time. If this is desired, this method has to deliver the necessary meta information to POWL.)

Parameter

Type

Description

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

I_LANGU

importing

This provides the language key.

E_DETAIL_COMP

exporting

This provides the name of a Web Dynpro component that implements the component interface IWCI_POWL_DETAIL_COMP_IF. This component will be instantiated at runtime and has to manage the actual details display. The respective "master result" data (adhering to GET_OBJECT_DEFINITION) will be supplied by POWL to the detail component through the method UPDATE_DETAIL_DATA, as defined in IWCI_POWL_DETAIL_COMP_IF. Leave this parameter empty if you do not want to display result details.

E_DETAIL_TYPE

exporting

This provides the detail type ID (to be supplied if POWL_TABLE_COMP is used). If you do not want to display result details, leave this parameter empty.

GET_ACTIONS: This method defines all explicit actions. An action is explicit in POWL if it is not defined by a field catalog cell renderer (call function GET_FIELD_CATALOG). The table below lists the parameters for the GET_ACTIONS method and their respective descriptions:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in a POWL_TYPE transaction.

I_SELCRIT_PARA

importing

This provides the current selection criteria values of the query adhering to the definitions delivered by the GET_SEL_CRITERIA method.

C_ACTION_DEFS

changing

This supplies the current explicit action definitions for the query to the feeder class.

E_ACTIONS_CHANGED

exporting

This flag need not be set if none of the action definitions supplied to the feeder through C_ACTION_DEFS have to be changed. If there is a change, set the flag to 'X'.

GET_ACTION_CONF: This method defines a confirmation message for an (explicit or implicit) action. The table below lists the parameters for the GET_ACTION_CONF method and their respective descriptions:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

I_ACTIONID

importing

This provides the ID of the respective action.

I_RESULT_TAB

importing

This provides the current query results adhering to the type definition supplied by the GET_OBJECT_DEFINITION method.

I_SELECTED

importing

This provides the table line indices of the query results currently selected (that is, marked). The first line entry corresponds to the lead selection of the query results table.

I_CHANGED

importing

This enables POWL to display a confirmation message to save the changes before proceeding with the next step.

E_CONF_MESSAGE

exporting

This provides the confirmation message to be displayed before actual execution of the action identified by I_ACTIONID.

GET_SEL_CRITERIA: This method defines selection criteria that can be used to define new queries against this feeder. Moreover, default values for the selection criteria can be supplied by this method. The table below lists the parameters for the GET_SEL_CRITERIA method and its respective description:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

C_SELCRIT_DEFS

changing

This supplies the current selection criteria definitions to the feeder class. The query refresh action caches the selection criteria definition in database.

C_DEFAULT_VALUES

changing

This supplies the default selection criteria definitions to the feeder. The query refresh action caches the default selection criteria values in the database.

E_SELCRIT_DEFS_CHANGED

exporting

This flag, if set, supplies the selection criteria definitions to the feeder through C_SELCRIT_DEFS.

E_DEFAULT_VAL_CHANGED

exporting

This flag, if set, supplies the default selection criteria values to the feeder through C_DEFAULT_VALUES.

GET_FIELD_CATALOG: This method defines the field catalog to be used for query results table display.

The table below lists the parameters for the GET_FIELD_CATALOG method and their respective descriptions:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

I_SELCRIT_VALUES

importing

This provides the selection criteria values of the current query.

C_FIELDCAT

changing

This supplies the current field catalog to the feeder class.

E_FIELDCAT_CHANGED

exporting

This flag is set if the field catalog needs to be changed with the values supplied in C_FIELDCAT.

GET_OBJECT_DEFINITION: This method defines the line type of the actual (internal) query results table that has to be delivered by GET_OBJECTS. The table below lists the parameters for the GET_OBJECT_DEFINITION method and their respective descriptions.

Parameter

Type

Description

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

E_OBJECT_DEF

returning

This provides the table type definition of the actual (internal) query results table as instance of CL_ABAP_TABLEDESCR.

GET_OBJECTS: This method is responsible for the actual query execution and delivery of the query results table. These must adhere to the type definition given by GET_OBJECT_DEFINITION. The table below lists the parameters for the GET_OBJECT method and their respective descriptions:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

I_SELCRIT_VALUES

importing

This provides the selection criteria values of the current query.

E_RESULTS

exporting

This provides the actual query results for the criteria values supplied to the feeder through I_SELCRIT_VALUES.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

E_MESSAGES

exporting

This parameter collects messages that appear during query execution/results and displays the same. The line type of this table is POWL_MSG_STY.

GET_DETAIL_COMP: This method provides an option for displaying custom details for one item listed in a worklist. If this is desired, this method has to deliver the necessary meta information to POWL. The table below lists the parameters for the GET_DETAIL_COMP method and its respective description:

Parameter

Type

Description

I_APPLID

importing

This provides the application ID that identifies the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

E_DETAIL_COMP

exporting

This provides the name of a Web Dynpro component that implements the component interface POWL_DETAIL_COMP_IF. This component will be instantiated at runtime and has to manage the actual details display. The respective "master result" data (adhering to GET_OBJECT_DEFINITION) will be supplied by POWL to the detail component through method UPDATE_DETAIL_DATA as defined in POWL_DETAIL_COMP_IF. Leave this parameter empty if you do not want to display the result details.

HANDLE_ACTION: This method has to handle all implicit and explicit actions defined by this feeder instance. The table below lists the parameters for the HANDLE_ACTION method and their respective descriptions:

Parameter

Type

Definition

I_APPLID

importing

This provides the application ID identifying the current POWL iView.

I_USERNAME

importing

This provides the user ID mapped to the current portal user.

I_TYPE

importing

This provides the POWL type ID as registered in POWL_TYPE transaction.

I_ACTIONID

importing

This provides the ID of the action that you triggered (that is, either the ID of one of the explicit actions (as defined by GET_ACTIONS) or the results table column ID of an implicit action (as defined by the field catalog by an active cell renderer)

I_CHANGED

importing

This is relevant only for query results table that can be edited. This parameter indicates a data loss in application if the application is closed without saving.

I_ACTION_INDEX

importing

This supplies the results table line index in the case of an implicit action triggered to the feeder.

I_ACTION_CONF

importing

This supplies the confirmation result ('Y' for yes or 'N' for no) to the feeder if there is no action confirmation message defined by GET_ACTION_CONF method. The default value is "Y".

E_PORTAL_ACTIONS

exporting

This supplies a portal action based on the call to HANDLE_ACTION. Currently, the following portal actions are supported:

Absolute navigation:

Set the component PORTAL_PATH to the respective navigation target. Note that all parameters supplied in component PARAMETERS are transported as a URL-encoded value string with the URL parameter 'DynamicParameter'.

Object-based navigation:

All components with the prefix BO_ are to be filled according to the business object operation to be triggered. If you want to trigger the default operation of the respective business object, you may leave the component BO_OP_NAME.

Portal client-side event:

All components with the prefix CS_ have to be filled accordingly. The structure type of this parameter is POWL_FOLLOW_UP_STY.

E_MESSAGES

exporting

This displays user interface messages. The line type of this table is POWL_MSG_STY.

E_DO_REFRESH

exporting

If this flag is set, on a HANDLE_ACTION call a refresh of the query will be enforced.

C_RESULT_TAB

changing

This supplies the current query results table (including all your changes if the results table can be edited) to the feeder class.

E_RESULT_LINES_CHANGED

exporting

This flag need not be set if none of the results supplied to the feeder through C_RESULTS have to be changed. If there is a change set the flag to 'X'.

E_CHANGES_PROCESSED

exporting

This is relevant only for query results table that can be edited. This parameter indicates a data loss in an application if the application is closed without saving.

C_SELECTED

changing

This supplies the indices of all results table lines selected/marked by the user to the feeder. The first entry of this table corresponds to the lead selection index

E_SELECTED_CHANGED

exporting

This flag need not be set if none of the selected results line indices supplied to the feeder through C_SELECTED have to be changed. If there is a change, set the flag to 'X'.

C_ACTION_DEFS

changing

This supplies the current explicit action definitions for the query to the feeder. The line type of this table is POWL_ACTDESCR_STY.

E_ACTIONS_CHANGED

exporting

This flag need not be set if none of the action definitions supplied to the feeder through C_ACTION_DEFS have to be changed. If there is a change, set the flag to 'X'.

C_FIRST_VISIBLE_ROW

exporting

This supplies the index of the first visible results table row to the feeder class (that is, the current scroll position of the results table). Normally, you only have to adapt this index if results table lines were added and/or deleted.