cancel
Showing results for 
Search instead for 
Did you mean: 

SAP RESTFUL ABAP custom table update along with RAP entites update not working in instance actions

udayagiri_swamy
Discoverer
0 Kudos
191

Hi Team,

I have a instance action where I am doing postings and collecting the error logs which are read only in the Fiori. I am trying to update the status of instances using RAP EML update  and inserting the logs into custom table using normal MODIFY statement. When I use both the statements, only RAP EML update statement is working and normal ABAP MODIFY DB from internal table is not working.

ABAP EML

MODIFY ENTITIES OF zwbs_prc IN LOCAL MODE

ENTITY wbs_stg

UPDATE

FIELDS ( wbselemstatus )

WITH VALUE #( FOR ls_wbs IN rt_wbs_stg_db

( %tky = VALUE #( %key = VALUE #( prckey = ls_wbs-prc_key

zwbsuuid = ls_wbs-zwbs_uuid

)

%is_draft = if_abap_behv=>mk-off

)

wbselemstatus = ls_wbs-status

) )

REPORTED DATA(update_stg_reported).

Normal ABAP Modify   
MODIFY zwbs_err FROM TABLE lt_errors.


Can anyone help me here?

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
Active Contributor
0 Kudos

@udayagiri_swamy 

The MODIFY table statement is not allowed during RAP interaction phase, including action handlers. Use unmanaged save and implement the MODIFY statement in save_modified method.

https://help.sap.com/docs/ABAP_PLATFORM_NEW/fc4c71aa50014fd1b43721701471913d/2c2bec28fff6475f922f9f8...