SAP TH_DEBUG_WP Function Module for









TH_DEBUG_WP is a standard th debug wp 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 th debug wp FM, simply by entering the name TH_DEBUG_WP into the relevant SAP transaction such as SE37 or SE38.

Function Group: THFB
Program Name: SAPLTHFB
Main Program: SAPLTHFB
Appliation area: S
Release date: 19-Oct-1994
Mode(Normal, Remote etc): Normal Function Module
Update:



Function TH_DEBUG_WP 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 'TH_DEBUG_WP'"
EXPORTING
* WP_NO = 'XX' "Number of work process
* DEST = ' ' "Remote debug destination
* WP_INDEX = 999999 "
* LOGON_ID = -1 "
* SESSION_HDL = 255 "

IMPORTING
SUBRC = "Function module return code

EXCEPTIONS
NO_AUTHORITY = 1 NO_DEBUGGING_POSSIBLE = 2 PARAMETER_ERROR = 3 REQUEST_CHANGED = 4 TOO_MANY_DEBUGGING_SESSIONS = 5
.



IMPORTING Parameters details for TH_DEBUG_WP

WP_NO - Number of work process

Data type: WPINFO-WP_NO
Default: 'XX'
Optional: Yes
Call by Reference: No ( called with pass by value option)

DEST - Remote debug destination

Data type: MSXXLIST-NAME
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

WP_INDEX -

Data type: WPINFO-WP_INDEX
Default: 999999
Optional: Yes
Call by Reference: No ( called with pass by value option)

LOGON_ID -

Data type: I
Default: -1
Optional: Yes
Call by Reference: No ( called with pass by value option)

SESSION_HDL -

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

EXPORTING Parameters details for TH_DEBUG_WP

SUBRC - Function module return code

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

EXCEPTIONS details

NO_AUTHORITY - No authorization to call the function module

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

NO_DEBUGGING_POSSIBLE - Debugging is not currently possible

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

PARAMETER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

REQUEST_CHANGED -

Data type:
Optional: No
Call by Reference: Yes

TOO_MANY_DEBUGGING_SESSIONS -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for TH_DEBUG_WP 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_subrc  TYPE SY-SUBRC, "   
lv_wp_no  TYPE WPINFO-WP_NO, "   'XX'
lv_no_authority  TYPE WPINFO, "   
lv_dest  TYPE MSXXLIST-NAME, "   ' '
lv_no_debugging_possible  TYPE MSXXLIST, "   
lv_wp_index  TYPE WPINFO-WP_INDEX, "   999999
lv_parameter_error  TYPE WPINFO, "   
lv_logon_id  TYPE I, "   -1
lv_request_changed  TYPE I, "   
lv_session_hdl  TYPE INT1, "   255
lv_too_many_debugging_sessions  TYPE INT1. "   

  CALL FUNCTION 'TH_DEBUG_WP'  "
    EXPORTING
         WP_NO = lv_wp_no
         DEST = lv_dest
         WP_INDEX = lv_wp_index
         LOGON_ID = lv_logon_id
         SESSION_HDL = lv_session_hdl
    IMPORTING
         SUBRC = lv_subrc
    EXCEPTIONS
        NO_AUTHORITY = 1
        NO_DEBUGGING_POSSIBLE = 2
        PARAMETER_ERROR = 3
        REQUEST_CHANGED = 4
        TOO_MANY_DEBUGGING_SESSIONS = 5
. " TH_DEBUG_WP




ABAP code using 7.40 inline data declarations to call FM TH_DEBUG_WP

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 SUBRC FROM SY INTO @DATA(ld_subrc).
 
"SELECT single WP_NO FROM WPINFO INTO @DATA(ld_wp_no).
DATA(ld_wp_no) = 'XX'.
 
 
"SELECT single NAME FROM MSXXLIST INTO @DATA(ld_dest).
DATA(ld_dest) = ' '.
 
 
"SELECT single WP_INDEX FROM WPINFO INTO @DATA(ld_wp_index).
DATA(ld_wp_index) = 999999.
 
 
DATA(ld_logon_id) = -1.
 
 
DATA(ld_session_hdl) = 255.
 
 


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!