SAP Function Modules

SCRM_START_ASYNC_TASK SAP Function module







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

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


Pattern for FM SCRM_START_ASYNC_TASK - SCRM START ASYNC TASK





CALL FUNCTION 'SCRM_START_ASYNC_TASK' "
  EXPORTING
    im_objects_indx =           " spta_indxtab
    im_check_id =               " crmchkid      ID of a Check
    im_check_message_ids =      " crm_check_messages  Check Messages of a Check
    im_class_name_check =       " crmchk-clchk  Class Name
    im_rfc_destination =        " rfcdes-rfcdest  RFC Destination
    im_rfc_group =              " rzllitab-classname  RFC Group
    im_task_name =              " crmtasknam    Task Name
    im_max_dia_wp =             " crmchkrunc-maxdiawp  Maximum Number of Dialog Work Processes
    im_max_btc_wp =             " crmchkrunc-maxbtcwp
    im_run_id =                 " crmchkrunk    Check Run Key
  IMPORTING
    ex_check_result_indx =      " spta_indxtab
    ex_rfc_subrc =              " sysubrc
    ex_rfc_message =            " crmrfcmsg     RFC Explanatory Text for Exceptions
    ex_rfc_destination =        " rfcdest
    .  "  SCRM_START_ASYNC_TASK

ABAP code example for Function Module SCRM_START_ASYNC_TASK





The ABAP code below is a full code listing to execute function module SCRM_START_ASYNC_TASK 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_ex_check_result_indx  TYPE SPTA_INDXTAB ,
ld_ex_rfc_subrc  TYPE SYSUBRC ,
ld_ex_rfc_message  TYPE CRMRFCMSG ,
ld_ex_rfc_destination  TYPE RFCDEST .

DATA(ld_im_objects_indx) = 'Check type of data required'.
DATA(ld_im_check_id) = 'Check type of data required'.
DATA(ld_im_check_message_ids) = 'Check type of data required'.

SELECT single CLCHK
FROM CRMCHK
INTO @DATA(ld_im_class_name_check).


SELECT single RFCDEST
FROM RFCDES
INTO @DATA(ld_im_rfc_destination).


SELECT single CLASSNAME
FROM RZLLITAB
INTO @DATA(ld_im_rfc_group).

DATA(ld_im_task_name) = 'Check type of data required'.

SELECT single MAXDIAWP
FROM CRMCHKRUNC
INTO @DATA(ld_im_max_dia_wp).


SELECT single MAXBTCWP
FROM CRMCHKRUNC
INTO @DATA(ld_im_max_btc_wp).

DATA(ld_im_run_id) = 'Check type of data required'. . CALL FUNCTION 'SCRM_START_ASYNC_TASK' EXPORTING im_objects_indx = ld_im_objects_indx im_check_id = ld_im_check_id im_check_message_ids = ld_im_check_message_ids im_class_name_check = ld_im_class_name_check im_rfc_destination = ld_im_rfc_destination im_rfc_group = ld_im_rfc_group im_task_name = ld_im_task_name im_max_dia_wp = ld_im_max_dia_wp im_max_btc_wp = ld_im_max_btc_wp im_run_id = ld_im_run_id IMPORTING ex_check_result_indx = ld_ex_check_result_indx ex_rfc_subrc = ld_ex_rfc_subrc ex_rfc_message = ld_ex_rfc_message ex_rfc_destination = ld_ex_rfc_destination . " SCRM_START_ASYNC_TASK
IF SY-SUBRC EQ 0. "All OK 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_ex_check_result_indx  TYPE SPTA_INDXTAB ,
ld_im_objects_indx  TYPE SPTA_INDXTAB ,
ld_ex_rfc_subrc  TYPE SYSUBRC ,
ld_im_check_id  TYPE CRMCHKID ,
ld_ex_rfc_message  TYPE CRMRFCMSG ,
ld_im_check_message_ids  TYPE CRM_CHECK_MESSAGES ,
ld_ex_rfc_destination  TYPE RFCDEST ,
ld_im_class_name_check  TYPE CRMCHK-CLCHK ,
ld_im_rfc_destination  TYPE RFCDES-RFCDEST ,
ld_im_rfc_group  TYPE RZLLITAB-CLASSNAME ,
ld_im_task_name  TYPE CRMTASKNAM ,
ld_im_max_dia_wp  TYPE CRMCHKRUNC-MAXDIAWP ,
ld_im_max_btc_wp  TYPE CRMCHKRUNC-MAXBTCWP ,
ld_im_run_id  TYPE CRMCHKRUNK .

ld_im_objects_indx = 'Check type of data required'.
ld_im_check_id = 'Check type of data required'.
ld_im_check_message_ids = 'Check type of data required'.

SELECT single CLCHK
FROM CRMCHK
INTO ld_im_class_name_check.


SELECT single RFCDEST
FROM RFCDES
INTO ld_im_rfc_destination.


SELECT single CLASSNAME
FROM RZLLITAB
INTO ld_im_rfc_group.

ld_im_task_name = 'Check type of data required'.

SELECT single MAXDIAWP
FROM CRMCHKRUNC
INTO ld_im_max_dia_wp.


SELECT single MAXBTCWP
FROM CRMCHKRUNC
INTO ld_im_max_btc_wp.

ld_im_run_id = 'Check type of data required'.

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