cancel
Showing results for 
Search instead for 
Did you mean: 

RAP - READ EML Statement is not fetching any results but it is calling the FOR READ Method

0 Kudos

Hi Experts,

I'm implementing RAP unmanaged scenario, I'm writing the READ EML statement in the custom ACTION method. Still, I'm not getting any results and this READ statement is calling my FOR READ method of the class. I have written the same READ statement inside my FOR READ method as well but there also it is not fetching any results.

Please let me know if there is any solution for this,

P.S. I'm using the custom cds entity to fill the initial data.

Accepted Solutions (0)

Answers (2)

Answers (2)

j_pavan_kumar
Product and Topic Expert
Product and Topic Expert

Hi Prasad,

READ EML statement will call the RAP BO behavior handler method FOR READ for the entity specified in the EML statement.

Since it is unmanaged implementation here developer needs to implement the FOR READ method i.e Fetching the data from the transactional buffer or from the persistent table for the given keys and map it to the RESULT Whereas in case of Managed implementation RAP framework only handles the FOR READ method.

METHODS read FOR READ
      IMPORTING keys FOR READ Travel RESULT result.

Thanks,

Pavan

alexs0uza
Explorer
0 Kudos
Thanks. This information solved this issue for me.
0 Kudos

Thanks, pavankumarjagadeesh89 for the quick response.

To test, I've written the dummy logic( a simple select query to get 4 rows ) to fill the RESULT parameter in the FOR READ method and the same 4 rows are reflected in my action method as a result of the READ EML Statement.

In my case, I'm using the CUSTOM CDS Entity so data fetch is happening using the custom class. In my case how can I set the data to the transactional buffer, is there any way that I can pass the data?

Could you please let me know?