SAP SAP_WAPI_CREATE_OUTBOX Function Module for Workflow Interfaces: Set Up Outbox for User









SAP_WAPI_CREATE_OUTBOX is a standard sap wapi create outbox SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Workflow Interfaces: Set Up Outbox for User 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 sap wapi create outbox FM, simply by entering the name SAP_WAPI_CREATE_OUTBOX into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWRW
Program Name: SAPLSWRW
Main Program: SAPLSWRW
Appliation area:
Release date: 13-Jan-2009
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SAP_WAPI_CREATE_OUTBOX 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 'SAP_WAPI_CREATE_OUTBOX'"Workflow Interfaces: Set Up Outbox for User
EXPORTING
* USER = SY-UNAME "SAP System, User Logon Name
* LANGUAGE = SY-LANGU "SAP R/3 System, Current Language
* TRANSLATE_WI_TEXT = ' ' "Translate Work Item Text to Parameter Text?
* READ_TASK_TEXT = ' ' "Read Task Text for Work Item?
* SINCE_DATE = SY-DATUM "Selection Date
* IM_TASK_FILTER = "Task filter
* IM_STATUS_FILTER = "Status Filter
* TIME_ZONE = "Time Zone of Current User

IMPORTING
RETURN_CODE = "Return Value (0, 999)

TABLES
* WORKFLOWS_STARTED = "Started workflows
* WORKITEMS_EXECUTED = "Executed work items
* WORKITEMS_FORWARDED = "Forwarded work items
* MESSAGE_LINES = "Message Lines
* MESSAGE_STRUCT = "Message Structure
* TASK_FILTER = "Task Filter (Obsolete)
.



IMPORTING Parameters details for SAP_WAPI_CREATE_OUTBOX

USER - SAP System, User Logon Name

Data type: SYUNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - SAP R/3 System, Current Language

Data type: SYLANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

TRANSLATE_WI_TEXT - Translate Work Item Text to Parameter Text?

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

READ_TASK_TEXT - Read Task Text for Work Item?

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

SINCE_DATE - Selection Date

Data type: SYDATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_TASK_FILTER - Task filter

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

IM_STATUS_FILTER - Status Filter

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

TIME_ZONE - Time Zone of Current User

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

EXPORTING Parameters details for SAP_WAPI_CREATE_OUTBOX

RETURN_CODE - Return Value (0, 999)

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SAP_WAPI_CREATE_OUTBOX

WORKFLOWS_STARTED - Started workflows

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

WORKITEMS_EXECUTED - Executed work items

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

WORKITEMS_FORWARDED - Forwarded work items

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

MESSAGE_LINES - Message Lines

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

MESSAGE_STRUCT - Message Structure

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

TASK_FILTER - Task Filter (Obsolete)

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

Copy and paste ABAP code example for SAP_WAPI_CREATE_OUTBOX 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_user  TYPE SYUNAME, "   SY-UNAME
lv_return_code  TYPE SY-SUBRC, "   
lt_workflows_started  TYPE STANDARD TABLE OF SWR_WIHDR, "   
lv_language  TYPE SYLANGU, "   SY-LANGU
lt_workitems_executed  TYPE STANDARD TABLE OF SWR_WIHDR, "   
lv_translate_wi_text  TYPE XFELD, "   SPACE
lt_workitems_forwarded  TYPE STANDARD TABLE OF SWR_WIHDR, "   
lt_message_lines  TYPE STANDARD TABLE OF SWR_MESSAG, "   
lv_read_task_text  TYPE XFELD, "   SPACE
lv_since_date  TYPE SYDATUM, "   SY-DATUM
lt_message_struct  TYPE STANDARD TABLE OF SWR_MSTRUC, "   
lt_task_filter  TYPE STANDARD TABLE OF SWRTTASK, "   
lv_im_task_filter  TYPE SWRTTASK, "   
lv_im_status_filter  TYPE SWRTSTATUS, "   
lv_time_zone  TYPE SYSTZONLO. "   

  CALL FUNCTION 'SAP_WAPI_CREATE_OUTBOX'  "Workflow Interfaces: Set Up Outbox for User
    EXPORTING
         USER = lv_user
         LANGUAGE = lv_language
         TRANSLATE_WI_TEXT = lv_translate_wi_text
         READ_TASK_TEXT = lv_read_task_text
         SINCE_DATE = lv_since_date
         IM_TASK_FILTER = lv_im_task_filter
         IM_STATUS_FILTER = lv_im_status_filter
         TIME_ZONE = lv_time_zone
    IMPORTING
         RETURN_CODE = lv_return_code
    TABLES
         WORKFLOWS_STARTED = lt_workflows_started
         WORKITEMS_EXECUTED = lt_workitems_executed
         WORKITEMS_FORWARDED = lt_workitems_forwarded
         MESSAGE_LINES = lt_message_lines
         MESSAGE_STRUCT = lt_message_struct
         TASK_FILTER = lt_task_filter
. " SAP_WAPI_CREATE_OUTBOX




ABAP code using 7.40 inline data declarations to call FM SAP_WAPI_CREATE_OUTBOX

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_user) = SY-UNAME.
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_return_code).
 
 
DATA(ld_language) = SY-LANGU.
 
 
DATA(ld_translate_wi_text) = ' '.
 
 
 
DATA(ld_read_task_text) = ' '.
 
DATA(ld_since_date) = SY-DATUM.
 
 
 
 
 
 


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!