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 will 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.
Procedure
The Insert Function with Dynamic Text dialog appears.
The Enter function text dialog box appears.
The system display the field in <> (brackets) as follows:
For information about how to create a dynamic text for a menu, see
Changing Function Texts
You can change static function texts to dynamic ones, and vice versa. To change a static text into a dynamic text:
The Function Attributes dialog box appears.
The system display the dynamic text in brackets <>.
Since the field name you specify to store the function name can be up to 132 bytes long (as on the screen), the system can not always display the field in its full length. You can change the field name by double-clicking the function or menu name.