on 07-02-2021 10:41 AM
Hello Experts,
We were extending the F4 help for a standard app "Create Purchase Requisition" for the Supplier search in 1709. Recently we have upgraded our system to S/4HANA 2020. After upgrade, the value help annotation for the Z fields are not working. I have used the following annotation below:
____________________________________________________________________________________________
@AbapCatalog.sqlViewAppendName: 'ZMMSUPBYMTGX4'
@EndUserText.label: 'Supplier by Material Group'
extend view C_SSPSupplierPurgOrgVH with ZMM_I_SUBBYMTG_X_04
association [0..1] to I_Supplier as _Supplier2 on _Supplier2.Supplier = Supplier.Supplier
association [0..1] to ZMM_I_MATKL_TEXT as _MatklText on _MatklText.MaterialGroup = $projection.materialgroup
{
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 } @ObjectModel.text.element:'MaterialGroup'
@Consumption.valueHelpDefinition: [{ entity: { name: 'ZMM_I_MATERIALGROUP_VH', element: 'MaterialGroup' } }]
_Supplier2.MaterialGroup as MaterialGroup1,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
@ObjectModel.text.element:'SupPlant'
@Consumption.valueHelpDefinition: [{ entity: { name: 'ZMM_I_PLANT_VH', element: 'Plant' } }]
_Supplier2.SupPlant as SupPlant,
@Search: { defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.7 }
@ObjectModel.text.element:'PurchaseOrg'
@Consumption.valueHelpDefinition: [{ entity: { name: 'ZMM_I_PURCHASEORG_VH', element: 'PurchaseOrg' } }] _Supplier2.PurchaseOrg as PurchaseOrg }
In the above code, I have replaced one of our custom value help "ZMM_I_MATERIALGROUP_VH" with standard SAP CDS view (C_SSPMaterialGroupVH) where it works good but when I use our custom Valuehelp CDS View (ZMM_I_PLANT_VH), it is not working.
Also in the metadata of the App, the custom CDS view annotations are not loading. However when I give the standard CDS View as F4 Value help instead of custom, the annotations are loading for the particular standard CDS view and appearing as F4 Help.
This is happening after we upgrade the HANA system from 1709 to 2020.
Your answers will be much helpful for me to solve the issue.
P.S. I have did all sort of clearing cache, loading metadata and model. but still its not working.
Regards,
Mahendran B.
I did notice that the Custom Fields and Logic tile does create custom extensions and custom value helps against standard delivered CDS views that result in working value helps. So far, I have not been able to find the "magic sauce" of annotations which allow this to happen, despite closely following their annotations and extension structure.
Perhaps Custom Fields and Logic is doing something else under the hood of the Gateway Service itself?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I finally found this note 3070775 which answers your point: Notes - SAP ONE Support Launchpad
To my understanding the missing point is that the value help entity needs to be exposed in the OData Service. This seems to be not possible for SAP Standard OData Services.
In our case, we have upgraded from 1709 to 2020. So in 2020, they have changed the way to load the annotation. We have enhanced the MPC_EXT with an include and in the same we have loaded the metadata using the standard class as shown below:
-----------------------------------------------------------------------------------------------------------------------------------------
Annotation for Status Search Help
CALL METHOD cl_fis_shlp_annotation=>create(
EXPORTING
io_odata_model = model " Interface for a Script-Based Model
io_vocan_model = vocab_anno_model " Vocabulary Annotation Model - API to define Annoations
iv_namespace = mv_flx_service_technical_name " OData schema namespace
iv_entitytype = 'C_PurchaseRequisition_WLType' " Entity type to edit
iv_property = 'PurReqnLifeCycleStatus' " Property to edit
iv_search_help = 'MM_PUR_DD07T_SH' " Table Name
iv_search_supported = abap_true " Value list supports search - deduced from IV_SEARCH_HELP
iv_valuelist_entityset = 'StatusSearchHelpSet' " Entity set for value list
iv_valuelist_property = 'DOMVALUE_L' " Property in value list for edit value
RECEIVING
ro_annotation = DATA(lr_anno_status_search) ).
lr_anno_status_search->add_inout_parameter(
iv_property = 'PurReqnLifeCycleStatus'
iv_valuelist_property = 'DOMVALUE_L' ).
lr_anno_status_search->add_display_parameter( iv_valuelist_property = 'DDTEXT' ).
DATA(lo_tab) = cl_fis_text_annotation=>create( model ).
lo_tab->text(
iv_entity_type = 'StatusSearchHelp'
iv_code_property = 'DOMVALUE_L'
iv_text_property = 'DDTEXT' ).
------------------------------------------------------------------------------------------------------------------------------------
You have to implement the same logic for your custom CDS view to get loaded the annotation in metadata.
Regards,
Mahendran B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem. I can't add a value help using a view extension to a standard cds view. The metadata does not include the value help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.