Skip to Content
0
Former Member
Jan 15, 2012 at 11:25 AM

Select Options starting values

48 Views

Hi all,

I'm having a problem setting some default values in my select-options component.

This is the code I'm using to set the value.

  DATA lo_m_handler TYPE REF TO if_wd_select_options.
  DATA ltr_parnr    TYPE REF TO data.
  DATA ls_parnr     LIKE LINE OF lr_parnr.

  FIELD-SYMBOLS: <fs_rangetable>  TYPE STANDARD TABLE.

  ltr_parnr = lo_m_handler->create_range_table( i_typename = 'PARNR' ).

  ASSIGN ltr_parnr->* TO <fs_rangetable>.
  ls_parnr-sign = 'I'.
  ls_parnr-option = 'EQ'.
  ls_parnr-low = lv_user.
  ls_parnr-high = ''.
  APPEND ls_parnr TO <fs_rangetable>.
  lo_m_handler->set_range_table_of_sel_field( i_id = 'PARNR' it_range_table = ltr_parnr ).
 

I've another field on the same select-options which has a search-help attached to it.

Whenever I click on the search help (of the other field) I get the following error:

"line types of an internal table and a work area not compatible"

OBJECTS_WA_NOT_COMPATIBLE

If I remark the code above everything is working again.

Any help would be appreciated,

Aviad