Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display an underline _ in a field text of a dynpro?

As the title says, I would like to display an underline character _ in a dynpro field text. Is it possible? I have tried every possible option in the field text attributes.

Underline!!!

PS: I know P_BUKRS is not the best name, it's just to show the issue.

like image 701
Christian Tapia Avatar asked Mar 15 '23 18:03

Christian Tapia


2 Answers

Instead of text fields use an input field and set it to output only. Then you can set the text during PBO which will show underscores.

DATA: lbl_bukrs(7).

MODULE init.
  lbl_bukrs = 'P_BUKRS'.
ENDMODULE.
like image 139
andrecito Avatar answered Apr 02 '23 13:04

andrecito


Here is a quotation from SAP Help.

If the text consists of several words, they are joined together automatically by underscores, which are replaced by spaces at runtime.

Based on that the answer would be no, it is not possible for a text field to display underscores because they will be replaced by spaces at runtime anyway.

like image 32
Jagger Avatar answered Apr 02 '23 13:04

Jagger