SAP SLWY_SELECT_BTC_SERVER Function Module for Select a Batch Server
SLWY_SELECT_BTC_SERVER is a standard slwy select btc server SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Select a Batch Server 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 slwy select btc server FM, simply by entering the name SLWY_SELECT_BTC_SERVER into the relevant SAP transaction such as SE37 or SE38.
Function Group: SLWY
Program Name: SAPLSLWY
Main Program: SAPLSLWY
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SLWY_SELECT_BTC_SERVER 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 'SLWY_SELECT_BTC_SERVER'"Select a Batch Server.
EXPORTING
SELECT_TITLE = "Generic Type
* DEF_HOST_TEXT = '' "Generic Type
* ONLY_CHECK = '' "Generic Type
* SHOW_CODEPAGE = '' "Generic Type
* LANGUAGE = '' "Language Key
CHANGING
* BTC_HOST = "Name of the Host Server
* BTC_SERVER = "Application Server Instance
EXCEPTIONS
NO_SERVER_LIST = 1 WRONG_HOST = 2 WRONG_CHOICE = 3
IMPORTING Parameters details for SLWY_SELECT_BTC_SERVER
SELECT_TITLE - Generic Type
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
DEF_HOST_TEXT - Generic Type
Data type: CDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
ONLY_CHECK - Generic Type
Data type: CDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_CODEPAGE - Generic Type
Data type: CDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language Key
Data type: T002-SPRASDefault: ''
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for SLWY_SELECT_BTC_SERVER
BTC_HOST - Name of the Host Server
Data type: MSXXLIST-HOSTOptional: Yes
Call by Reference: No ( called with pass by value option)
BTC_SERVER - Application Server Instance
Data type: MSXXLIST-NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_SERVER_LIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_HOST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_CHOICE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SLWY_SELECT_BTC_SERVER 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_btc_host | TYPE MSXXLIST-HOST, " | |||
| lv_select_title | TYPE C, " | |||
| lv_no_server_list | TYPE C, " | |||
| lv_btc_server | TYPE MSXXLIST-NAME, " | |||
| lv_wrong_host | TYPE MSXXLIST, " | |||
| lv_def_host_text | TYPE C, " '' | |||
| lv_only_check | TYPE C, " '' | |||
| lv_wrong_choice | TYPE C, " | |||
| lv_show_codepage | TYPE C, " '' | |||
| lv_language | TYPE T002-SPRAS. " '' |
|   CALL FUNCTION 'SLWY_SELECT_BTC_SERVER' "Select a Batch Server |
| EXPORTING | ||
| SELECT_TITLE | = lv_select_title | |
| DEF_HOST_TEXT | = lv_def_host_text | |
| ONLY_CHECK | = lv_only_check | |
| SHOW_CODEPAGE | = lv_show_codepage | |
| LANGUAGE | = lv_language | |
| CHANGING | ||
| BTC_HOST | = lv_btc_host | |
| BTC_SERVER | = lv_btc_server | |
| EXCEPTIONS | ||
| NO_SERVER_LIST = 1 | ||
| WRONG_HOST = 2 | ||
| WRONG_CHOICE = 3 | ||
| . " SLWY_SELECT_BTC_SERVER | ||
ABAP code using 7.40 inline data declarations to call FM SLWY_SELECT_BTC_SERVER
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 HOST FROM MSXXLIST INTO @DATA(ld_btc_host). | ||||
| "SELECT single NAME FROM MSXXLIST INTO @DATA(ld_btc_server). | ||||
| DATA(ld_def_host_text) | = ''. | |||
| DATA(ld_only_check) | = ''. | |||
| DATA(ld_show_codepage) | = ''. | |||
| "SELECT single SPRAS FROM T002 INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = ''. | |||
Search for further information about these or an SAP related objects