SAP CPE_UWLTASK_CREATE Function Module for ABAP enabling of Ad hoc Workflow









CPE_UWLTASK_CREATE is a standard cpe uwltask create SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for ABAP enabling of Ad hoc Workflow 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 cpe uwltask create FM, simply by entering the name CPE_UWLTASK_CREATE into the relevant SAP transaction such as SE37 or SE38.

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



Function CPE_UWLTASK_CREATE 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 'CPE_UWLTASK_CREATE'"ABAP enabling of Ad hoc Workflow
EXPORTING
* TASKDATA = "General CPE Task Structure
* LOGGING = ' ' "Single-Character Flag

IMPORTING
CPEINSTANCEID = "Character Field Length = 10

TABLES
* URLPARAMETERS = "General purpose data structure for CPE (name-value pairs)
* CONTEXT = "General purpose data structure for CPE (name-value pairs)
* ATTACHMENTS = "General purpose data structure for CPE (name-value pairs)
* RFCDESTINATIONS = "General purpose data structure for CPE (name-value pairs)

EXCEPTIONS
TASK_CREATION_FAILED = 1
.



IMPORTING Parameters details for CPE_UWLTASK_CREATE

TASKDATA - General CPE Task Structure

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

LOGGING - Single-Character Flag

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

EXPORTING Parameters details for CPE_UWLTASK_CREATE

CPEINSTANCEID - Character Field Length = 10

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

TABLES Parameters details for CPE_UWLTASK_CREATE

URLPARAMETERS - General purpose data structure for CPE (name-value pairs)

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

CONTEXT - General purpose data structure for CPE (name-value pairs)

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

ATTACHMENTS - General purpose data structure for CPE (name-value pairs)

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

RFCDESTINATIONS - General purpose data structure for CPE (name-value pairs)

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

EXCEPTIONS details

TASK_CREATION_FAILED - Task could not be created

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for CPE_UWLTASK_CREATE 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_taskdata  TYPE CPETASK, "   
lv_cpeinstanceid  TYPE CHAR10, "   
lt_urlparameters  TYPE STANDARD TABLE OF CPENAMEVALUEPAIRS, "   
lv_task_creation_failed  TYPE CPENAMEVALUEPAIRS, "   
lt_context  TYPE STANDARD TABLE OF CPENAMEVALUEPAIRS, "   
lv_logging  TYPE CHAR1, "   SPACE
lt_attachments  TYPE STANDARD TABLE OF CPENAMEVALUEPAIRS, "   
lt_rfcdestinations  TYPE STANDARD TABLE OF CPERFCDESTINATION. "   

  CALL FUNCTION 'CPE_UWLTASK_CREATE'  "ABAP enabling of Ad hoc Workflow
    EXPORTING
         TASKDATA = lv_taskdata
         LOGGING = lv_logging
    IMPORTING
         CPEINSTANCEID = lv_cpeinstanceid
    TABLES
         URLPARAMETERS = lt_urlparameters
         CONTEXT = lt_context
         ATTACHMENTS = lt_attachments
         RFCDESTINATIONS = lt_rfcdestinations
    EXCEPTIONS
        TASK_CREATION_FAILED = 1
. " CPE_UWLTASK_CREATE




ABAP code using 7.40 inline data declarations to call FM CPE_UWLTASK_CREATE

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_logging) = ' '.
 
 
 


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!