SAP IDOC_WORKITEM_INBOUND_CREATE Function Module for IDoc inb.procg: Create Business Workflow work item
IDOC_WORKITEM_INBOUND_CREATE is a standard idoc workitem inbound 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 IDoc inb.procg: Create Business Workflow work item 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 idoc workitem inbound create FM, simply by entering the name IDOC_WORKITEM_INBOUND_CREATE into the relevant SAP transaction such as SE37 or SE38.
Function Group: EDIR
Program Name: SAPLEDIR
Main Program: SAPLEDIR
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function IDOC_WORKITEM_INBOUND_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 'IDOC_WORKITEM_INBOUND_CREATE'"IDoc inb.procg: Create Business Workflow work item.
EXPORTING
PI_TASK_NUMBER = "
PI_IDOC_NUMBER = "
* PI_CALLED_ONLINE = ' ' "
PI_ORG_UNIT = "
* SUCC_SHOW_FLAG = "
IMPORTING
PE_WORKITEM_ID = "
EXCEPTIONS
WF_TASK_ERROR = 1
IMPORTING Parameters details for IDOC_WORKITEM_INBOUND_CREATE
PI_TASK_NUMBER -
Data type: TEDE2-EVENIDOptional: No
Call by Reference: No ( called with pass by value option)
PI_IDOC_NUMBER -
Data type: TIDOC_IDOC_NUMBEROptional: No
Call by Reference: No ( called with pass by value option)
PI_CALLED_ONLINE -
Data type: TIDOC_BOOLDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_ORG_UNIT -
Data type: SWHACTOROptional: No
Call by Reference: No ( called with pass by value option)
SUCC_SHOW_FLAG -
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for IDOC_WORKITEM_INBOUND_CREATE
PE_WORKITEM_ID -
Data type: SWWWIHEAD-WI_IDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WF_TASK_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for IDOC_WORKITEM_INBOUND_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_wf_task_error | TYPE STRING, " | |||
| lv_pe_workitem_id | TYPE SWWWIHEAD-WI_ID, " | |||
| lv_pi_task_number | TYPE TEDE2-EVENID, " | |||
| lv_pi_idoc_number | TYPE TIDOC_IDOC_NUMBER, " | |||
| lv_pi_called_online | TYPE TIDOC_BOOL, " SPACE | |||
| lv_pi_org_unit | TYPE SWHACTOR, " | |||
| lv_succ_show_flag | TYPE C. " |
|   CALL FUNCTION 'IDOC_WORKITEM_INBOUND_CREATE' "IDoc inb.procg: Create Business Workflow work item |
| EXPORTING | ||
| PI_TASK_NUMBER | = lv_pi_task_number | |
| PI_IDOC_NUMBER | = lv_pi_idoc_number | |
| PI_CALLED_ONLINE | = lv_pi_called_online | |
| PI_ORG_UNIT | = lv_pi_org_unit | |
| SUCC_SHOW_FLAG | = lv_succ_show_flag | |
| IMPORTING | ||
| PE_WORKITEM_ID | = lv_pe_workitem_id | |
| EXCEPTIONS | ||
| WF_TASK_ERROR = 1 | ||
| . " IDOC_WORKITEM_INBOUND_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM IDOC_WORKITEM_INBOUND_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.| "SELECT single WI_ID FROM SWWWIHEAD INTO @DATA(ld_pe_workitem_id). | ||||
| "SELECT single EVENID FROM TEDE2 INTO @DATA(ld_pi_task_number). | ||||
| DATA(ld_pi_called_online) | = ' '. | |||
Search for further information about these or an SAP related objects