06-16-2021 11:02 AM
Hi All,
I am using BAdI WORKORDER_UPDATE - before_update method. And I want to update parameter IT_OPERATION. It does not allow me to update IT_OPERATION. I came to a conclusion that since it is an importing parameter it wont be allowed to change. Could you please suggest a way forward, on how to update a field in IT_OPERATION?
below is my code :
FIELD-SYMBOLS :<fs_cust1> TYPE any,
<fs_cust2> TYPE any.
LOOP AT it_header INTO DATA(lwa_header).
READ TABLE it_operation INTO DATA(lwa_opr)
WITH KEY aufpl = lwa_header-aufpl.
IF sy-subrc = 0.
ASSIGN lwa_opr-zzcustomfield1 TO <fs_cust1>.
ASSIGN lwa_opr-zzcustomfield2 TO <fs_cust2>.
MOVE <fs_cust1> TO <fs_cust2>.
UNASSIGN: <fs_cust1>, <fs_cust2>.
ENDIF.
* MOVE-CORRESPONDING lwa_opr to IT_OPERATION. ------ error line
Endloop.