2009 Aug 24 5:12 AM
hi,
I have a few entries and a blank entry at the end of the listbox. The blank entry comes as a default. But when I choose the blank entry and save the record. Then in the display another entry with '0' is added to the listbox option to choose from.
Please advise why it is adding the '0' entry for the blank selection and how to remove it.
Thanks,
FS
2009 Aug 24 5:33 AM
Hi,
After capturing the value pass the value into temporary variable which is of char type.
Here is a sample code:
Layout code:
<htmlb:dropdownListBox id="estatus">
<htmlb:listBoxItem key = "select"
value = "Select" />
<htmlb:listBoxItem key = "Active"
value = "Active" />
<htmlb:listBoxItem key = "Inactive"
value = "Inactive" />
<htmlb:listBoxItem key = " "
value = " " />
</htmlb:dropdownListBox>
<htmlb:button id = "clear"
tooltip = "Save the entries"
text = "Save"
width = "35%"
on Click = "OnI nputP rocessing()" />OnInputProcessing Code:
data:
w_event TYPE REF TO cl_htmlb_event,
w_object TYPE REF TO object,
w_eventid TYPE string,
w_obj TYPE REF TO object,
w_listbox TYPE REF TO cl_htmlb_dropdownlistbox.
CALL METHOD cl_htmlb_manager=>get_event
EXPORTING
request = runtime->server->request
RECEIVING
event = w_event.
w_eventid = w_event->id.
CASE w_eventid.
WHEN 'clear'.
CALL METHOD cl_htmlb_manager=>get_data
EXPORTING
request = runtime->server->request
name = 'dropdownListBox'
id = 'estatus'
RECEIVING
data = w_obj.
w_listbox ?= w_obj.
w_empvalue = w_listbox->selection.
w_value = w_empstatus.(W_value is a type of char)
endcase.Hope this helps you,Let me know if any queries.
Regards,
Rajani
hi,
I have a few entries and a blank entry at the end of the listbox. The blank entry comes as a default. But when I choose the blank entry and save the record. Then in the display another entry with '0' is added to the listbox option to choose from.
Please advise why it is adding the '0' entry for the blank selection and how to remove it.
Thanks,
FS
2009 Aug 24 5:14 AM
Make sure the field for which this list box has been created is of character type and not numeric
2009 Aug 24 5:25 AM
Thanks for the hint. Actually it is CHAR type but still the value is getting added. Maybe check table is causing the issue. Please advise.
2009 Aug 24 5:33 AM
Hi,
After capturing the value pass the value into temporary variable which is of char type.
Here is a sample code:
Layout code:
<htmlb:dropdownListBox id="estatus">
<htmlb:listBoxItem key = "select"
value = "Select" />
<htmlb:listBoxItem key = "Active"
value = "Active" />
<htmlb:listBoxItem key = "Inactive"
value = "Inactive" />
<htmlb:listBoxItem key = " "
value = " " />
</htmlb:dropdownListBox>
<htmlb:button id = "clear"
tooltip = "Save the entries"
text = "Save"
width = "35%"
on Click = "OnI nputP rocessing()" />OnInputProcessing Code:
data:
w_event TYPE REF TO cl_htmlb_event,
w_object TYPE REF TO object,
w_eventid TYPE string,
w_obj TYPE REF TO object,
w_listbox TYPE REF TO cl_htmlb_dropdownlistbox.
CALL METHOD cl_htmlb_manager=>get_event
EXPORTING
request = runtime->server->request
RECEIVING
event = w_event.
w_eventid = w_event->id.
CASE w_eventid.
WHEN 'clear'.
CALL METHOD cl_htmlb_manager=>get_data
EXPORTING
request = runtime->server->request
name = 'dropdownListBox'
id = 'estatus'
RECEIVING
data = w_obj.
w_listbox ?= w_obj.
w_empvalue = w_listbox->selection.
w_value = w_empstatus.(W_value is a type of char)
endcase.Hope this helps you,Let me know if any queries.
Regards,
Rajani
2009 Aug 24 5:38 AM
Is domain of field is standard or custom ? Also, can you chek the value range tab of the domain.
Please let us know name of domain of the field.
2009 Aug 24 5:54 AM
Thanks guys, Actually for my combobox I am simply reading values from the table and setting the values by
function.
CALL FUNCTION 'VRM_SET_VALUES'
Domain is a custom one and has no values in its value range.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |