SWD_WF_DEFINITION_READ 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 SWD_WF_DEFINITION_READ into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWDE
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SWD_WF_DEFINITION_READ' "
EXPORTING
task = " swd_ahead-task
wfdkey = " swd_wfdkey Structure with key fields
IMPORTING
header = " swd_shead Workflow definition: Basic data (runtime+definition)
properties = " swdtspropts Runtime Table: Attributes
local_events = " swdtslevnts
* TABLES
* steps = " swd_ssteps
* nodes = " swd_snodes
* lines = " swd_slines
* bindings = " swd_sbind Binding definitions
* conditions = " swd_condef
* methods = " swd_smetho Workflow definition: Secondary methods (runtime+definition)
* events = " swd_sevnts Workflow Definition: Include Structure for Nodes (Runtime)
* functions = " swd_sfuncs
EXCEPTIONS
DEFINITION_NOT_FOUND = 1 " No workflow def. available for reference date
. " SWD_WF_DEFINITION_READ
The ABAP code below is a full code listing to execute function module SWD_WF_DEFINITION_READ 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).
| ld_header | TYPE SWD_SHEAD , |
| ld_properties | TYPE SWDTSPROPTS , |
| ld_local_events | TYPE SWDTSLEVNTS , |
| it_steps | TYPE STANDARD TABLE OF SWD_SSTEPS,"TABLES PARAM |
| wa_steps | LIKE LINE OF it_steps , |
| it_nodes | TYPE STANDARD TABLE OF SWD_SNODES,"TABLES PARAM |
| wa_nodes | LIKE LINE OF it_nodes , |
| it_lines | TYPE STANDARD TABLE OF SWD_SLINES,"TABLES PARAM |
| wa_lines | LIKE LINE OF it_lines , |
| it_bindings | TYPE STANDARD TABLE OF SWD_SBIND,"TABLES PARAM |
| wa_bindings | LIKE LINE OF it_bindings , |
| it_conditions | TYPE STANDARD TABLE OF SWD_CONDEF,"TABLES PARAM |
| wa_conditions | LIKE LINE OF it_conditions , |
| it_methods | TYPE STANDARD TABLE OF SWD_SMETHO,"TABLES PARAM |
| wa_methods | LIKE LINE OF it_methods , |
| it_events | TYPE STANDARD TABLE OF SWD_SEVNTS,"TABLES PARAM |
| wa_events | LIKE LINE OF it_events , |
| it_functions | TYPE STANDARD TABLE OF SWD_SFUNCS,"TABLES PARAM |
| wa_functions | LIKE LINE OF it_functions . |
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_header | TYPE SWD_SHEAD , |
| ld_task | TYPE SWD_AHEAD-TASK , |
| it_steps | TYPE STANDARD TABLE OF SWD_SSTEPS , |
| wa_steps | LIKE LINE OF it_steps, |
| ld_properties | TYPE SWDTSPROPTS , |
| ld_wfdkey | TYPE SWD_WFDKEY , |
| it_nodes | TYPE STANDARD TABLE OF SWD_SNODES , |
| wa_nodes | LIKE LINE OF it_nodes, |
| ld_local_events | TYPE SWDTSLEVNTS , |
| it_lines | TYPE STANDARD TABLE OF SWD_SLINES , |
| wa_lines | LIKE LINE OF it_lines, |
| it_bindings | TYPE STANDARD TABLE OF SWD_SBIND , |
| wa_bindings | LIKE LINE OF it_bindings, |
| it_conditions | TYPE STANDARD TABLE OF SWD_CONDEF , |
| wa_conditions | LIKE LINE OF it_conditions, |
| it_methods | TYPE STANDARD TABLE OF SWD_SMETHO , |
| wa_methods | LIKE LINE OF it_methods, |
| it_events | TYPE STANDARD TABLE OF SWD_SEVNTS , |
| wa_events | LIKE LINE OF it_events, |
| it_functions | TYPE STANDARD TABLE OF SWD_SFUNCS , |
| wa_functions | LIKE LINE OF it_functions. |
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 SWD_WF_DEFINITION_READ or its description.