SAP F4_GET_RESULT Function Module for









F4_GET_RESULT is a standard f4 get result SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for f4 get result FM, simply by entering the name F4_GET_RESULT into the relevant SAP transaction such as SE37 or SE38.

Function Group: SDH3
Program Name: SAPLSDH3
Main Program: SAPLSDH3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function F4_GET_RESULT pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'F4_GET_RESULT'"
EXPORTING
SEL_METHOD = "
* MAX_SELECT = 1000 "
* SORT = ' ' "
* SHLPNAME = "
* TEXTSEARCH = "
* USED_FIELD = "

CHANGING
* RESULT_REF = "
* CURSOR = "

TABLES
SELOPT_TAB = "
* RESULT_TAB = "Search help result structure

EXCEPTIONS
SEL_METH_NOT_FOUND = 1
.



IMPORTING Parameters details for F4_GET_RESULT

SEL_METHOD -

Data type: DD30L-SELMETHOD
Optional: No
Call by Reference: No ( called with pass by value option)

MAX_SELECT -

Data type: SY-TABIX
Default: 1000
Optional: Yes
Call by Reference: No ( called with pass by value option)

SORT -

Data type: C
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SHLPNAME -

Data type: SHLPNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

TEXTSEARCH -

Data type: IF_DSH_FUZZY_SEARCH_PROCESSOR=>TY_S_TEXTSEARCH_OPTIONS
Optional: Yes
Call by Reference: Yes

USED_FIELD -

Data type: DDSHLPSFLD
Optional: Yes
Call by Reference: Yes

CHANGING Parameters details for F4_GET_RESULT

RESULT_REF -

Data type: DATA
Optional: Yes
Call by Reference: Yes

CURSOR -

Data type: SHLP_CURS
Optional: Yes
Call by Reference: Yes

TABLES Parameters details for F4_GET_RESULT

SELOPT_TAB -

Data type: DDSHSELOPT
Optional: No
Call by Reference: Yes

RESULT_TAB - Search help result structure

Data type: SEAHLPRES
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

SEL_METH_NOT_FOUND -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for F4_GET_RESULT Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_result_ref  TYPE DATA, "   
lt_selopt_tab  TYPE STANDARD TABLE OF DDSHSELOPT, "   
lv_sel_method  TYPE DD30L-SELMETHOD, "   
lv_sel_meth_not_found  TYPE DD30L, "   
lv_cursor  TYPE SHLP_CURS, "   
lv_max_select  TYPE SY-TABIX, "   1000
lt_result_tab  TYPE STANDARD TABLE OF SEAHLPRES, "   
lv_sort  TYPE C, "   SPACE
lv_shlpname  TYPE SHLPNAME, "   
lv_textsearch  TYPE IF_DSH_FUZZY_SEARCH_PROCESSOR=>TY_S_TEXTSEARCH_OPTIONS, "   
lv_used_field  TYPE DDSHLPSFLD. "   

  CALL FUNCTION 'F4_GET_RESULT'  "
    EXPORTING
         SEL_METHOD = lv_sel_method
         MAX_SELECT = lv_max_select
         SORT = lv_sort
         SHLPNAME = lv_shlpname
         TEXTSEARCH = lv_textsearch
         USED_FIELD = lv_used_field
    CHANGING
         RESULT_REF = lv_result_ref
         CURSOR = lv_cursor
    TABLES
         SELOPT_TAB = lt_selopt_tab
         RESULT_TAB = lt_result_tab
    EXCEPTIONS
        SEL_METH_NOT_FOUND = 1
. " F4_GET_RESULT




ABAP code using 7.40 inline data declarations to call FM F4_GET_RESULT

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
"SELECT single SELMETHOD FROM DD30L INTO @DATA(ld_sel_method).
 
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_max_select).
DATA(ld_max_select) = 1000.
 
 
DATA(ld_sort) = ' '.
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!