SAP Function Modules

TH_SERVER_TYPE SAP Function module - Evaluate server type value







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

Associated Function Group: THFB
Released Date: 23.04.1997
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM TH_SERVER_TYPE - TH SERVER TYPE





CALL FUNCTION 'TH_SERVER_TYPE' "Evaluate server type value
  EXPORTING
    services =                  " msxxlist-msgtypes  Services bit vector
*   sysservice0 =               " msxxlist_v6-sysservice0  System Services Registered on Message Server
*   sysservice1 =               " msxxlist_v6-sysservice1  System Services Registered on Message Server
*   sysservice2 =               " msxxlist_v6-sysservice2  System Services Registered on Message Server
*   sysservice3 =               " msxxlist_v6-sysservice3  System Services Registered on Message Server
  IMPORTING
    is_a_dialog =               " msxxlist-msgtypes  Are there dialog processes?
    is_a_batch =                " msxxlist-msgtypes  Are there background processes?
    is_a_update =               " msxxlist-msgtypes  Are there update processes?
    is_a_update2 =              " msxxlist-msgtypes  Are there update2 processes?
    is_a_spool =                " msxxlist-msgtypes  Are there spool processes?
    is_a_enqueue =              " msxxlist-msgtypes  Are there enqueue processes?
    is_a_atp =                  " msxxlist-msgtypes
    is_a_icman =                " msxxlist-msgtypes  ICMAN Active?
    is_a_vmc =                  " msxxlist-msgtypes  Does the VMC service exist?
    is_a_j2ee =                 " msxxlist-msgtypes  Is there a J2EE Engine?
    service_text =              " c             Text Services
    kernel_update_pending =     " i             Is a shutdown still outstanding because of a kernel switch?
    server_suspended =          " i             Server has been suspended
    .  "  TH_SERVER_TYPE

ABAP code example for Function Module TH_SERVER_TYPE





The ABAP code below is a full code listing to execute function module TH_SERVER_TYPE 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_is_a_dialog  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_batch  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_update  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_update2  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_spool  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_enqueue  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_atp  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_icman  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_vmc  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_j2ee  TYPE MSXXLIST-MSGTYPES ,
ld_service_text  TYPE C ,
ld_kernel_update_pending  TYPE I ,
ld_server_suspended  TYPE I .


DATA(ld_services) = Check type of data required

DATA(ld_sysservice0) = Check type of data required

DATA(ld_sysservice1) = Check type of data required

DATA(ld_sysservice2) = Check type of data required

DATA(ld_sysservice3) = Check type of data required . CALL FUNCTION 'TH_SERVER_TYPE' EXPORTING services = ld_services * sysservice0 = ld_sysservice0 * sysservice1 = ld_sysservice1 * sysservice2 = ld_sysservice2 * sysservice3 = ld_sysservice3 IMPORTING is_a_dialog = ld_is_a_dialog is_a_batch = ld_is_a_batch is_a_update = ld_is_a_update is_a_update2 = ld_is_a_update2 is_a_spool = ld_is_a_spool is_a_enqueue = ld_is_a_enqueue is_a_atp = ld_is_a_atp is_a_icman = ld_is_a_icman is_a_vmc = ld_is_a_vmc is_a_j2ee = ld_is_a_j2ee service_text = ld_service_text kernel_update_pending = ld_kernel_update_pending server_suspended = ld_server_suspended . " TH_SERVER_TYPE
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_is_a_dialog  TYPE MSXXLIST-MSGTYPES ,
ld_services  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_batch  TYPE MSXXLIST-MSGTYPES ,
ld_sysservice0  TYPE MSXXLIST_V6-SYSSERVICE0 ,
ld_is_a_update  TYPE MSXXLIST-MSGTYPES ,
ld_sysservice1  TYPE MSXXLIST_V6-SYSSERVICE1 ,
ld_is_a_update2  TYPE MSXXLIST-MSGTYPES ,
ld_sysservice2  TYPE MSXXLIST_V6-SYSSERVICE2 ,
ld_is_a_spool  TYPE MSXXLIST-MSGTYPES ,
ld_sysservice3  TYPE MSXXLIST_V6-SYSSERVICE3 ,
ld_is_a_enqueue  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_atp  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_icman  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_vmc  TYPE MSXXLIST-MSGTYPES ,
ld_is_a_j2ee  TYPE MSXXLIST-MSGTYPES ,
ld_service_text  TYPE C ,
ld_kernel_update_pending  TYPE I ,
ld_server_suspended  TYPE I .


ld_services = Check type of data required

ld_sysservice0 = Check type of data required

ld_sysservice1 = Check type of data required

ld_sysservice2 = Check type of data required

ld_sysservice3 = Check type of data required

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