SWA_EXPR_EVALUATE_TEST 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 SWA_EXPR_EVALUATE_TEST into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
SWA30
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'SWA_EXPR_EVALUATE_TEST' "
* EXPORTING
* expression_string = SPACE " string
* expression = SPACE " swaexpdef-expr Expression in binding of SAP Business Workflow
* loopindex = 0 " swcont-tab_index Loop index to table element of container
* inttype_of_constant = " dfies-inttype Internal data type of a constant expression
* intleng_of_constant = " dfies-leng Internal length of a constant expression
* refstruct_of_expression = " dfies-tabname
* do_not_free_bor_objects = SPACE " xfeld
IMPORTING
ref_to_value = " data
value_string = " string
value = " Value of expression
value_converted = " Value of expression (formatted for output, left-aligned)
elemtype = " swcont-type Internal data type of expression value
elemlength = " Length of expression value
elemdecimals = " dfies-decimals Number of Decimal Places
expression_is_objectreference = " Expression is an object reference
objecttype = " swotobjid-objtype Object type of object reference
objectkey = " swotobjid-objkey Type-specific key of object reference
expression_is_table = " Indicator: Expression is multiline
expressionelement_is_nil = " Element expression refers to is NIL
expression_is_initial = " Expression value is initial
worst_messagetype = " swaexerror-msgty Most serious message type (A->E->W->I)
errorcount = " swaexpedit-errorcount Error count
TABLES
cont = " swcont Container Instance
* exerror = " swaexerror Messages
* value_tab = "
* value_tab_converted = "
* elem_refstruct_nametab = " swarefnmtb
. " SWA_EXPR_EVALUATE_TEST
The ABAP code below is a full code listing to execute function module SWA_EXPR_EVALUATE_TEST 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_ref_to_value | TYPE DATA , |
| ld_value_string | TYPE STRING , |
| ld_value | TYPE STRING , |
| ld_value_converted | TYPE STRING , |
| ld_elemtype | TYPE SWCONT-TYPE , |
| ld_elemlength | TYPE STRING , |
| ld_elemdecimals | TYPE DFIES-DECIMALS , |
| ld_expression_is_objectreference | TYPE STRING , |
| ld_objecttype | TYPE SWOTOBJID-OBJTYPE , |
| ld_objectkey | TYPE SWOTOBJID-OBJKEY , |
| ld_expression_is_table | TYPE STRING , |
| ld_expressionelement_is_nil | TYPE STRING , |
| ld_expression_is_initial | TYPE STRING , |
| ld_worst_messagetype | TYPE SWAEXERROR-MSGTY , |
| ld_errorcount | TYPE SWAEXPEDIT-ERRORCOUNT , |
| it_cont | TYPE STANDARD TABLE OF SWCONT,"TABLES PARAM |
| wa_cont | LIKE LINE OF it_cont , |
| it_exerror | TYPE STANDARD TABLE OF SWAEXERROR,"TABLES PARAM |
| wa_exerror | LIKE LINE OF it_exerror , |
| it_value_tab | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_value_tab | LIKE LINE OF it_value_tab , |
| it_value_tab_converted | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_value_tab_converted | LIKE LINE OF it_value_tab_converted , |
| it_elem_refstruct_nametab | TYPE STANDARD TABLE OF SWAREFNMTB,"TABLES PARAM |
| wa_elem_refstruct_nametab | LIKE LINE OF it_elem_refstruct_nametab . |
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_ref_to_value | TYPE DATA , |
| it_cont | TYPE STANDARD TABLE OF SWCONT , |
| wa_cont | LIKE LINE OF it_cont, |
| ld_expression_string | TYPE STRING , |
| ld_expression | TYPE SWAEXPDEF-EXPR , |
| it_exerror | TYPE STANDARD TABLE OF SWAEXERROR , |
| wa_exerror | LIKE LINE OF it_exerror, |
| ld_value_string | TYPE STRING , |
| it_value_tab | TYPE STANDARD TABLE OF STRING , |
| wa_value_tab | LIKE LINE OF it_value_tab, |
| ld_value | TYPE STRING , |
| ld_loopindex | TYPE SWCONT-TAB_INDEX , |
| it_value_tab_converted | TYPE STANDARD TABLE OF STRING , |
| wa_value_tab_converted | LIKE LINE OF it_value_tab_converted, |
| ld_value_converted | TYPE STRING , |
| ld_inttype_of_constant | TYPE DFIES-INTTYPE , |
| ld_elemtype | TYPE SWCONT-TYPE , |
| it_elem_refstruct_nametab | TYPE STANDARD TABLE OF SWAREFNMTB , |
| wa_elem_refstruct_nametab | LIKE LINE OF it_elem_refstruct_nametab, |
| ld_intleng_of_constant | TYPE DFIES-LENG , |
| ld_elemlength | TYPE STRING , |
| ld_refstruct_of_expression | TYPE DFIES-TABNAME , |
| ld_elemdecimals | TYPE DFIES-DECIMALS , |
| ld_do_not_free_bor_objects | TYPE XFELD , |
| ld_expression_is_objectreference | TYPE STRING , |
| ld_objecttype | TYPE SWOTOBJID-OBJTYPE , |
| ld_objectkey | TYPE SWOTOBJID-OBJKEY , |
| ld_expression_is_table | TYPE STRING , |
| ld_expressionelement_is_nil | TYPE STRING , |
| ld_expression_is_initial | TYPE STRING , |
| ld_worst_messagetype | TYPE SWAEXERROR-MSGTY , |
| ld_errorcount | TYPE SWAEXPEDIT-ERRORCOUNT . |
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 SWA_EXPR_EVALUATE_TEST or its description.