on ‎2005 Nov 23 9:49 AM
hi,
Situation:
I have a 2 Buttons on a dynpro, which are labelled <i>start</i> and <i>stop</i>.
Aim:
The aim is to have only one button, which changes the label when pushed.
Question:
is there a way to change the text on a button (on a dynpro) dynamically? (I don't talk about GUI-Status Buttons).
Regards,
Matthias
Request clarification before answering.
Hi,
Declare a global variable in TOP include as gv_pb_text(20). And then have one push button in the screen with name gv_pb_text and then mark it as Output only.
In your PBO, fill gv_pb_text based on your conditions,
IF gv_button_clicked EQ 'X'.
gv_pb_text = 'Start'(001).
ELSE.
gv_pb_text = 'Stop'(002).
ENDIF.
In your USER_COMMAND Module in PAI (or whatever your Fcode handling module is),
WHEN 'STARTSTOP'. "Assuming this pb's function code
IF gv_button_clicked EQ 'X'.
CLEAR gv_button_clicked.
ELSE.
gv_button_clicked = 'X'.
ENDIF.
Hope this helps..
Sri
Message was edited by: Srikanth Pinnamaneni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.