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.
Mattias,
It can be done!!!!
I am assuming u have screen 100.
Intially the text will be 'START' in the button and when u press that button, It should change to STOP???
Idea:
1. Create only ONE Button in the Screen 100.
2. Name the button as BUTTONNAME and assign a FCODe
as 'PRES'.
3. In the main program, have
data: buttonName(20).
4. Have a FLag
data: clicked type c value 'N'.
5. In the PBO.
If clicked eq 'N'.
buttonName = 'START'.
else.
buttonName = 'STOP'.
endif.
6. In the PAI.
case okCode.
when 'PRES'.
clicked = 'Y'.
.............
when others.
leave program.
endcase.
This could help and it is not a good programming practice. Instead , have a Second Screen 200(just a copy of Screen 100). When u press START in screen 100, get the okCode and call Screen 200(having STOP Button). When the User press STOP in Screen 200, u could Stop the transaction or leave the program.
Thanks
Kam
Note: Allot points for all worthful postings
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.