SAP Function Modules

SWW_WI_CONTAINER_MODIFY SAP Function module







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

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


Pattern for FM SWW_WI_CONTAINER_MODIFY - SWW WI CONTAINER MODIFY





CALL FUNCTION 'SWW_WI_CONTAINER_MODIFY' "
  EXPORTING
    wi_id =                     " swwwihead-wi_id  Work item ID
*   do_commit = 'X'             " swwcommit-commitflag  Flag for controlling commit logic
*   delete_old_container = SPACE  " swwcommit-deleteflag
*   merge_old_container = 'X'   " swwcommit-mergeflag
*   wi_container_handle =       " if_swf_cnt_container  Container - Implementation of a 'Collection'
  IMPORTING
    exception =                 " cx_swf_cnt_container
* TABLES
*   wi_container =              " swcont        Work item container
* CHANGING
*   wi_header =                 " swwwihead     Header Table for all Work Item Types
    .  "  SWW_WI_CONTAINER_MODIFY

ABAP code example for Function Module SWW_WI_CONTAINER_MODIFY





The ABAP code below is a full code listing to execute function module SWW_WI_CONTAINER_MODIFY 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_exception  TYPE CX_SWF_CNT_CONTAINER ,
it_wi_container  TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM
wa_wi_container  LIKE LINE OF it_wi_container .

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

SELECT single WI_ID
FROM SWWWIHEAD
INTO @DATA(ld_wi_id).


DATA(ld_do_commit) = some text here

DATA(ld_delete_old_container) = some text here

DATA(ld_merge_old_container) = some text here
DATA(ld_wi_container_handle) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_wi_container to it_wi_container. . CALL FUNCTION 'SWW_WI_CONTAINER_MODIFY' EXPORTING wi_id = ld_wi_id * do_commit = ld_do_commit * delete_old_container = ld_delete_old_container * merge_old_container = ld_merge_old_container * wi_container_handle = ld_wi_container_handle IMPORTING exception = ld_exception * TABLES * wi_container = it_wi_container * CHANGING * wi_header = ld_wi_header . " SWW_WI_CONTAINER_MODIFY
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_wi_header  TYPE SWWWIHEAD ,
ld_exception  TYPE CX_SWF_CNT_CONTAINER ,
ld_wi_id  TYPE SWWWIHEAD-WI_ID ,
it_wi_container  TYPE STANDARD TABLE OF SWCONT ,
wa_wi_container  LIKE LINE OF it_wi_container,
ld_do_commit  TYPE SWWCOMMIT-COMMITFLAG ,
ld_delete_old_container  TYPE SWWCOMMIT-DELETEFLAG ,
ld_merge_old_container  TYPE SWWCOMMIT-MERGEFLAG ,
ld_wi_container_handle  TYPE IF_SWF_CNT_CONTAINER .

ld_wi_header = 'Check type of data required'.

SELECT single WI_ID
FROM SWWWIHEAD
INTO ld_wi_id.


"populate fields of struture and append to itab
append wa_wi_container to it_wi_container.

ld_do_commit = some text here

ld_delete_old_container = some text here

ld_merge_old_container = some text here
ld_wi_container_handle = '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 SWW_WI_CONTAINER_MODIFY or its description.