Hi,
I am working on field symbols in the abap program. I am trying to modify the records of the internal table. I am new to field pointers and going to through several threads, add the code in the program but not getting the desired results. I would appreciate your help in this regard.
Here is the code..
data: begin of dept_itab occurs 0,
deptid like p0001-kostl,
pstl2 like csks-pstl2,
end of dept_itab.
field-symbols: <fs_dept> like line of dept_itab.
the dept_itab table is populated then, few dept records have the record PSTL2 value to be updated. I am trying to do using field pointers.
loop at dept_itab assigning <fs_dept>.
select single * from csks where kostl = dept_itab-deptid.
<fs_dept>-deptid = dept_itab-deptid.
<fs_dept>-pstl2 = csks-pstl2.
append <fs_dept>. ??? how to append the record in the field symbol - Error here
endloop.
Then I need to store the updated records back to dept_itab.
Hence I added..
refresh dept_itab.
assing dept_itab to <fs-dept>
move <fs_dept> to dept_itab.
How to correct this? It has large number of records and to improve the perormance I am applying this technque.
Thanks in advance,
VG