2023 Oct 13 8:00 AM
Hi Everyone,
How to get the text of a push button in a module pool?
For e.g : we can get the function code of a button in sy-ucomm variable, but I need text of that button .
Kindly suggest.
2023 Oct 13 8:16 AM
2023 Oct 13 8:16 AM
2023 Oct 13 8:24 AM
@frederic Nope I am talking about push button of a screen of a module pool.
2023 Oct 13 8:27 AM
2023 Oct 13 9:58 AM
2023 Oct 13 10:44 AM
Function module DYNPRO_FIELD_GET is not a released API. It works internally based on ABAP statement "IMPORT DYNPRO". Recommendation: don't call the function module, just define the text in your program as a text symbol.
2023 Oct 13 10:46 AM
(NB: you already said it, the question was about a push button defined in the Layout part of a screen)
2023 Oct 13 8:32 AM
Hi,
try to use the field "output":
Pushbuttons on the Screen (sap.com)
Pushbuttons have a label - the text that you specify statically in the attributes - and can also have icons. If you set the Output field attribute for a pushbutton, you can also set its text dynamically in the ABAP program. To do this, you must create a field in the ABAP program with the same name as the pushbutton