Variable Substitution in Texts and Messages

Variable substitution into standard texts is available in all three e-mail scenarios (offline e-mail, notification e-mail and reminder e-mail).

Three types of variable can be substituted:  FLM fields, System fields and Form fields.

FLM fields

From FLM 2.4, the following fields are available:

&SYST-DATUM&                    Formatted date field

&SYST-UZEIT&                       Formatted time field

&FORMNAME&                      Description of form type from configuration

&MESSAGE&                           For FPE alerts this carries details of the particular error encountered

and for Notifications and Reminders only:

&URL&                                     Direct URL link to the new FLM Portal application for 'change' activity

&URL_DISPLAY&                   Direct URL link to the new FLM Portal application for 'display' activity

Note// these links can be enciphered by entering a scrambling code in the FLM Customer Master Record

&PORTAL_URL&                    Direct URL link to the old webdynpro FLM Portal application for 'change' activity (<295sp3 forms only)


FPE Table Fields

Any field name from table /FLM/FPE can be used as a substitution variable from the table /FLM/FPE, for example:

&ID&                        Form ID

&FINITIATOR&    User name of form initiator

&IND01&                Index field


Index and Custom Fields

The indexes defined in /FLM/FINDEX are shared with the /FLM/FPE table and can be accessed in the same way.

&IND01&            Index Field.

Custom fields can be added using FLM Note 0011 and are accessed using the customer field name.



System fields

System fields can be included in each standard text using the menu path: Include->Symbols->System->ABAP System Symbol.

Any field from the table SYST can be included in this way.


Form fields

Any form data can be included in the standard texts, with the restriction that the data field must not be placed within a repeating subform.   For example, fields on the subforms 'root' or 'header' or 'footer' can be included, whereas 'item' fields cannot.

The format required is:

&<field name>&

for example




Messages are used in two main ways.   Firstly to hold the 'Portal Task Instructions' or as the titles to offline e-mails (from 290sp4), secondly to return error messages to the user in the case of failed Validation Routines.  Messages are defined in transaction SE91 in the message class:

/FLM/<your FLM customer Code>,  for example /FLM/ACL.

In either case you can use variable substitution as follows:


Portal Task Instructions or EMail Titles

Place any or all of the following variables inside your message:

&1    &2    &3    &4

each variable will be substituted at runtime with values from the first 4 index fields defined for your form type.

You can define index fields either through IMG configuration:

    /spro/cross-application components/general application functions/FLM/Interactive Forms/Setup Forms/Form Types Configuration/Setup Form Fields for Indexing

or through the indexing userexit:

    /spro/cross-application components/general application functions/FLM/Interactive Forms/Business Logic/Form Userexits/Index


Validity Check Failure Messages

In this case you can specify freely up to 4 values from the form data diredtly inside your Userexit ABAP code as follows:

     ex_msgvar1   =   .....    .

     ex_msgvar2   =   .....    .

     ex_msgvar3   =   .....  .

     ex_msgvar4   = .....    .        

For example to place the value from the form header field 'H_FIRST_NAME' into an error message, write the following code in your userexit:

    DATA: l_data TYPE /flm/xml_tab.

    READ TABLE im_data WITH KEY name = 'H_FIRST_NAME' INTO l_data.

    ex_msgvar1 = l_data-value.

In your message definition in SE91, you must use the placeholders &1, &2, &3 and &4 to position these values in your message.  For example:

    'Invalid first name: &1, please re-enter data and resubmit'.