SAP /SDF/SMON_CALLSTACK_TRIGGER Function Module for Write callstack









/SDF/SMON_CALLSTACK_TRIGGER is a standard /sdf/smon callstack trigger SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Write callstack 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 /sdf/smon callstack trigger FM, simply by entering the name /SDF/SMON_CALLSTACK_TRIGGER into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SDF/SMON
Program Name: /SDF/SAPLSMON
Main Program: /SDF/SAPLSMON
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function /SDF/SMON_CALLSTACK_TRIGGER 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 '/SDF/SMON_CALLSTACK_TRIGGER'"Write callstack
EXPORTING
GUID = "GUID for Snapshot Analysis
WP_ID = "Work Process Number
* STACK_GUID = "GUID for Callstack Trigger
* MAX_WAIT_TIME = 20 "Max wait time in seconds

IMPORTING
STACK_NOT_COMPLETE = "General Flag
STACKDATE = "Date when stack has been created
STACKTIME = "Time when stack has been created

TABLES
* CALLSTACK = "Line of an ABAP Call Stack (With Program Positions)

EXCEPTIONS
NO_AUTHORITY = 1
.



IMPORTING Parameters details for /SDF/SMON_CALLSTACK_TRIGGER

GUID - GUID for Snapshot Analysis

Data type: /SDF/SMON_STACKH-GUID
Optional: No
Call by Reference: No ( called with pass by value option)

WP_ID - Work Process Number

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

STACK_GUID - GUID for Callstack Trigger

Data type: /SDF/SMON_STACKH-STACK_GUID
Optional: Yes
Call by Reference: No ( called with pass by value option)

MAX_WAIT_TIME - Max wait time in seconds

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

EXPORTING Parameters details for /SDF/SMON_CALLSTACK_TRIGGER

STACK_NOT_COMPLETE - General Flag

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

STACKDATE - Date when stack has been created

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

STACKTIME - Time when stack has been created

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

TABLES Parameters details for /SDF/SMON_CALLSTACK_TRIGGER

CALLSTACK - Line of an ABAP Call Stack (With Program Positions)

Data type: ABAP_EXTCALLSTACK_LINE
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

NO_AUTHORITY - No Authority

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for /SDF/SMON_CALLSTACK_TRIGGER 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_guid  TYPE /SDF/SMON_STACKH-GUID, "   
lt_callstack  TYPE STANDARD TABLE OF ABAP_EXTCALLSTACK_LINE, "   
lv_no_authority  TYPE ABAP_EXTCALLSTACK_LINE, "   
lv_stack_not_complete  TYPE FLAG, "   
lv_wp_id  TYPE SSI_WORKER_INDEX, "   
lv_stackdate  TYPE DATS, "   
lv_stacktime  TYPE TIMS, "   
lv_stack_guid  TYPE /SDF/SMON_STACKH-STACK_GUID, "   
lv_max_wait_time  TYPE INT4. "   20

  CALL FUNCTION '/SDF/SMON_CALLSTACK_TRIGGER'  "Write callstack
    EXPORTING
         GUID = lv_guid
         WP_ID = lv_wp_id
         STACK_GUID = lv_stack_guid
         MAX_WAIT_TIME = lv_max_wait_time
    IMPORTING
         STACK_NOT_COMPLETE = lv_stack_not_complete
         STACKDATE = lv_stackdate
         STACKTIME = lv_stacktime
    TABLES
         CALLSTACK = lt_callstack
    EXCEPTIONS
        NO_AUTHORITY = 1
. " /SDF/SMON_CALLSTACK_TRIGGER




ABAP code using 7.40 inline data declarations to call FM /SDF/SMON_CALLSTACK_TRIGGER

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 GUID FROM /SDF/SMON_STACKH INTO @DATA(ld_guid).
 
 
 
 
 
 
 
"SELECT single STACK_GUID FROM /SDF/SMON_STACKH INTO @DATA(ld_stack_guid).
 
DATA(ld_max_wait_time) = 20.
 


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!