SAP CO_WORK_PACKAGE_PROCESS Function Module for Process batch of function requests
CO_WORK_PACKAGE_PROCESS is a standard co work package process SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Process batch of function requests 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 co work package process FM, simply by entering the name CO_WORK_PACKAGE_PROCESS into the relevant SAP transaction such as SE37 or SE38.
Function Group: COWORK
Program Name: SAPLCOWORK
Main Program: SAPLCOWORK
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:
Function CO_WORK_PACKAGE_PROCESS 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 'CO_WORK_PACKAGE_PROCESS'"Process batch of function requests.
EXPORTING
I_TCODE = "
* I_FLG_MEMORY = ' ' "
* I_FLG_TEST = ' ' "General Indicator
* I_FLG_NEW_TASK = ' ' "Flag: Background processing
* I_FLG_DUMP_SIMULATE = ' ' "Simulate short dump
IMPORTING
E_S_RFC_SYSTEM_INFO = "
TABLES
I_T_PACKAGE = "Structure for RFC transfer from FUNREQ in order workbench
E_T_TASKLOG = "Structure for RFC transfer of task log in order workbench
ET_APPLLOG = "Table of Application Log Handles for COWORK
EXCEPTIONS
EXECUTION_FAILED = 1 APPLICATION_LOG_ERROR = 2
IMPORTING Parameters details for CO_WORK_PACKAGE_PROCESS
I_TCODE -
Data type: SYTCODEOptional: No
Call by Reference: No ( called with pass by value option)
I_FLG_MEMORY -
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_TEST - General Indicator
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_NEW_TASK - Flag: Background processing
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
I_FLG_DUMP_SIMULATE - Simulate short dump
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO_WORK_PACKAGE_PROCESS
E_S_RFC_SYSTEM_INFO -
Data type: RFCSIOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for CO_WORK_PACKAGE_PROCESS
I_T_PACKAGE - Structure for RFC transfer from FUNREQ in order workbench
Data type: COWORK_FUNREQOptional: No
Call by Reference: Yes
E_T_TASKLOG - Structure for RFC transfer of task log in order workbench
Data type: COWORK_TASKLOGOptional: No
Call by Reference: Yes
ET_APPLLOG - Table of Application Log Handles for COWORK
Data type: COWB_T_APPLLOGOptional: No
Call by Reference: Yes
EXCEPTIONS details
EXECUTION_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
APPLICATION_LOG_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO_WORK_PACKAGE_PROCESS 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_i_tcode | TYPE SYTCODE, " | |||
lt_i_t_package | TYPE STANDARD TABLE OF COWORK_FUNREQ, " | |||
lv_execution_failed | TYPE COWORK_FUNREQ, " | |||
lv_e_s_rfc_system_info | TYPE RFCSI, " | |||
lt_e_t_tasklog | TYPE STANDARD TABLE OF COWORK_TASKLOG, " | |||
lv_i_flg_memory | TYPE FLAG, " SPACE | |||
lv_application_log_error | TYPE FLAG, " | |||
lt_et_appllog | TYPE STANDARD TABLE OF COWB_T_APPLLOG, " | |||
lv_i_flg_test | TYPE FLAG, " SPACE | |||
lv_i_flg_new_task | TYPE FLAG, " SPACE | |||
lv_i_flg_dump_simulate | TYPE FLAG. " SPACE |
  CALL FUNCTION 'CO_WORK_PACKAGE_PROCESS' "Process batch of function requests |
EXPORTING | ||
I_TCODE | = lv_i_tcode | |
I_FLG_MEMORY | = lv_i_flg_memory | |
I_FLG_TEST | = lv_i_flg_test | |
I_FLG_NEW_TASK | = lv_i_flg_new_task | |
I_FLG_DUMP_SIMULATE | = lv_i_flg_dump_simulate | |
IMPORTING | ||
E_S_RFC_SYSTEM_INFO | = lv_e_s_rfc_system_info | |
TABLES | ||
I_T_PACKAGE | = lt_i_t_package | |
E_T_TASKLOG | = lt_e_t_tasklog | |
ET_APPLLOG | = lt_et_appllog | |
EXCEPTIONS | ||
EXECUTION_FAILED = 1 | ||
APPLICATION_LOG_ERROR = 2 | ||
. " CO_WORK_PACKAGE_PROCESS |
ABAP code using 7.40 inline data declarations to call FM CO_WORK_PACKAGE_PROCESS
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_i_flg_memory) | = ' '. | |||
DATA(ld_i_flg_test) | = ' '. | |||
DATA(ld_i_flg_new_task) | = ' '. | |||
DATA(ld_i_flg_dump_simulate) | = ' '. | |||
Search for further information about these or an SAP related objects