‎2006 Nov 02 5:06 AM
The User wants to change column heading dynamically.
A checkbox is created in the selection screen, user wants to change the text of check box in the screen and it is displayed as column heading in thelist.
Can you please help here?.........................
Thanks
‎2006 Nov 02 5:12 AM
You can do it at selection screen
at selection-screen output
loop at screen.
*Find the text field for the checkbox in debugging.
if screen-name = <check box text field>
screen-name = <your text>.
modify screen.
endif.
endloop.
‎2006 Nov 02 6:00 AM
Hi Alekhya,
Try with this...
1. Define the checkbox and comment in the same line in
the screen.
2. Make the checkbox text (selection text) as blank.
3. Asssign an 8 character long field to the comment.
for Eg: SELECTION-SCREEN COMMENT 3(55) text1234.
4. In the INITIALIZATION event assign text to that
variable.
5. In the AT selection-screen event u can change the
contents of that variable . which will result in the
dynamic change in the checkbox text.
For futher info. Please check the SAP help below...
<b>SELECTION-SCREEN - Defining Titles and Texts on Selection Screens</b>
You can define texts for various text objects: ( comments, pushbuttons, ...)
There are two ways to do this:
<b>1. Static definition:</b> You enter the text in the form TEXT-xxx with a three-character identifier xxx as a text symbol.
The contents of the text symbol TEXT-xxx appears on the selection screen and cannot be changed dynamically.
<b>2.Dynamic definition:</b> You enter a field name of up to eight characters ex. abcdefgh.
In this case, the system creates a field with the name abcdefgh . Its contents then appear on the selection screen at runtime. You must set these texts at runtime (in the INITIALIZATION part of a report, or in the INIT routine of the logical database program SAPDBldb. You can also change them while the selection screen is being processed.
Notes
The field abcdefgh is generated automatically. You do not have to declare it using the DATA statement.
You can define texts in any of the following:
- SELECTION-SCREEN BEGIN OF SCREEN
- SELECTION-SCREEN BEGIN OF BLOCK
- SELECTION-SCREEN COMMENT
- SELECTION-SCREEN PUSHBUTTON
Example
TABLES SAPLANE.
SELECTION-SCREEN BEGIN OF BLOCK CHARLY
WITH FRAME TITLE TEXT-001.
PARAMETERS PARM(5).
SELECTION-SCREEN COMMENT /5(20) COMM1234.
SELECT-OPTIONS SEL FOR SAPLANE-PLANETYPE.
SELECTION-SCREEN END OF BLOCK CHARLY.
...
INITIALIZATION.
MOVE 'Test dynamic text' TO COMM1234.
( TEXT-001 has the contents 'Block Charly').
Selection screen:
Block Charly--
| PARM _____ |
| Test dynamic text |
| SEL ________ to ________ |
-
Regards,
Santhosh