cancel
Showing results for 
Search instead for 
Did you mean: 

EML action - passing all fields of a selected row (List Report)

satyaki
Discoverer
0 Kudos

Hi Experts,

When performing an action on selected rows of a list report application, only keys get passed to implementation method, and then inside implementation, I need to select/read (query) data from entity_set to get all fields.

For example, in the following method, I only get keys to deal with data manipulation. 

METHODS some_action FOR MODIFY
IMPORTING keys FOR ACTION bdef~some_action.

Is there a way, I can get whole row (or all columns of a row), so that I need NOT to fetch the row data by another query like ABAP ALV report (in ALV for a given action, we can get the selected row/rows data), not just the key fields.

What is the syntax in EML to get all the columns of selected row/rows, not just the keys?

Thanks, Satyaki

 

View Entire Topic
patrick_winkler
Product and Topic Expert
Product and Topic Expert
0 Kudos

Expand the copyTravel action sample code to see an example of the ALL FIELDS syntax:

READ ENTITIES OF /DMO/I_Travel_M IN LOCAL MODE
      ENTITY travel
       ALL FIELDS WITH CORRESPONDING #( keys )
    RESULT DATA(travel_read_result)
    FAILED failed.
satyaki
Discoverer
0 Kudos

Hi Patrick,

Thanks for quick response.

There are 2 issues, I face with this READ syntax.

1. I am in S4H on-premise with following system components, and I face syntax error when I use "ALL FIELDS WITH CORRESPONDING #( KEYS )".

SAP_BASIS 754, SAP_ABA 75E, SAP_GWFND 754

2. READ statement with list of specified fields works without syntax error, however returns nothing. The only way it works if I implement READ method first selecting data from DB table which I can do in MODIFY method as well (I mean selecting data from DB table in modify method using received key fields and then doing further manipulation) . My point is anyway, either way I have to select data from DB table, fields are not getting transferred from FRONT-END list report.

First I have to code select statement in READ method implementation, 

METHODS read FOR READ

IMPORTING keys FOR READ <entity_alias> RESULT result.

and then use following syntax to get result

READ ENTITIES OF <entity_name> IN LOCAL MODE

ENTITY <alias_name>

*** this does not work - ALL FIELDS WITH CORRESPONDING #( KEYS )

FIELDS ( field1, field2 ) WITH CORRESPONDING #( keys )

RESULT DATA(lt_result)

FAILED DATA(lt_failed).

Appreciate your help.

Regards, Satyaki

patrick_winkler
Product and Topic Expert
Product and Topic Expert
0 Kudos
@satyaki Unfortunately, I don't have much experience with unmanaged RAP BOs in 7.54 The only thing I can recommend is to try to use a managed RAP BO.