cancel
Showing results for 
Search instead for 
Did you mean: 

local element of additional binding with usage: #filter in value help annotation gets updated (RAP)

sebastian_wilhelm1
Participant
0 Kudos

Hi experts,

in my App I have a popup (Abstract Entity) with two fields. In the field Plant, the user can either enter a Plant or a PlantGroup. In the custom entity zi_product, I check if the value is a plant or group and if the value is a group I determine the corresponding plants. Then I determine the articles for the corresponding plants.

@Consumption.valueHelpDefinition: [
   { entity : { name: 'zi_porduct', element: 'product' },
     additionalBinding: [ { localElement: 'Plant', element: 'Plant', usage: #FILTER }],
     useForValidation: true }]
  key Product  : abap.char(40);
  key Plant    : abap.char(10);

This works fine!

If the user searches for articles with a Plant Group and selects an article from the list, the corresponding plant gets written into the field "Plant" but the Plant Group should remain in the field. According to my understanding the field Plant should not be updated when use usage : #FILTER. But that's not the case. 

Does anybody knows how to solve this issue? 

A second question is, how can I guide the user to maintain the field Plant before maintaining the field Product (dynamically hide/display/readonly the field Article). As the plant is the prerequisite for the allowed articles. At least, I'd like to display a message that the user must enter a Plant but I seems that I can't display a message out of a custom entity query class.

Thanks and regards, Sebastian

Accepted Solutions (0)

Answers (1)

Answers (1)

SachinArtani
Participant
0 Kudos

Hi,
For the first question, I think you should provide more code here. It's unclear where article and plant group are maintained and being treated.
For the second question, Since, it's RAP app, Have you already tried feature control or validation? If the app is draft enabled, this should help.

sebastian_wilhelm1
Participant
0 Kudos

Hi @SachinArtani! Thanks for you reply.

Reg. 1 Question: this is the coding of the custom entity zi_product

 

@ObjectModel.query.implementedBy: 'ABAP:ZCL_QI_PRODUCT'
define root custom entity ZI_PRODUCT {
  key Product : abap.char(40);
  Plant : abap.char(10);

 

The class determines the products for a given plant or plantgroup and returns the information. A List of Article/Plants is displayed. When a user chooses an entry, the article Id and the plant id are returned to the abstract entity. I thought, when choosing usage: #FILTER (and not #FILTER_AND_RESULT) for the PlantId, the PlantId should not returned to the abstract entity!?

Reg. 2 Question: As mentioned above, this is an abstract entity where there is (to my knowledge) no Behavior implementation possible and therefore no feature control or validation. Or did I miss something. Actually this is my problem!