cancel
Showing results for 
Search instead for 
Did you mean: 

RAP Populating the deep entity structure in Behavior Implementation class

Vinit252
Explorer
0 Kudos
1,911

 

I have created an RAP BO and implemented an action with a deep table parameter. I achieved this using a CDS Abstract Entity Hierarchy found it in help.sap.com( https://help.sap.com/docs/abap-cloud/abap-rap/modeling-parameters-for-non-standard-operations?locale... ) .

For fetching data, I utilized a Function Module (FM) which I called inside the Behavior implementation class, passing the data into the result tab. However, I am encountering an issue with a requirement where 2 internal tables and one header are needed in the result tab of the action.

I have successfully transferred header data into %param, but I am facing difficulties with the line item data. Automatic code completion is not helping, and I haven't found any relevant blogs to reference.



Vinit252_0-1707159164719.png

 Your assistance in resolving this issue would be greatly appreciated.

 

Accepted Solutions (1)

Accepted Solutions (1)

Ramjee_korada
Active Contributor

Hi,

Since this is a table type, you can not access directly it's fields. You have to pass the data as an internal table. Ex.. Value #( for ls_data in lt_data ( field = ls_data-field)).

 

Best wishes,

Ramjee Korada 

 

 

Vinit252
Explorer
0 Kudos
Thankyou Ramjee , it worked for me

Answers (1)

Answers (1)

Sindhu_Pulluru
Newcomer
0 Kudos

Hi Ramjee,

I tried similar approach but in the action popup, the table doesnot appear.

Below is my abstract entities:

Sindhu_Pulluru_0-1723192460403.png

 

Sindhu_Pulluru_1-1723192474999.png

 

I have also created Behaviour definition for this abstract entity:

Sindhu_Pulluru_2-1723192511195.png

 

And, below is my RAP object behavior defintion where I defined the action button using the above abstract entity as parameter:

Sindhu_Pulluru_3-1723192602483.png

Kindly help me with the same.

 

Ramjee_korada
Active Contributor
0 Kudos

@Sindhu_Pulluru 

As far as I understand, Fiori Elements has not yet supported the deep parameter. However, it works with RAP so you can use deep parameters with webapi or UI5 custom code.