11-08-2007 5:47 PM
hi i need a small clarification.
i declared field symbols as below.
field-symbols <fs_sample> type any.
data:it_vbak type hashed table of vbak with unique key vbeln.
data:it_obj type ref to data.
create object it_obj type it_vbak(or some type).
assign it_obj ->* <fs_sample>.
loop at it_vbak into <fs_sample>.
do some operation on field symbol for vbeln.
modify table it_vbak from <fs_sampe> transporting vbeln.
endloop.
here the subrc is getting as 4.
when remove the code
create object it_obj type it_vbak(or some type).
assign it_obj ->* <fs_sample>.
and change the assigninment like below
loop at it_vbak assigning <fs_sample>.
do some operation on field symbol for vbeln.
modify table it_vbak from <fs_sampe> transporting vbeln.
endloop.
it is working fine.
what is the difference b/w these two and y it is not getting updated in first case.please let me know.......
11-08-2007 6:44 PM
Hi,
INTO used for move the values to work areas,
loop at it_vbak into <fs_sample>.
but for fields symbols you need to use
loop at it_vbak assigning <fs_sample>
a®
11-08-2007 6:52 PM
hi it can be done by using <b>into</b> also if we assign the field symbol b4 with the same type.it is not an issue,syntatically it is perfect.please advice if you have more on this
11-08-2007 7:04 PM
Hi,
This is simple documentation related to assign.
+
Assigns the field f to the field symbol are compatible when you make the assignment.
+
a®