Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Field Symbol not assign

hi experts,

can you help me on this on.

 data: dref type ref to data,
                     drefc type ref to data.

field-symbols: <itab type standard table,
                        <ctab> type standard table.

create data: dref type standard table of (s_tab).
create data: dfrefc type standard table of (s_ctab).

assign dref->* to <itab>.
assign drefc->* to <ctab>.

select * from (s_tab) into table <itab>.
loop at <itab> assigning <wa>.
move-corresponding <wa> to <wa_ctab>. -----> <wa_ctab> not assigned
insert into (s_ctab) values <wa_ctab>.
endloop.  commit work.

please help.

Thank You

Former Member
Former Member replied

Hi,

Try this

DATA
     : g_TABNAME TYPE TABNAME.

PARAMETERS : s_tab TYPE TABNAME,
                 s_ctab TYPE TABNAME.

 data: dref type ref to data,
                     dfrefc type ref to data,
                     dwaref TYPE REF TO data.

field-symbols: <itab> type standard table,
                        <ctab> type standard table,
                        <wa> TYPE ANY,
                        <wa_ctab> TYPE ANY.

create data: dref type standard table of (s_tab).
create data: dfrefc type standard table of (s_ctab).
create data: dwaref type (s_ctab).

assign dref->* to <itab>.
assign dfrefc->* to <ctab>.
assign dwaref->* to <wa_ctab>.

select * from (s_tab) into table <itab>.
loop at <itab> assigning <wa>.
move-corresponding <wa> to <wa_ctab>.
insert into (s_ctab) values <wa_ctab>.
endloop.  commit work.

Regards

Rajvansh

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question