cancel
Showing results for 
Search instead for 
Did you mean: 

Select options - add parameter field as checkbox

petr_stribrny
Explorer
0 Kudos

Hi experts,

I use component WDR_SELECT_OPTIONS (and in a loop method ADD_PARAMETER_FIELD with parameter I_AS_CHECKBOX set to true) for to dynamically create a list of table columns. Each line contains describing text and a check box for to allow the user to choose which columns shall be diplayed in the output.

Question: is there a way to set the sequence to display 1.check box and 2.description? By default, an input field (i.e. check box in this case) is displayed on the second place. Since the texts have different length, all the check boxes are placed rightmost on the view, which is an unwanted effect.

Thanks a lot,

Petr Stribrny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

When you are using select option and want to chnage it as a check box then use this method

Add_selection_field. where you need to pass the

I_AS_CHECKBOX = ABAP_TRUE. This will make it as check box try this hope you may find some solution .

CALL METHOD WD_THIS->M_HANDLER->ADD_SELECTION_FIELD

EXPORTING

I_ID = 'Atrribute name for which you want it as check box'

  • I_WITHIN_BLOCK = MC_ID_MAIN_BLOCK

I_DESCRIPTION = Decription'

  • I_IS_AUTO_DESCRIPTION = ABAP_TRUE

IT_RESULT = LT_RANGE_TABLE

I_OBLIGATORY = ABAP_TRUE

  • I_COMPLEX_RESTRICTIONS =

  • I_USE_COMPLEX_RESTRICTION = ABAP_FALSE

I_NO_COMPLEX_RESTRICTIONS = 'X'

I_VALUE_HELP_TYPE = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_APPLDEV

I_VALUE_HELP_ID = 'USE_OVS'

  • I_VALUE_HELP_MODE = 1 "it will diable the f4 functionality

  • I_VALUE_HELP_STRUCTURE =

  • I_VALUE_HELP_STRUCTURE_FIELD =

  • I_HELP_REQUEST_HANDLER =

  • I_LOWER_CASE =

  • I_MEMORY_ID =

I_NO_EXTENSION = ABAP_TRUE

I_NO_INTERVALS = ABAP_TRUE

I_AS_CHECKBOX = ABAP_FALSE " if we want it as select optin as check box make it as true.

  • I_AS_DROPDOWN = ABAP_FALSE

  • IT_VALUE_SET =

  • I_READ_ONLY = ABAP_FALSE

  • I_DONT_CARE_VALUE =

  • I_EXPLANATION =

  • I_TOOLTIP =

.

Good Day!.

Regards,

Sana.

petr_stribrny
Explorer
0 Kudos

Hi Sana,

Thanks for your answer. Actually, I'm doing what do you recommended. My problem is, the check boxes are displayed rightmost on the page and it is difficult to see the assignment btw. text and the check box in case the text is very short.

It would be nice to have check box displayed left from the text...

Best regards,

Petr

Answers (1)

Answers (1)

petr_stribrny
Explorer
0 Kudos

problem solved a different way

prathamesh_gandhi
Participant
0 Kudos

Hi,

I have designed the Check box using select option as you did, but here i want to set the default value for it as CHECKED,(IT_RESULT) as it is of type DATA i am not able to do it. Can anyone help me here .

Thanks In Advance,

P$G.