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

How to transfer selected items from List Page to popup Abstract Entity in RAP?

Andrei_Karanchuck
Product and Topic Expert
Product and Topic Expert
0 Kudos
760

I have an application where, on the List Page, I select multiple records, and then click a button to process them. I need to choose the main item from the selected records, and for that, a popup created through Abstract Entity appears. In this popup, I need to pass the selected data from the List Page into a dropdown.

Example workflow

1. I select several record  

Andrei_Karanchuck_0-1737021919123.png

2. I click a button that opens the Abstract Entity dialog 

Andrei_Karanchuck_1-1737022082104.png

3. In this dialog, I need to choose from the previously selected items 

Andrei_Karanchuck_2-1737022129002.png

Here is your Abstract Entity code :

 

 

@EndUserText.label: 'Abstract Entity'
@Metadata.allowExtensions: true
define root abstract entity ZCPO_ProdOrder_ENTITY

{
  @EndUserText.label: 'Choice reference production order'
  key productionOrder : abap.char(12);
}

 

How can this functionality be implemented?

Thanks and Regards, 
Andrei

Accepted Solutions (1)

Accepted Solutions (1)

AbhishekSharma
Active Contributor

Hi @Andrei_Karanchuck  you may use annotations as below, Assuming you are already reading the record based on Key selected from table  record...

This should go in your Abstract Entity 

 

@UI.defaultValue: #( 'ELEMENT_OF_REFERENCED_ENTITY: <Column_Name>' )
status : abap_boolean;

 

 You may add as many columns you want to add in Abstract Entity popup. Please refer below post for more details:

Hope this helps...

Thanks-

 

Answers (1)

Answers (1)

MioYasutake
SAP Champion
SAP Champion
0 Kudos

@Andrei_Karanchuck 

I wrote the following blog post, which demonstrates how to pass multiple selected items to an action that accepts deep (table) parameters. This does not use a popup but instead triggers the action in a controller extension:

https://community.sap.com/t5/technology-blogs-by-members/how-to-call-rap-actions-with-table-types-fr...

 

Andrei_Karanchuck
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thank you!