SAP STUM_WP_SERVER_ACTIVITY Function Module for Returns the Current Activity of Work Processes of Current Instance









STUM_WP_SERVER_ACTIVITY is a standard stum wp server activity SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Returns the Current Activity of Work Processes of Current Instance 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 stum wp server activity FM, simply by entering the name STUM_WP_SERVER_ACTIVITY into the relevant SAP transaction such as SE37 or SE38.

Function Group: STUM
Program Name: SAPLSTUM
Main Program: SAPLSTUM
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function STUM_WP_SERVER_ACTIVITY 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 'STUM_WP_SERVER_ACTIVITY'"Returns the Current Activity of Work Processes of Current Instance
EXPORTING
* WITH_CPU = 0 "Determine CPU time (1) or do not determine CPU time (0)

IMPORTING
OWN_WP_NO = "Work process used by function module
OWN_WP_INDEX = "

TABLES
WP_INFO = "Table with SAP work process activity

EXCEPTIONS
ARGUMENT_ERROR = 1 SEND_ERROR = 2
.



IMPORTING Parameters details for STUM_WP_SERVER_ACTIVITY

WITH_CPU - Determine CPU time (1) or do not determine CPU time (0)

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

EXPORTING Parameters details for STUM_WP_SERVER_ACTIVITY

OWN_WP_NO - Work process used by function module

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

OWN_WP_INDEX -

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

TABLES Parameters details for STUM_WP_SERVER_ACTIVITY

WP_INFO - Table with SAP work process activity

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

EXCEPTIONS details

ARGUMENT_ERROR -

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

SEND_ERROR -

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

Copy and paste ABAP code example for STUM_WP_SERVER_ACTIVITY 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:
lt_wp_info  TYPE STANDARD TABLE OF WPTOTLINFO, "   
lv_with_cpu  TYPE TSKH_DUMMY-WITH_CPU, "   0
lv_own_wp_no  TYPE WPTOTLINFO-WP_NO, "   
lv_argument_error  TYPE WPTOTLINFO, "   
lv_send_error  TYPE WPTOTLINFO, "   
lv_own_wp_index  TYPE WPTOTLINFO-WP_INDEX. "   

  CALL FUNCTION 'STUM_WP_SERVER_ACTIVITY'  "Returns the Current Activity of Work Processes of Current Instance
    EXPORTING
         WITH_CPU = lv_with_cpu
    IMPORTING
         OWN_WP_NO = lv_own_wp_no
         OWN_WP_INDEX = lv_own_wp_index
    TABLES
         WP_INFO = lt_wp_info
    EXCEPTIONS
        ARGUMENT_ERROR = 1
        SEND_ERROR = 2
. " STUM_WP_SERVER_ACTIVITY




ABAP code using 7.40 inline data declarations to call FM STUM_WP_SERVER_ACTIVITY

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 WITH_CPU FROM TSKH_DUMMY INTO @DATA(ld_with_cpu).
 
"SELECT single WP_NO FROM WPTOTLINFO INTO @DATA(ld_own_wp_no).
 
 
 
"SELECT single WP_INDEX FROM WPTOTLINFO INTO @DATA(ld_own_wp_index).
 


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!