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
Ramjee_korada
Active Contributor
0 Kudos