cancel
Showing results for 
Search instead for 
Did you mean: 

Selection screen with Parameter - field name not coming when made mandatory

Former Member
0 Kudos

Hi Experts,

I have added a parameter in my selection screen which has other select options as well.

I used below code in wd_initi to add parameter



    create data LR_LIFNR type LIFNR.

    WD_THIS->M_HANDLER->ADD_PARAMETER_FIELD(
    I_ID         = 'LIFNR'
    I_VALUE      = LR_LIFNR
    I_OBLIGATORY = ABAP_TRUE
    I_READ_ONLY  = L_READ_ONLY ).

I have a submit button in the selection screen, so when ever the value is empty in parameter for LIFNR, system throws an error *Enter selection in Field "" * but error message is unable to take the name of the parameter?

It is expected to give as Enter selection in Field "Vendor"

This throwing of error message is working fine for another select-options for PO which is also mandatory.

What could be the error?

Any clue is highly appreciated.

Regards,

Ajay

Accepted Solutions (0)

Answers (1)

Answers (1)

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

WDDOINIT the code is:

lt_range_table = wd_this->m_handle->create_range_table(

i_typename = 'ZRM_T_CV_END_DATE1' ).

wd_this->m_handle->add_selection_field(

i_id = 'ZRM_T_CV_END_DATE1'

i_description = 'Project End Date (MM.YYYY)'

it_result = lt_range_table

i_read_only = read_only ).

on submit the code is :

rt_prj_end = wd_this->m_handle->get_range_table_of_sel_field(

i_id = 'ZRM_T_CV_END_DATE1' ).

ASSIGN rt_prj_end->* TO <fs_prj_end>.

1.is the data element the same in both the methods u mentioned.i,e on WDDOINIT AND ON ACTION OF SUBMIT.

please check it once.

2.2does the data element LIFNR has field label assosciated with it.(check in domain).

3.check adding description to the field shown as below.

wd_this->m_handle->add_selection_field(

i_id = 'ZRM_T_CV_END_DATE1'

i_description = 'Project End Date (MM.YYYY)'

it_result = lt_range_table

i_read_only = read_only )

Try checking these 3 cases.

Priya

Former Member
0 Kudos

Hi Priya,

Thanks for the inputs.

firstly it was not a select-options, its a parameter.

I am using standard LIFNR attribute only, so should not be a problem with field label.

I tried using description for the parameter as per your point 3, and it worked here.

But i still wonder why didn't it work with out an explicit description? ideally it should have been working as the field label was taken from DDIC, so the error message also should take right ?

Any ways this particular problem is solved. Thanks.

Regards,

Ajay

Former Member
0 Kudos

Hi Priya,

Thanks for the inputs.

firstly it was not a select-options, its a parameter.

I am using standard LIFNR attribute only, so should not be a problem with field label.

I tried using description for the parameter as per your point 3, and it worked here.

But i still wonder why didn't it work with out an explicit description? ideally it should have been working as the field label was taken from DDIC, so the error message also should take right ?

Any ways this particular problem is solved. Thanks.

Regards,

Ajay