cancel
Showing results for 
Search instead for 
Did you mean: 

Managed RAP: EML Update Operation not working during determination function

0 Kudos

I am working on a managed Scenario where I have single root entity. Based on certain key value ( Purch Order ) I am supposed to update other field values while in the object page. I have tried to implement

determination updPOdata on modify { create; update; field suppl, refval, curr, collNo; }

 METHOD updPOdata.
" Read all relevant PO data.
READ ENTITIES OF ZBILLDATA IN LOCAL MODE
ENTITY _billD
ALL FIELDS
WITH CORRESPONDING #( keys )
RESULT DATA(lt_podata).
LOOP AT lt_podata ASSIGNING FIELD-SYMBOL(<fs_po>).
* Update
<fs_po>-refval = 10. " Hardcoded value for debug <Remove>
<fs_po>-curr = 'USD'
ENDIF.
ENDLOOP.
MODIFY ENTITIES OF ZBILLDATA IN LOCAL MODE
ENTITY _billD
UPDATE FIELDS ( refval curr )
WITH CORRESPONDING #( lt_podata )
REPORTED DATA(lt_reported)
FAILED DATA(ls_failed)
MAPPED DATA(ls_mapped).
ENDMETHOD.

This did not works so I tried other things.

I have also tried the above using Create Operation instead of Update. For create operation the values get updated but I get duplication of values. Also the value does not get immediately reflected back in the object page for updated fields ( Like screen table in module pool program) instead you have to go back to the list page and see the updated values.

I have also tried using calculation class but in this case data only gets displayed and not persist in the table.

Please suggest a suitable workaround for :

1. Updating other fields from key fields in object page.

2. Post create action the screen should show the updated values in object page itself.

Regards,

Chandeep Singh Batra

View Entire Topic
former_member14709
Contributor
0 Kudos

Hi Chandeep,

The solution for 2nd issue is to implement side effects.

https://help.sap.com/docs/SAP_NETWEAVER_AS_ABAP_752/468a97775123488ab3345a0c48cadd8f/18b17bdd49d1436...

Thanks,

Aman Garg

0 Kudos

Hi Aman,

I looked at the side effects post. What I understand from this was that this is not for use within RAP Behaviour pool based application but conventional SAP gateway object which can be later used in Fiori Frontend.

Do correct me if I am wrong here.

I am still looking for appropriate Restful Application Programming framework solution that can be implmented using behaviour pool class.

former_member14709
Contributor
0 Kudos

Hi Chandeep,

Side effects are applicable for RAP base apps as well, please refer to below RAP determination documentation, where SAP suggests to implement side effects

https://help.sap.com/docs/BTP/923180ddb98240829d935862025004d6/6edb0438d3e14d18b3c403c406fbe209.html...

Thanks,

Aman Garg