Show TOC Start of Content Area

Procedure documentation Defining Dynamic Function Texts  Locate the document in its SAP Library structure

Use

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.

Procedure

...

       1.      Open the relevant GUI status in the Menu Painter.

       2.      Place the cursor on an empty function line.

       3.      Choose Edit ® Insert ® Function with dyn. text.

The Insert Function with Dynamic Function Text dialog box appears.

       4.      Enter a function code and choose This graphic is explained in the accompanying text with the quick info text Continue.

The Enter function text dialog box appears.

       5.      Enter a program or ABAP Dictionary field name using the input help for the Field name field.

       6.      Select the appropriate radio button (Table field or Program field).

       7.      Select one of the possible entries and choose This graphic is explained in the accompanying text Accept.

The system displays the field in <> (brackets).

Note

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.

 

 

End of Content Area