Start of Content Area

Background documentation GET_CONFIG_DATA  Locate the document in its SAP Library structure

Use

The user can save settings in views for sorting, filtering, performing calculations and so on. The method GET_CONFIG_DATA returns information about the views that the user has saved for the current application:

●     Which views have been saved for the application? What are these views called?

●     Is a view available now (has it been loaded)? What is this view called? Which settings have been saved for this view?

●     Has the user defined any particular view as the initial view? What is this view called? Which settings have been saved for this view?

●     Which of the views belong to which structures? (This only applies when several structures with SET_DATA are loaded in one ALV component.) You generate unique configuration keys and assign them to the individual structures.

In the configuration key example you can see how to generate and assign the configuration key.

Syntax

Signature

methods GET_CONFIG_DATA

  IMPORTING

    S_PARAM_IN TYPE IF_SALV_WD_TABLE=>S_TYPE_PARAM_CONFIG_IN

OPTIONAL

  RETURNING

    S_PARAM_OUT TYPE IF_SALV_WD_TABLE=>S_TYPE_PARAM_CONFIG_OUT

Parameter

(Importing)

S_PARAM_IN

Fields in the structure:

●     ACTION (type salv_wd_constant)

○     LIST

Lists all the user’s saved views

S_PARAM_OUT: T_VIEW_LIST

○     BYNAME

Supplies information about the view <VIEW>

S_PARAM_OUT: VIEW, R_MODEL

○     ACTUAL

Supplies information about the view that is currently loaded

S_PARAM_OUT: VIEW, R_MODEL

○     DEFAULT

Supplies information about the initial view

S_PARAM_OUT: VIEW, R_MODEL

○     LOAD

Load the view <VIEW> as the current view

○     KEY

Supplies information on the application that is running with which the application can generate a unique key for the current structure.

S_PARAM_OUT: USAGE_PATH, ALV_COMPONENT_USAGE

○     SET

Assigns the key to the present structure

●     VIEW (type wdr_pers_variant)

Name of view for ACTION-BYNAME

●     IS_MODEL_REQUESTED (type wdy_boolean)

Determines whether the configuration model is delivered to the view concerned in R_MODEL (S_PARAM_OUT) (performance aspect).

●     CONFIG_KEY (type wdy_config_key)

For ACTION-SET:

Defines the CONFIG_ID and CONFIG_TYPE (WDY_CONFIG_KEY)

Note

The CONFIG_TYPE should be set to '08’ by default.

●     DEFAULT_MODEL (type s_type_param_get_model)

For ACTION-SET:

Defines DEFAULT_COLUMNS and DEFAULT_FIELDS (S_TYPE_PARAM_GET_MODEL)

●     LIST_TYPE (type salv_wd_constant) 

Not used

Return values

S_PARAM_OUT

Fields in the structure:

●     T_VIEW_LIST (type wdr_pers_variants)

List of all the saved views

●     VIEW (type wdr_pers_variant)

Name (description) of the view

●     R_MODEL (type ref to cl_salv_wd_config_table)

Configuration model in accordance with the settings for the view

●     USAGE_PATH (type string)

Location of the current application

●     ALV_COMPONENT_USAGE (type string)

Name of the component use in the current application

Exceptions

-

 

 

 

End of Content Area