SAP /SMB/TASK_MAINTENANCE Function Module for Generic Task Maintenance









/SMB/TASK_MAINTENANCE is a standard /smb/task maintenance SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Generic Task Maintenance 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 /smb/task maintenance FM, simply by entering the name /SMB/TASK_MAINTENANCE into the relevant SAP transaction such as SE37 or SE38.

Function Group: /SMB/TASK
Program Name: /SMB/SAPLTASK
Main Program: /SMB/SAPLTASK
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function /SMB/TASK_MAINTENANCE 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 '/SMB/TASK_MAINTENANCE'"Generic Task Maintenance
EXPORTING
* IV_EDIT_MODE = "New Input Values
* IV_SOLUTION_ID = "Solution ID
* IV_BBID = "Building Block ID
* IV_DISPLAY_ONLY = ABAP_FALSE "
* IV_SEC_TASK_MAINTENANCE = ABAP_FALSE "

IMPORTING
EV_CANCEL = "

CHANGING
CO_TASK_DEFINITION = "Task of screen 450

EXCEPTIONS
TASK_DEFINITION_MISSING = 1
.



IMPORTING Parameters details for /SMB/TASK_MAINTENANCE

IV_EDIT_MODE - New Input Values

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

IV_SOLUTION_ID - Solution ID

Data type: /SMB/SOLUTION_ID
Optional: Yes
Call by Reference: Yes

IV_BBID - Building Block ID

Data type: /SMB/BBID
Optional: Yes
Call by Reference: Yes

IV_DISPLAY_ONLY -

Data type: ABAP_BOOL
Default: ABAP_FALSE
Optional: Yes
Call by Reference: Yes

IV_SEC_TASK_MAINTENANCE -

Data type: ABAP_BOOL
Default: ABAP_FALSE
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for /SMB/TASK_MAINTENANCE

EV_CANCEL -

Data type: ABAP_BOOL
Optional: No
Call by Reference: Yes

CHANGING Parameters details for /SMB/TASK_MAINTENANCE

CO_TASK_DEFINITION - Task of screen 450

Data type: /SMB/CL_TASK_DEFINITION
Optional: No
Call by Reference: Yes

EXCEPTIONS details

TASK_DEFINITION_MISSING - Illegal Call: Task Definition is missing

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for /SMB/TASK_MAINTENANCE 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_ev_cancel  TYPE ABAP_BOOL, "   
lv_iv_edit_mode  TYPE XFLAG, "   
lv_co_task_definition  TYPE /SMB/CL_TASK_DEFINITION, "   
lv_task_definition_missing  TYPE /SMB/CL_TASK_DEFINITION, "   
lv_iv_solution_id  TYPE /SMB/SOLUTION_ID, "   
lv_iv_bbid  TYPE /SMB/BBID, "   
lv_iv_display_only  TYPE ABAP_BOOL, "   ABAP_FALSE
lv_iv_sec_task_maintenance  TYPE ABAP_BOOL. "   ABAP_FALSE

  CALL FUNCTION '/SMB/TASK_MAINTENANCE'  "Generic Task Maintenance
    EXPORTING
         IV_EDIT_MODE = lv_iv_edit_mode
         IV_SOLUTION_ID = lv_iv_solution_id
         IV_BBID = lv_iv_bbid
         IV_DISPLAY_ONLY = lv_iv_display_only
         IV_SEC_TASK_MAINTENANCE = lv_iv_sec_task_maintenance
    IMPORTING
         EV_CANCEL = lv_ev_cancel
    CHANGING
         CO_TASK_DEFINITION = lv_co_task_definition
    EXCEPTIONS
        TASK_DEFINITION_MISSING = 1
. " /SMB/TASK_MAINTENANCE




ABAP code using 7.40 inline data declarations to call FM /SMB/TASK_MAINTENANCE

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.

 
 
 
 
 
 
DATA(ld_iv_display_only) = ABAP_FALSE.
 
DATA(ld_iv_sec_task_maintenance) = ABAP_FALSE.
 


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!