Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Push Button text

ansari_mobbasher
Explorer
0 Kudos
1,027

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.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor
0 Kudos
931

Did you try function like RS_CUA_GET_STATUS_FUNCTIONS ?

7 REPLIES 7

FredericGirod
Active Contributor
0 Kudos
932

Did you try function like RS_CUA_GET_STATUS_FUNCTIONS ?

0 Kudos
931

@frederic Nope I am talking about push button of a screen of a module pool.

0 Kudos
931

Not in a pf-status, so if you could try : DYNPRO_FIELD_GET

0 Kudos
931

frdric.girod This will works . Thanks !!!

0 Kudos
931

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.

0 Kudos
931

(NB: you already said it, the question was about a push button defined in the Layout part of a screen)

ThorstenHoefer
Active Contributor
0 Kudos
931

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