Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to edit Select-option text?

Former Member
0 Likes
6,438

All,

I have a requirement to change 'to' word in select option.

Generally, it displays as...

Material : _________ to _________

Can we change the word 'to'?

Thanks,

RH

1 ACCEPTED SOLUTION
Read only

faisalatsap
Active Contributor
0 Likes
2,369

Hi, Ronny

Please test the following Sample Code hope this is what you required.

SELECT-OPTIONS sodate FOR sy-datum.

AT SELECTION-SCREEN OUTPUT.
  %_sodate_%_app_%-to_text = 'XYZ'." Here I have Replaced to with XYZ

Please reply if any Issue,

Thanks and Regards,

Faisal

3 REPLIES 3
Read only

Former Member
0 Likes
2,369

Hi Ronny Hanks,

As far as my knowledge, you cannot achieve that directly. Rather you can declare 2 parameters as Low & high and using Selection-Screen Comment you can chive what client wants. For example :



SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (15) TEXT-003.

SELECTION-SCREEN POSITION 33.

PARAMETERS : P_PERIOL(2) TYPE N OBLIGATORY.

SELECTION-SCREEN COMMENT 52(6) TEXT-004.

SELECTION-SCREEN POSITION 58.

PARAMETERS : P_PERIOH(2) TYPE N OBLIGATORY.

SELECTION-SCREEN END OF LINE.
"Here you can write TEXT-004 as required

Thanks & Regards,

Rock.

Read only

faisalatsap
Active Contributor
0 Likes
2,370

Hi, Ronny

Please test the following Sample Code hope this is what you required.

SELECT-OPTIONS sodate FOR sy-datum.

AT SELECTION-SCREEN OUTPUT.
  %_sodate_%_app_%-to_text = 'XYZ'." Here I have Replaced to with XYZ

Please reply if any Issue,

Thanks and Regards,

Faisal

Read only

Former Member
0 Likes
2,369

Hi Altaf,

your answer is good but it fails as soon as i reactive the screen so it won't work.

Hi Ronny,

The solution for your requirement is difficult.

but you can try the below code

Selection Text

S_MATNR1 _

S_MATNR2 _

________ ______________________________

Text symbol

003 HI

004 BYE

Program code

SELECTION-SCREEN : BEGIN OF BLOCK B1 with frame.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT (15) TEXT-003.

SELECT-OPTIONS: s_matnr1 FOR mara-matnr NO INTERVALS .

SELECTION-SCREEN COMMENT 52(6) TEXT-004.

SELECTION-SCREEN POSITION 58.

SELECT-OPTIONS: s_matnr2 FOR mara-matnr NO INTERVALS .

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN : END OF BLOCK B1.

then create a range i.e R_matnr

and then pass the value of s_matnr1 and s_matnr into it