SAP Function Modules

DX_TASK_CHANGE SAP Function module







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

Associated Function Group: DX_TASK
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM DX_TASK_CHANGE - DX TASK CHANGE





CALL FUNCTION 'DX_TASK_CHANGE' "
  EXPORTING
    project =                   " dxtasks-project
    subproject =                " dxtasks-subproject
    rundef =                    " dxtasks-rundef
    task =                      " dxtasks-task
*   text =                      " dxtasks_t-text
*   dialog = 'X'                " dxfields-dialog
  IMPORTING
    taskdata =                  " dxtasks
    tasktext =                  " dxtasks_t-text
  EXCEPTIONS
    RUNDEF_DOES_NOT_EXIST = 1   "
    TASK_DOES_NOT_EXIST = 2     "
    RUNS_ALREADY_EXIST = 3      "
    PROGTYPE_NOT_VALID = 4      "
    CANCELED_BY_USER = 5        "
    DB_ERROR = 6                "
    NO_AUTHORITY = 7            "
    .  "  DX_TASK_CHANGE

ABAP code example for Function Module DX_TASK_CHANGE





The ABAP code below is a full code listing to execute function module DX_TASK_CHANGE 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_taskdata  TYPE DXTASKS ,
ld_tasktext  TYPE DXTASKS_T-TEXT .


SELECT single PROJECT
FROM DXTASKS
INTO @DATA(ld_project).


SELECT single SUBPROJECT
FROM DXTASKS
INTO @DATA(ld_subproject).


SELECT single RUNDEF
FROM DXTASKS
INTO @DATA(ld_rundef).


SELECT single TASK
FROM DXTASKS
INTO @DATA(ld_task).


SELECT single TEXT
FROM DXTASKS_T
INTO @DATA(ld_text).


DATA(ld_dialog) = some text here . CALL FUNCTION 'DX_TASK_CHANGE' EXPORTING project = ld_project subproject = ld_subproject rundef = ld_rundef task = ld_task * text = ld_text * dialog = ld_dialog IMPORTING taskdata = ld_taskdata tasktext = ld_tasktext EXCEPTIONS RUNDEF_DOES_NOT_EXIST = 1 TASK_DOES_NOT_EXIST = 2 RUNS_ALREADY_EXIST = 3 PROGTYPE_NOT_VALID = 4 CANCELED_BY_USER = 5 DB_ERROR = 6 NO_AUTHORITY = 7 . " DX_TASK_CHANGE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here 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_taskdata  TYPE DXTASKS ,
ld_project  TYPE DXTASKS-PROJECT ,
ld_tasktext  TYPE DXTASKS_T-TEXT ,
ld_subproject  TYPE DXTASKS-SUBPROJECT ,
ld_rundef  TYPE DXTASKS-RUNDEF ,
ld_task  TYPE DXTASKS-TASK ,
ld_text  TYPE DXTASKS_T-TEXT ,
ld_dialog  TYPE DXFIELDS-DIALOG .


SELECT single PROJECT
FROM DXTASKS
INTO ld_project.


SELECT single SUBPROJECT
FROM DXTASKS
INTO ld_subproject.


SELECT single RUNDEF
FROM DXTASKS
INTO ld_rundef.


SELECT single TASK
FROM DXTASKS
INTO ld_task.


SELECT single TEXT
FROM DXTASKS_T
INTO ld_text.


ld_dialog = some text here

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