04-12-2006 12:07 PM
Can you please help me to set the selection texts dynamically in a report ?
04-12-2006 12:11 PM
Hello,
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(10) AAA FOR FIELD P1.
PARAMETERS: P1 LIKE SAPLANE-PLANETYPE, P2(5), P3(1).
SELECTION-SCREEN END OF LINE.
Initilization.
AAA = 'Selection'.
regards,
Naimesh
04-12-2006 12:14 PM
04-12-2006 12:23 PM
Hello,
Try...
INSERT TEXTPOOL PROGRAM FROM TAB LANGUAGE SY-LANGU.
Regards,
Naimesh
04-12-2006 12:20 PM
Hi sabyasachi,
1. simple.
2. suppose your field name is MYFIELD,
then the label/text can be changed/accessed
like this.
%_<b>MYFIELD</b>_%_APP_%-TEXT
3. just copy paste this small program.
Enter any thing in the text box,
and it will dynanmially change the text.
4.
*----
*
*
*
*
*
*
*
*
*----
REPORT ZTRN_SCREEN_ELEMENTS.
*----
Block
selection-screen begin of block b1 with frame title text-001.
parameters : myfield(25) type c default 'Type and press Enter'.
selection-screen end of block b1.
*----
at selection-screen output.
%_MYFIELD_%_APP_%-TEXT = myfield.
regards,
amit m.
04-12-2006 1:05 PM
<b>Dynamic Dictionary Reference</b>
If you want the data type of a parameter to refer dynamically to a data type from the ABAP Dictionary, use the following syntax:
PARAMETERS <p> LIKE (<name>) ...
At the time the selection screen is called, field <name> must contain the name from a data type of the ABAP Dictionary. Currently, parameters can only refer to fields of database tables, views and structures. The parameter dynamically adopts the attributes of the Dictionary type, that is, technical properties and help texts. If you do not create a selection text for the parameter in the program, the field label from the Dictionary appears as the description on the selection screen. Otherwise, the selection text is displayed.
The contents of field <name> are taken from the program in which the selection screen is defined. If the selection screen is defined in the selection part of a logical database, then field <name> of the associated database program is used.
REPORT DEMO.
DATA NAME(20) TYPE C.
SELECTION-SCREEN BEGIN OF SCREEN 500.
PARAMETERS P_CARR LIKE (NAME).
SELECTION-SCREEN END OF SCREEN 500.
NAME = 'SPFLI-CARRID'.
CALL SELECTION-SCREEN 500.
regards
vinod