![fm to update adrc table fm to update adrc table](https://ars.els-cdn.com/content/image/1-s2.0-S1934590921001612-fx1.jpg)
Potential issue highlighted above you probably should just use a field symbol looping around an internal table and updating values), especially if you take into account the Should you use a FIELD-SYMBOL assigning instead of the MODIFYįor this specific task (i.e. I check if the record exists and if not I use the APPEND statement, I also dont rely on MODIFY to ADD new rows either. Moment or something else all together causing the issue but I now always include the index value if using MODIFY. This may have been for many reasons including me having a bit of a dumb
FM TO UPDATE ADRC TABLE CODE
But and the only reason I say "should" is because on many occasions the above code has not worked as expected and has not MODIFY it_ekpo FROM wa_ekpo TRANSPORTING netpr. The simple answer is no and the following code should work just fine!! * header line you could even reduce the code toĭo i need the "INDEX gd_tabix" for all the above examples? * If you wanted to go even more old school and had a itab with a
![fm to update adrc table fm to update adrc table](https://blogs.sap.com/wp-content/uploads/2021/01/3-9.jpg)
MODIFY it_ekpo INDEX gd_tabix FROM wa_ekpo. * the above code helps performance by specifying that field * This example could also look like this.But if you are only updating one field MODIFY it_ekpo INDEX gd_tabix FROM wa_ekpo * Modify data within internal table loop using the index and TRANSPORTING additions Select ebeln ebelp statu aedat matnr menge meins netpr peinh It_ekpo2 TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0 WITH HEADER LINE. *&-Created By details-*ĭATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0, *& Example of Modifying an internal table value * Update internal table using the ABAP MODIFY statement command MODIFY it_ekpo from wa_ekpo4 index sy-tabix. Using work area loop at it_ekpo into data(wa_ekpo4). UPDATE: inline declaration works from 7.4 Using field symbol loop at it_ekpo assigning field-symbol(). Modify database table from internal table.
![fm to update adrc table fm to update adrc table](https://media.springernature.com/lw785/springer-static/image/chp%3A10.1007%2F978-1-4842-3183-8_4/MediaObjects/451080_1_En_4_Fig6_HTML.jpg)