SAP Function Modules

STAT_GET_VALUES SAP Function module







STAT_GET_VALUES is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name STAT_GET_VALUES into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: STATUS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM STAT_GET_VALUES - STAT GET VALUES





CALL FUNCTION 'STAT_GET_VALUES' "
  EXPORTING
    application =               " char6
*   language = SY-LANGU         " sy-langu
*   select_status = 'X'         " char1
*   select_problems =           " char1
*   select_resources =          " char1
*   select_keywords =           " char1
  IMPORTING
    status =                    " istatiface
    not_found =                 " c
  TABLES
    id =                        " stacu_id_tab_iface
*   status_values =             " stacu_status_tab_iface
*   problem_messages =          " stacu_problems_tab_iface
*   resources =                 " stacu_resources_tab_iface
*   keywords =                  " stacu_keywords_tab_iface
    .  "  STAT_GET_VALUES

ABAP code example for Function Module STAT_GET_VALUES





The ABAP code below is a full code listing to execute function module STAT_GET_VALUES including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_status  TYPE ISTATIFACE ,
ld_not_found  TYPE C ,
it_id  TYPE STANDARD TABLE OF STACU_ID_TAB_IFACE,"TABLES PARAM
wa_id  LIKE LINE OF it_id ,
it_status_values  TYPE STANDARD TABLE OF STACU_STATUS_TAB_IFACE,"TABLES PARAM
wa_status_values  LIKE LINE OF it_status_values ,
it_problem_messages  TYPE STANDARD TABLE OF STACU_PROBLEMS_TAB_IFACE,"TABLES PARAM
wa_problem_messages  LIKE LINE OF it_problem_messages ,
it_resources  TYPE STANDARD TABLE OF STACU_RESOURCES_TAB_IFACE,"TABLES PARAM
wa_resources  LIKE LINE OF it_resources ,
it_keywords  TYPE STANDARD TABLE OF STACU_KEYWORDS_TAB_IFACE,"TABLES PARAM
wa_keywords  LIKE LINE OF it_keywords .

DATA(ld_application) = 'Check type of data required'.
DATA(ld_language) = 'Check type of data required'.
DATA(ld_select_status) = 'Check type of data required'.
DATA(ld_select_problems) = 'Check type of data required'.
DATA(ld_select_resources) = 'Check type of data required'.
DATA(ld_select_keywords) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_id to it_id.

"populate fields of struture and append to itab
append wa_status_values to it_status_values.

"populate fields of struture and append to itab
append wa_problem_messages to it_problem_messages.

"populate fields of struture and append to itab
append wa_resources to it_resources.

"populate fields of struture and append to itab
append wa_keywords to it_keywords. . CALL FUNCTION 'STAT_GET_VALUES' EXPORTING application = ld_application * language = ld_language * select_status = ld_select_status * select_problems = ld_select_problems * select_resources = ld_select_resources * select_keywords = ld_select_keywords IMPORTING status = ld_status not_found = ld_not_found TABLES id = it_id * status_values = it_status_values * problem_messages = it_problem_messages * resources = it_resources * keywords = it_keywords . " STAT_GET_VALUES
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_status  TYPE ISTATIFACE ,
ld_application  TYPE CHAR6 ,
it_id  TYPE STANDARD TABLE OF STACU_ID_TAB_IFACE ,
wa_id  LIKE LINE OF it_id,
ld_not_found  TYPE C ,
ld_language  TYPE SY-LANGU ,
it_status_values  TYPE STANDARD TABLE OF STACU_STATUS_TAB_IFACE ,
wa_status_values  LIKE LINE OF it_status_values,
ld_select_status  TYPE CHAR1 ,
it_problem_messages  TYPE STANDARD TABLE OF STACU_PROBLEMS_TAB_IFACE ,
wa_problem_messages  LIKE LINE OF it_problem_messages,
ld_select_problems  TYPE CHAR1 ,
it_resources  TYPE STANDARD TABLE OF STACU_RESOURCES_TAB_IFACE ,
wa_resources  LIKE LINE OF it_resources,
ld_select_resources  TYPE CHAR1 ,
it_keywords  TYPE STANDARD TABLE OF STACU_KEYWORDS_TAB_IFACE ,
wa_keywords  LIKE LINE OF it_keywords,
ld_select_keywords  TYPE CHAR1 .

ld_application = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_id to it_id.
ld_language = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_status_values to it_status_values.
ld_select_status = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_problem_messages to it_problem_messages.
ld_select_problems = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_resources to it_resources.
ld_select_resources = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_keywords to it_keywords.
ld_select_keywords = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name STAT_GET_VALUES or its description.