cancel
Showing results for 
Search instead for 
Did you mean: 

Selct-option

ananth_anni
Participant
0 Kudos

hi all,

TYPES:

ty_r_date TYPE RANGE OF s_date,

ty_s_date TYPE LINE OF ty_r_date.

  • Reference variable used instantiate the select-options component

DATA

lr_cmp_usage TYPE REF TO if_wd_component_usage.

  • Variables used to create the select-options fields and

  • define its initial values

DATA:

lr_field TYPE REF TO data,

ls_date TYPE ty_s_date.

FIELD-SYMBOLS:

<fs_field> TYPE ANY,

<fs_range> TYPE INDEX TABLE.

  • Instantiate the select-options component

lr_cmp_usage = wd_this->wd_cpuse_selectoption( ).

IF lr_cmp_usage->has_active_component( ) IS INITIAL.

lr_cmp_usage->create_component( ).

ENDIF.

  • Sets the helper reference

wd_this->m_sel_opt = wd_this->wd_cpifc_selectoption( ).

wd_this->m_helper = wd_this->m_sel_opt->init_selection_screen( ).

  • Hide the standard select-options components.

wd_this->m_helper->set_global_options(

i_display_btn_cancel = abap_false

i_display_btn_check = abap_false

i_display_btn_reset = abap_false ).

  • Adding a block (type Tray) to the select-options

wd_this->m_helper->add_block(

i_id = `BL01`

i_block_type = if_wd_select_options=>mc_block_type_tray

i_title = `Flight Booking` ).

  • Adding a parameter field to the created block

  • Create a reference to the type of airline code

CREATE DATA lr_field TYPE s_carr_id.

  • Sets the airline code initial value

ASSIGN lr_field->* TO <fs_field>.

<fs_field> = 'AA '.

  • Add the parameter to the group

*wd_this->m_helper->add_parameter_field( Here iam getting error add_parameter is not protected what to do*

i_id = `CARRID`

i_within_block = `BL01`

i_value = lr_field ).

FREE lr_field.

UNASSIGN <fs_field>.

  • Adding a select-options field to the created block

  • Create a reference to the connection number range table

lr_field = wd_this->m_helper->create_range_table( `S_CONN_ID` ).

  • Add the select-option to the group

wd_this->m_helper->add_selection_field(

i_id = `CONNID`

i_within_block = `BL01`

it_result = lr_field ).

FREE lr_field.

  • Adding a select-options field to the created block

  • Create a reference to the flight date range table

lr_field = wd_this->m_helper->create_range_table( `S_DATE` ).

ASSIGN lr_field->* TO <fs_range>.

ls_date-sign = 'I'.

ls_date-option = 'EQ'.

ls_date-low = sy-datum - 7.

ls_date-high = sy-datum.

APPEND ls_date TO <fs_range>.

  • Add the select-option to the group

wd_this->m_helper->add_selection_field(

i_id = `FLDATE`

i_within_block = `BL01`

it_result = lr_field ).

here im using the select-option. the context node is t_sbook and the attributes are carrid connid , fldate...

*Adding a parameter field to the created block * Create a reference to the type of airline code CREATE DATA lr_field TYPE s_carr_id. * Sets the airline code initial value ASSIGN lr_field->* TO . = 'AA '. * Add the parameter to the group *wd_this->m_helper->add_parameter_field( Here iam getting error add_parameter is not protected what to do* i_id = `CARRID` i_within_block = `BL01` i_value = lr_field ). FREE lr_field. UNASSIGN . * Adding a select-*

Edited by: ananth.anni on Jan 8, 2010 10:27 AM

Edited by: ananth.anni on Jan 8, 2010 10:31 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

ananth_anni
Participant
0 Kudos

an

ananth_anni
Participant
0 Kudos

**Adding a parameter field to the created block * Create a reference to the type of airline code CREATE DATA lr_field TYPE s_carr_id. * Sets the airline code initial value ASSIGN lr_field->* TO . = 'AA '. * Add the parameter to the group *wd_this->m_helper->add_parameter_field( Here iam getting error add_parameter is not protected what to do* i_id = `CARRID` i_within_block = `BL01` i_value = lr_field ). FREE lr_field. UNASSIGN . * Adding a select-* Edited by: ananth.anni on Jan 8, 2010 10:27 AM Edited by: ananth.anni on Jan 8, 2010 10:31 AM*

here the error im getting add_parameter field is not protected . EHAT TO DOOOOOOOOOo