cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve multiple default values in Fiori list page by using @Odata.publish annotation

sudhir_vanap
Explorer
0 Kudos
383

Hello Experts,

We have a requirement to show multiple default values (5 entries) of Supplier Account Group (LFA1-KTOKK) in selection parameter of FLP. But getting error as "Binding target not unique: SUPPLIERACCOUNTGROUP [Odata exposure]". 

I have activated the odata service with annotation @Odata.publish:true where all of my other features are working as expected but not able to achieve this. Can't we populate multiple default values with Odata service option ? Please help. 

I have tried the below code for Vendor Account group column in my CDS:

@Consumption.filter: {selectionType: #SINGLE, multipleSelections: true, mandatory: true}

@Consumption.derivation:{ lookupEntity: 'I_SUPPLIERACCOUNTGROUP',

resultElement: 'SupplierAccountGroup',

binding: [{targetElement:'SupplierAccountGroup', type: #CONSTANT, value: 'ZSUP' },

{ targetElement:'SupplierAccountGroup', type: #CONSTANT, value: 'ZPUR' },

{ targetElement:'SupplierAccountGroup', type: #CONSTANT, value: 'ZFRT' },

{ targetElement:'SupplierAccountGroup', type: #CONSTANT, value: 'ZEXP' },

{ targetElement:'SupplierAccountGroup', type: #CONSTANT, value: 'ZLOC' }]}

@ObjectModel.foreignKey.association: '_ZISUP'

 

 

@ui.selectionField: [{ position: 10 }]

@Consumption.valueHelpDefinition: [{ entity:{name: 'Zcst_Dat_Accgrptext_Vh',element: 'SupplierAccountGroup' } }]

ktokk as Vendoraccountgroup,


SAP S/4HANA Embedded Analytics OData 

View Entire Topic
Hardeep_Tulsi
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Sudhir. OData service does not directly support the mechanism to populate multiple default values in S/4HANA or any other tool. However, you can implement the logic using BADI in SAP S/4HANA Cloud 3SL system to populate multiple default values using SAP provided programs or methods.

Enabling Multiple Selection in default value. you can review feature available with OData V4 that enables you to configure whether end users can select a single row or multiple rows. You can learn more with the documentation

You can also allow single selection or multiple selection of rows in a table. This can be done by specifying appropriate values for the selectionMode property


Using the Import parameter of 'CREATE_DEEP_ENTITY' method of OData, you can pass the multiple default values.
method READ_ENTRY_DATA which can be used to populate default values, and provided io_data_provider parameter will contains incoming payload from which you can read your incoming data using OData.

In addition you can learn about the extensibility options with new SAP Business Application Studio that allows you to  create a custom SAP Fiori application in your tenant for key user extensibility for a custom business object

Hope this helps.

 

Thanks