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!
There is a simple way to do this:
1. Add a button with the screen painter and name it perhaps "HARRY".
2. In the properties set the button to "Output"
3. Create a variable in TOP or somewhere else which is also named "HARRY" perhaps by "DATA: HARRY(16) TYPE C."
4. Change HARRY to contain something by "HARRY = 'harry'." in the PAI.
Here is the sample coding
REPORT z_dietzha_test_000000000000085.
DATA: testbutton TYPE c, okcode TYPE syucomm.
CALL SCREEN 0100.
INCLUDE z_dietzha_test_00000000000085i.
***INCLUDE Z_DIETZHA_TEST_00000000000085I .
MODULE user_command_0100 INPUT.
IF sy-ucomm = 'EXIT'. LEAVE TO SCREEN 0. ENDIF.
IF testbutton = '1'. testbutton = '2'. ELSE. testbutton = '1'. ENDIF.
ENDMODULE.
And in the screen 0100 the TESTBUTTON has the field "Output" checked in the "General attr." tab.
Regards
Harry
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.