If you want a menu entry or a function to have a variable text at runtime, you can define dynamic texts. To do this, you must define a field in your ABAP program that should contain the required text at runtime.
When you define the text, use the structure SMP_DYNTEXT.
For example:
DATA: TEXT_1 LIKE SMP_DYNTXT,
TEXT_2 LIKE SMP_DYNTXT.
The Insert Function with Dynamic Function Text dialog box appears.
The Enter function textdialog box appears.
The system displays the field in <> (brackets).
For information about how to create a dynamic text for a menu, see Defining dynamic menu texts
You can also change static function text to dynamic ones, and vice versa. For more information, see Changing Function Texts.