ABAP Forum
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Annotation @UI.selectionVariant for quantity field

stefan_heuberger
Newcomer
0 Likes
546

Hi.

currently I have to implement a List View. The requirement is to use default values for a couple of fields. One default value should be defined on a quantity field greater than 0.

I tried to use @Former Member.selectionVariant in my Metadata Extension like this:

@ui.selectionVariant: [{ qualifier: 'sVariant', filter: '    MaterialBaseUnit EQ ST 
                                                         AND MatlWrhsStkQtyInMatlBaseUnit gt 1                                                           
                                                         AND Plant EQ 0020
                                                         AND ( StorageLocation EQ 0001 OR StorageLocation EQ 0002 ) ' } ]

For Plant, StorageLocation and MatreialBaseUnit everything works fine. Only for the quantity field MatlWrhsStkQtyInMatlBaseUnit the '1' is not taken over in the filter default values. Only '>' is taken over.

Just to ensure:

  • MatreialBaseUnit is the unit for MatlWrhsStkQtyInMatlBaseUnit (@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit')
  • I already tried 'GT', 'EQ', '>'
  • MatlWrhsStkQtyInMatlBaseUnit has the Annotation @Consumption.filter.selectionType: #INTERVAL

So from my perspective this issue seems to be related to the quantity field. 

Any Ideas?

Thanks,

Stefan

 

 

Hi.

currently I have to implement a List View. The requirement is to use default values for a couple of fields. One default value should be defined on a quantity field greater than 0.

I tried to use @Former Member.selectionVariant in my Metadata Extension like this:

@ui.selectionVariant: [{ qualifier: 'sVariant', filter: '    MaterialBaseUnit EQ ST 
                                                         AND MatlWrhsStkQtyInMatlBaseUnit gt 1                                                           
                                                         AND Plant EQ 0020
                                                         AND ( StorageLocation EQ 0001 OR StorageLocation EQ 0002 ) ' } ]

For Plant, StorageLocation and MatreialBaseUnit everything works fine. Only for the quantity field MatlWrhsStkQtyInMatlBaseUnit the '1' is not taken over in the filter default values. Only '>' is taken over.

Just to ensure:

  • MatreialBaseUnit is the unit for MatlWrhsStkQtyInMatlBaseUnit (@Semantics.quantity.unitOfMeasure: 'MaterialBaseUnit')
  • I already tried 'GT', 'EQ', '>'
  • MatlWrhsStkQtyInMatlBaseUnit has the Annotation @Consumption.filter.selectionType: #INTERVAL

So from my perspective this issue seems to be related to the quantity field. 

Any Ideas?

Thanks,

Stefan

 

 

1 REPLY 1
Read only

0 Likes
453

Do you need interval? If no then try using this

@Consumption.filter.selectionType: #SINGLE