cancel
Showing results for 
Search instead for 
Did you mean: 

ErrOR

ananth_anni
Participant
0 Kudos

i all .

***Method "ADD_PARAMETER_FIELD" is unknown or PROTECTED or PRIVATE. * **

iam getting this error for the below program.

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(

i_id = `CARRID`

i_within_block = `BL01`

it_result = 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 ).

Accepted Solutions (0)

Answers (3)

Answers (3)

ananth_anni
Participant
0 Kudos

answered

arjun_thakur
Active Contributor
0 Kudos

I hope you have declared 'm_helper' in the attributes tab.

m_helper RefTo IF_WD_SELECT_OPTIONS.

Regards

Arjun

arjun_thakur
Active Contributor
0 Kudos

Hi,

You have used the following code:

wd_this->m_helper->add_parameter_field( i_id = `CARRID` i_within_block = `BL01` it_result = lr_field ).

add_parameter_field method doesn't have the parameter named 'it_result'.

Regards

Arjun

ananth_anni
Participant
0 Kudos

hi ,

ya im changed the i_result in to i_value ( the i_value is crt i thing for the parameters ).than error was

*Method "ADD_PARAMETER_FIELD" is unknown or PROTECTED or PRIVATE. *