‎2009 Jan 07 8:32 AM
hi all,
copied the standard structure FAGLPOSX to ZFAGLPOSX Structure and added a new field
and copied the table type FAGLPOSX T to ZFAGLPOSXT
the data in it_items of structure ZFAGLPOSX of table type ZFAGLPOSX_T.
gt_fields is declared as
gt_fileds type FAGLPOSX_T.
CODE is.
gt_fields = it_items.
call method gd_ref_to_ch_data->change_items CHANGING
ct_items = gt_fileds.
it_items = gt_fileds.
endif.
gt_fields = it_items. the new field is not into gt_fileds , if i change the structure of gt_fileds as ZFAGLPOSX.
call method ct_items = gt_fields then
gt_fields is of copied structure ZFAGLPOSX with new field.
and ct_items is of standard structure FAGLPOSX without new field , getting an error.
please help to get all the data into it_items,
do i need to declare in any other way.
thanks in advance.
‎2009 Jan 07 8:38 AM
What exactly u want to do with the new field?
there are couple of things you could do. Best would be to instead of copying FLAGPOSX to a new z-structure append FLAGPOSX itself with the new field making use of the CI_ available in it.
Or if u cant do that then move corresponding fields between gt_fields and it_items.
Revert if u need more.
‎2009 Jan 07 9:12 AM
hi,
from your explanantion i came to know that u haven't changed the line type for your table type "ZFAGLPOSX_T".
change the line type of your table type from "FAGLPOSX" to "ZFAGLPOSX ".
i think this might help you.
regards,
Yadesh
‎2009 Jan 07 9:16 AM
hi,
and as these structure are different..gt_items and it_items..
you should use move-corresponding instead "=".