SAP Function Modules

F4_ENTER_FREE_SELECTIONS SAP Function module - Dialog box for further selection restrictions







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

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


Pattern for FM F4_ENTER_FREE_SELECTIONS - F4 ENTER FREE SELECTIONS





CALL FUNCTION 'F4_ENTER_FREE_SELECTIONS' "Dialog box for further selection restrictions
  EXPORTING
    shlp_name =                 " dd30l-shlpname
*   starting_x = 1              " sy-cucol
*   starting_y = 1              " sy-curow
*   no_complex = SPACE          " ddrefstruc-bool
*   no_maxcnt = SPACE           " ddshf4ctrl-no_maxdisp
*   title =                     " sy-title
*   txtsearchtitle =            " ddf4txtse     Description free text field for fuzzy F4 help
*   attsearchtitle =            " ddf4txtse     Description free text field for fuzzy F4 help
  IMPORTING
    fcode =                     " sy-ucomm
    searchtype =                "
  TABLES
    selflds_tab =               " dfies
    selopt_tab =                " ddseselopt
*   excl_tab =                  "
* CHANGING
*   max_cnt =                   " ddshf4ctrl-maxrecords
    .  "  F4_ENTER_FREE_SELECTIONS

ABAP code example for Function Module F4_ENTER_FREE_SELECTIONS





The ABAP code below is a full code listing to execute function module F4_ENTER_FREE_SELECTIONS 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_fcode  TYPE SY-UCOMM ,
ld_searchtype  TYPE STRING ,
it_selflds_tab  TYPE STANDARD TABLE OF DFIES,"TABLES PARAM
wa_selflds_tab  LIKE LINE OF it_selflds_tab ,
it_selopt_tab  TYPE STANDARD TABLE OF DDSESELOPT,"TABLES PARAM
wa_selopt_tab  LIKE LINE OF it_selopt_tab ,
it_excl_tab  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_excl_tab  LIKE LINE OF it_excl_tab .


DATA(ld_max_cnt) = 123

SELECT single SHLPNAME
FROM DD30L
INTO @DATA(ld_shlp_name).

DATA(ld_starting_x) = '123 '.
DATA(ld_starting_y) = '123 '.

DATA(ld_no_complex) = some text here

DATA(ld_no_maxcnt) = some text here
DATA(ld_title) = 'some text here'.
DATA(ld_txtsearchtitle) = 'some text here'.
DATA(ld_attsearchtitle) = 'some text here'.

"populate fields of struture and append to itab
append wa_selflds_tab to it_selflds_tab.

"populate fields of struture and append to itab
append wa_selopt_tab to it_selopt_tab.

"populate fields of struture and append to itab
append wa_excl_tab to it_excl_tab. . CALL FUNCTION 'F4_ENTER_FREE_SELECTIONS' EXPORTING shlp_name = ld_shlp_name * starting_x = ld_starting_x * starting_y = ld_starting_y * no_complex = ld_no_complex * no_maxcnt = ld_no_maxcnt * title = ld_title * txtsearchtitle = ld_txtsearchtitle * attsearchtitle = ld_attsearchtitle IMPORTING fcode = ld_fcode searchtype = ld_searchtype TABLES selflds_tab = it_selflds_tab selopt_tab = it_selopt_tab * excl_tab = it_excl_tab * CHANGING * max_cnt = ld_max_cnt . " F4_ENTER_FREE_SELECTIONS
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_max_cnt  TYPE DDSHF4CTRL-MAXRECORDS ,
ld_fcode  TYPE SY-UCOMM ,
ld_shlp_name  TYPE DD30L-SHLPNAME ,
it_selflds_tab  TYPE STANDARD TABLE OF DFIES ,
wa_selflds_tab  LIKE LINE OF it_selflds_tab,
ld_searchtype  TYPE STRING ,
ld_starting_x  TYPE SY-CUCOL ,
it_selopt_tab  TYPE STANDARD TABLE OF DDSESELOPT ,
wa_selopt_tab  LIKE LINE OF it_selopt_tab,
ld_starting_y  TYPE SY-CUROW ,
it_excl_tab  TYPE STANDARD TABLE OF STRING ,
wa_excl_tab  LIKE LINE OF it_excl_tab,
ld_no_complex  TYPE DDREFSTRUC-BOOL ,
ld_no_maxcnt  TYPE DDSHF4CTRL-NO_MAXDISP ,
ld_title  TYPE SY-TITLE ,
ld_txtsearchtitle  TYPE DDF4TXTSE ,
ld_attsearchtitle  TYPE DDF4TXTSE .


ld_max_cnt = 123

SELECT single SHLPNAME
FROM DD30L
INTO ld_shlp_name.


"populate fields of struture and append to itab
append wa_selflds_tab to it_selflds_tab.
ld_starting_x = '123 '.

"populate fields of struture and append to itab
append wa_selopt_tab to it_selopt_tab.
ld_starting_y = '123 '.

"populate fields of struture and append to itab
append wa_excl_tab to it_excl_tab.

ld_no_complex = some text here

ld_no_maxcnt = some text here
ld_title = 'some text here'.
ld_txtsearchtitle = 'some text here'.
ld_attsearchtitle = 'some text here'.

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