cancel
Showing results for 
Search instead for 
Did you mean: 

Need a Text Description field next to the Select-Option Parameter

former_member197475
Active Contributor
0 Kudos

Hi Experts,

Am working in SELECT_OPTION component, where I have added a parameter by method add_parameter_field( ).

Now I need a text field next to the input field. Is it possible???

For Eg: I have added a Paremeter Field say Country, which I will be defaulted to US. Now I need a text field next to the field as United States. Can it be done???

BR,

RAM.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

I don't think you can add Text field Next to the Select options parameter. You can try this work around mentioned in this thread:   ( As mentioned in this discussion, instead of matrix layout, you may use Grid Layout)

hope this helps,

Regards,

Kiran

former_member197475
Active Contributor
0 Kudos

Hi Kiran,

Thanks for your idea. I tried for it, but not so good

So I have created an Input field and it's text view and seperated the select_option parameters using a horizontal gutter.

BR,

RAM.

ramakrishnappa
Active Contributor
0 Kudos

Hi RAM,

I too had same requirement few years back, with text view elements beside it, some how achieved it. But its not 100% in line when coming to alignment.

Yes, controlling alignment of select options input field and respective description beside it, is a tricky job.

The gap between select options input fields & gap between text view elements on other side is not the same.

Regards,

Rama

former_member197475
Active Contributor
0 Kudos

Hi Rama,

Yes, this alignment is litttle bit a weird. Any ways, we are just playing around with lot of UI elements which helps at most of the time

BR,

RAM.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

Assuming your parameter is p_land try to manipulate the screen with something like this:

selection-screen begin of block tst.

parameters p_land type t001-land1.

selection-screen begin of line.

selection-screen position 33.

selection-screen comment (25) text-t01 for field p_land.

selection-screen end of line.

selection-screen end of block tst.

************************************************************************

* AT SELECTION-SCREEN OUTPUT

************************************************************************

at selection-screen output .

  loop at screen.

    if screen-name = 'P_LAND'.

      case p_land.

        when 'US'.

          %ft01004_1000 = 'United States'.

        when 'PT'.

          %ft01004_1000 = 'Portugal'.

        when others.

          %ft01004_1000 = 'Other Country'.

      endcase.

    endif.

  endloop.

For the calculation of the country name you should have a static method get_country_name( ) with county key has importing parameter and country description has reurning parameter.

Hope it helps

KR

Sérgio

eozkan
Explorer
0 Kudos

Seems like you are trying to modify WDR_SELECT_OPTIONS component.

Only possible way to me is to use a text line (add_text_line) on the following row, or try to use both within a block. First add a block using add_block() .

Alternatively you can use a Drop Down List box using IT_VALUE_SET parameter of the ADD_PARAMETER_FIELD. This will display the selected value with its text. For fields such as Country field it is the best way to follow..