SAP Function Modules

DX_TASK_CREATE_COMPLETE SAP Function module







DX_TASK_CREATE_COMPLETE 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_CREATE_COMPLETE 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_CREATE_COMPLETE - DX TASK CREATE COMPLETE





CALL FUNCTION 'DX_TASK_CREATE_COMPLETE' "
  EXPORTING
*   project =                   " dxtasks-project
*   subproject =                " dxtasks-subproject
*   rundef =                    " dxtasks-rundef
*   task =                      " dxtasks-task
*   pretask =                   " dxtasks-pretask
    tasktype =                  " dxtasks-tasktype  Task Type
    progtype =                  " dxtasks-progtype  Program Type
*   attribdata =                " dxattrib      Attributes for Transfer Using BAPIs
*   attribdata2 =               " dxattrib2     Attributes of Task of Type MAP LSMW
*   attribdata3 =               " dxattrib3     Attribute of Task of Type Split
    attribdata4 =               " dxattrib4     Attributes of Task of Type MAP DMCW
*   dialog = 'X'                " dxfields-dialog
  IMPORTING
    taskdata =                  " dxtasks       Tasks for Mass Data Transfer to R/3
* TABLES
*   tasktext =                  " dxtasks_t     Task Texts for Mass Data Transfer to R/3
*   input_files =               " dxfilelp      Assignment of Files to Tasks
*   output_files =              " dxfilelp
  EXCEPTIONS
    RUNDEF_DOES_NOT_EXIST = 1   "
    TASK_ALREADY_EXISTS = 2     "
    RUNS_ALREADY_EXIST = 3      "
    PROGTYPE_NOT_VALID = 4      "
    CANCELED_BY_USER = 5        "
    DB_ERROR = 6                "
    WRONG_OBJECTTYPE = 7        "
    NO_AUTHORITY = 8            "
    .  "  DX_TASK_CREATE_COMPLETE

ABAP code example for Function Module DX_TASK_CREATE_COMPLETE





The ABAP code below is a full code listing to execute function module DX_TASK_CREATE_COMPLETE 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 ,
it_tasktext  TYPE STANDARD TABLE OF DXTASKS_T,"TABLES PARAM
wa_tasktext  LIKE LINE OF it_tasktext ,
it_input_files  TYPE STANDARD TABLE OF DXFILELP,"TABLES PARAM
wa_input_files  LIKE LINE OF it_input_files ,
it_output_files  TYPE STANDARD TABLE OF DXFILELP,"TABLES PARAM
wa_output_files  LIKE LINE OF it_output_files .


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 PRETASK
FROM DXTASKS
INTO @DATA(ld_pretask).


SELECT single TASKTYPE
FROM DXTASKS
INTO @DATA(ld_tasktype).


SELECT single PROGTYPE
FROM DXTASKS
INTO @DATA(ld_progtype).

DATA(ld_attribdata) = 'Check type of data required'.
DATA(ld_attribdata2) = 'Check type of data required'.
DATA(ld_attribdata3) = 'Check type of data required'.
DATA(ld_attribdata4) = 'Check type of data required'.

DATA(ld_dialog) = some text here

"populate fields of struture and append to itab
append wa_tasktext to it_tasktext.

"populate fields of struture and append to itab
append wa_input_files to it_input_files.

"populate fields of struture and append to itab
append wa_output_files to it_output_files. . CALL FUNCTION 'DX_TASK_CREATE_COMPLETE' EXPORTING * project = ld_project * subproject = ld_subproject * rundef = ld_rundef * task = ld_task * pretask = ld_pretask tasktype = ld_tasktype progtype = ld_progtype * attribdata = ld_attribdata * attribdata2 = ld_attribdata2 * attribdata3 = ld_attribdata3 attribdata4 = ld_attribdata4 * dialog = ld_dialog IMPORTING taskdata = ld_taskdata * TABLES * tasktext = it_tasktext * input_files = it_input_files * output_files = it_output_files EXCEPTIONS RUNDEF_DOES_NOT_EXIST = 1 TASK_ALREADY_EXISTS = 2 RUNS_ALREADY_EXIST = 3 PROGTYPE_NOT_VALID = 4 CANCELED_BY_USER = 5 DB_ERROR = 6 WRONG_OBJECTTYPE = 7 NO_AUTHORITY = 8 . " DX_TASK_CREATE_COMPLETE
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 ELSEIF SY-SUBRC EQ 8. "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 ,
it_tasktext  TYPE STANDARD TABLE OF DXTASKS_T ,
wa_tasktext  LIKE LINE OF it_tasktext,
ld_subproject  TYPE DXTASKS-SUBPROJECT ,
it_input_files  TYPE STANDARD TABLE OF DXFILELP ,
wa_input_files  LIKE LINE OF it_input_files,
ld_rundef  TYPE DXTASKS-RUNDEF ,
it_output_files  TYPE STANDARD TABLE OF DXFILELP ,
wa_output_files  LIKE LINE OF it_output_files,
ld_task  TYPE DXTASKS-TASK ,
ld_pretask  TYPE DXTASKS-PRETASK ,
ld_tasktype  TYPE DXTASKS-TASKTYPE ,
ld_progtype  TYPE DXTASKS-PROGTYPE ,
ld_attribdata  TYPE DXATTRIB ,
ld_attribdata2  TYPE DXATTRIB2 ,
ld_attribdata3  TYPE DXATTRIB3 ,
ld_attribdata4  TYPE DXATTRIB4 ,
ld_dialog  TYPE DXFIELDS-DIALOG .


SELECT single PROJECT
FROM DXTASKS
INTO ld_project.


"populate fields of struture and append to itab
append wa_tasktext to it_tasktext.

SELECT single SUBPROJECT
FROM DXTASKS
INTO ld_subproject.


"populate fields of struture and append to itab
append wa_input_files to it_input_files.

SELECT single RUNDEF
FROM DXTASKS
INTO ld_rundef.


"populate fields of struture and append to itab
append wa_output_files to it_output_files.

SELECT single TASK
FROM DXTASKS
INTO ld_task.


SELECT single PRETASK
FROM DXTASKS
INTO ld_pretask.


SELECT single TASKTYPE
FROM DXTASKS
INTO ld_tasktype.


SELECT single PROGTYPE
FROM DXTASKS
INTO ld_progtype.

ld_attribdata = 'Check type of data required'.
ld_attribdata2 = 'Check type of data required'.
ld_attribdata3 = 'Check type of data required'.
ld_attribdata4 = 'Check type of data required'.

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