SAP SRET_SRSVR_CREATE Function Module for Create a search server relation









SRET_SRSVR_CREATE is a standard sret srsvr create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create a search server relation processing and below is the pattern details for this FM, 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 sret srsvr create FM, simply by entering the name SRET_SRSVR_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function SRET_SRSVR_CREATE 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 'SRET_SRSVR_CREATE'"Create a search server relation
EXPORTING
SRSVRID = "
SEARCHENG = "Search engine
DESCRIPT = "
* DEFAULTSSR = "

TABLES
SRRFCDEST = "

EXCEPTIONS
ID_IS_EMPTY = 1 CATDEV_EXISTS = 10 XERROR = 11 ID_IS_NOT_VALID = 2 ID_EXISTS = 3 TO_MANY_INDEX_DEST = 4 NO_INDEX_DEST = 5 DESCRIPT_IS_SPACE = 6 ACTION_UNKNOWN = 7 STATUS_UNKNOWN = 8 SRCHENG_UNKNOWN = 9
.



IMPORTING Parameters details for SRET_SRSVR_CREATE

SRSVRID -

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

SEARCHENG - Search engine

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

DESCRIPT -

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

DEFAULTSSR -

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

TABLES Parameters details for SRET_SRSVR_CREATE

SRRFCDEST -

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

EXCEPTIONS details

ID_IS_EMPTY -

Data type:
Optional: No
Call by Reference: Yes

CATDEV_EXISTS -

Data type:
Optional: No
Call by Reference: Yes

XERROR - Other Error

Data type:
Optional: No
Call by Reference: Yes

ID_IS_NOT_VALID -

Data type:
Optional: No
Call by Reference: Yes

ID_EXISTS -

Data type:
Optional: No
Call by Reference: Yes

TO_MANY_INDEX_DEST -

Data type:
Optional: No
Call by Reference: Yes

NO_INDEX_DEST -

Data type:
Optional: No
Call by Reference: Yes

DESCRIPT_IS_SPACE -

Data type:
Optional: No
Call by Reference: Yes

ACTION_UNKNOWN -

Data type:
Optional: No
Call by Reference: Yes

STATUS_UNKNOWN -

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

SRCHENG_UNKNOWN -

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

Copy and paste ABAP code example for SRET_SRSVR_CREATE 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_srsvrid  TYPE SRETSRSVR-SRSVRID, "   
lt_srrfcdest  TYPE STANDARD TABLE OF SRETSRFCS, "   
lv_id_is_empty  TYPE SRETSRFCS, "   
lv_catdev_exists  TYPE SRETSRFCS, "   
lv_xerror  TYPE SRETSRFCS, "   
lv_searcheng  TYPE SRETSRSVR-SEARCHENG, "   
lv_id_is_not_valid  TYPE SRETSRSVR, "   
lv_descript  TYPE SRETSRSVRT-DESCRIPT, "   
lv_id_exists  TYPE SRETSRSVRT, "   
lv_defaultssr  TYPE SRETSRSVR-SRSVRACT, "   
lv_to_many_index_dest  TYPE SRETSRSVR, "   
lv_no_index_dest  TYPE SRETSRSVR, "   
lv_descript_is_space  TYPE SRETSRSVR, "   
lv_action_unknown  TYPE SRETSRSVR, "   
lv_status_unknown  TYPE SRETSRSVR, "   
lv_srcheng_unknown  TYPE SRETSRSVR. "   

  CALL FUNCTION 'SRET_SRSVR_CREATE'  "Create a search server relation
    EXPORTING
         SRSVRID = lv_srsvrid
         SEARCHENG = lv_searcheng
         DESCRIPT = lv_descript
         DEFAULTSSR = lv_defaultssr
    TABLES
         SRRFCDEST = lt_srrfcdest
    EXCEPTIONS
        ID_IS_EMPTY = 1
        CATDEV_EXISTS = 10
        XERROR = 11
        ID_IS_NOT_VALID = 2
        ID_EXISTS = 3
        TO_MANY_INDEX_DEST = 4
        NO_INDEX_DEST = 5
        DESCRIPT_IS_SPACE = 6
        ACTION_UNKNOWN = 7
        STATUS_UNKNOWN = 8
        SRCHENG_UNKNOWN = 9
. " SRET_SRSVR_CREATE




ABAP code using 7.40 inline data declarations to call FM SRET_SRSVR_CREATE

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 SRSVRID FROM SRETSRSVR INTO @DATA(ld_srsvrid).
 
 
 
 
 
"SELECT single SEARCHENG FROM SRETSRSVR INTO @DATA(ld_searcheng).
 
 
"SELECT single DESCRIPT FROM SRETSRSVRT INTO @DATA(ld_descript).
 
 
"SELECT single SRSVRACT FROM SRETSRSVR INTO @DATA(ld_defaultssr).
 
 
 
 
 
 
 


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!