Hi,
I'm creating a Fiori app using fiori elements/templates and CDS annotations.
One of the fields requires a search-help value list, This just needs to be a drop down list with PASS and FAIL in it.
I have created another view that returns a table with these results and then create a foreign key association and linked the field to the value help
@Consumption.valueHelp:'_Result'
@ObjectModel:{foreignKey.association:'_Result',mandatory:true}
ZHEADER.qires,
This is working however the result is a two step search help (i.e. I click on the possible entries which brings up a dialog box where I then have to click go to show the list of entries as per below).

Is it possible to get the entries to appear as an immediate list similar to the one below?
Can this be done via annotations?
Any help much appreciated

Request clarification before answering.
Hi Vinay,
in the end I did manage to get the blog to work. You need to redefine the 'DEFINE' method of your model provider (MPC) class.
Here is a sample of the code (qires is the name of the field that I want to have the look up)
method DEFINE.
* Method-local declarations:
DATA lo_entity_setTYPE REF TO /iwbep/if_mgw_odata_entity_set.
DATA lo_propertyTYPE REF TO /iwbep/if_mgw_odata_property.
DATA lo_annotationTYPE REF TO /iwbep/if_mgw_odata_annotation.
*Call parent:
super->define( ).
lo_entity_set = model->get_entity_set( 'ZMYENTITYSET' ).
lo_annotation = lo_entity_set->create_annotation( 'sap' ).
lo_annotation->add( iv_key = 'semantics' iv_value = 'fixed-values').
DATA(lo_entitytype) = model->get_entity_type( 'ZMYENTITYSETType' ).
lo_entitytype->set_is_value_list( abap_true ).
data(lo_txt_property) = model->get_entity_type( 'ZMYENTITYSETType' )->get_property( 'qires' ).
lo_txt_property->set_value_list( /iwbep/if_mgw_odata_property=>gcs_value_list_type_property-fixed_values ).
data(lo_text_anno) = lo_txt_property->/iwbep/if_mgw_odata_annotatabl~create_annotation( 'sap' ).
lo_text_anno->add( iv_key = 'text' iv_value = 'to_result/qires').
lo_txt_property = model->get_entity_type( 'ZMYCDSLOOKUPVIEWType' )->get_property( 'qires' ).
lo_txt_property->set_value_list( /iwbep/if_mgw_odata_property=>gcs_value_list_type_property-fixed_values ).
lo_text_anno = lo_txt_property->/iwbep/if_mgw_odata_annotatabl~create_annotation( 'sap' ).
lo_text_anno->add( iv_key = 'text' iv_value = 'qires').
endmethod.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.