SAP Function Modules

STF4_F4_DOMAIN_VALUE_TEXTS SAP Function module







STF4_F4_DOMAIN_VALUE_TEXTS 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 STF4_F4_DOMAIN_VALUE_TEXTS into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM STF4_F4_DOMAIN_VALUE_TEXTS - STF4 F4 DOMAIN VALUE TEXTS





CALL FUNCTION 'STF4_F4_DOMAIN_VALUE_TEXTS' "
  EXPORTING
    iv_domname =                " dd01l-domname  The name of the domain with fixed values
*   iv_screen_field = ' '       "               The screen field name for the F4 help
*   iv_show_only = ' '          " c             X = Display only, no F4 input option
    iv_rollname =               " dd04l-rollname  The name of the data element for the dialog box title
*   iv_title = ' '              " sy-title      Optional title for F4 dialog box
*   iv_start_x = 1              " sy-linno      Start column for F4 dialog box
*   iv_start_y = 1              " sy-colno      Start row for F4 dialog box
*   iv_text_width = 60          " sy-linsz      Output width of the fixed value short text
*   iv_list_length = 10         " sy-linct      Maximum length of the output list
  CHANGING
    cv_value =                  "               The fixed domain value to be changed
*   cv_value_text = ' '         " dd07t-ddtext  The corresponding short text of the fixed value
  EXCEPTIONS
    NO_VALUES = 1               "               No fixed values exist for the domain
    .  "  STF4_F4_DOMAIN_VALUE_TEXTS

ABAP code example for Function Module STF4_F4_DOMAIN_VALUE_TEXTS





The ABAP code below is a full code listing to execute function module STF4_F4_DOMAIN_VALUE_TEXTS 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_cv_value) = 'some text here'.

SELECT single DDTEXT
FROM DD07T
INTO @DATA(ld_cv_value_text).


SELECT single DOMNAME
FROM DD01L
INTO @DATA(ld_iv_domname).

DATA(ld_iv_screen_field) = 'some text here'.
DATA(ld_iv_show_only) = 'Check type of data required'.

SELECT single ROLLNAME
FROM DD04L
INTO @DATA(ld_iv_rollname).

DATA(ld_iv_title) = 'some text here'.
DATA(ld_iv_start_x) = '123 '.
DATA(ld_iv_start_y) = '123 '.
DATA(ld_iv_text_width) = '123 '.
DATA(ld_iv_list_length) = '123 '. . CALL FUNCTION 'STF4_F4_DOMAIN_VALUE_TEXTS' EXPORTING iv_domname = ld_iv_domname * iv_screen_field = ld_iv_screen_field * iv_show_only = ld_iv_show_only iv_rollname = ld_iv_rollname * iv_title = ld_iv_title * iv_start_x = ld_iv_start_x * iv_start_y = ld_iv_start_y * iv_text_width = ld_iv_text_width * iv_list_length = ld_iv_list_length CHANGING cv_value = ld_cv_value * cv_value_text = ld_cv_value_text EXCEPTIONS NO_VALUES = 1 . " STF4_F4_DOMAIN_VALUE_TEXTS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_cv_value  TYPE STRING ,
ld_iv_domname  TYPE DD01L-DOMNAME ,
ld_cv_value_text  TYPE DD07T-DDTEXT ,
ld_iv_screen_field  TYPE STRING ,
ld_iv_show_only  TYPE C ,
ld_iv_rollname  TYPE DD04L-ROLLNAME ,
ld_iv_title  TYPE SY-TITLE ,
ld_iv_start_x  TYPE SY-LINNO ,
ld_iv_start_y  TYPE SY-COLNO ,
ld_iv_text_width  TYPE SY-LINSZ ,
ld_iv_list_length  TYPE SY-LINCT .

ld_cv_value = 'some text here'.

SELECT single DOMNAME
FROM DD01L
INTO ld_iv_domname.


SELECT single DDTEXT
FROM DD07T
INTO ld_cv_value_text.

ld_iv_screen_field = 'some text here'.
ld_iv_show_only = 'Check type of data required'.

SELECT single ROLLNAME
FROM DD04L
INTO ld_iv_rollname.

ld_iv_title = 'some text here'.
ld_iv_start_x = '123 '.
ld_iv_start_y = '123 '.
ld_iv_text_width = '123 '.
ld_iv_list_length = '123 '.

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 STF4_F4_DOMAIN_VALUE_TEXTS or its description.