2006 Apr 23 7:40 AM
REPORT ZDW_LOC_MSTR .
tables : t001l.
data : begin of itab occurs 0.
include structure zzzzzz.
data: end of itab.
field-symbols: <ls_itab> type zloc_mstr.
SELECT werks lgort lgobe
FROM T001L
into (t001l-werks , t001l-lgort , t001l-lgobe ).
MOVE: T001L-WERKS TO ITAB-zsite,
T001L-LGORT TO ITAB-zloc,
T001L-LGOBE(8) TO ITAB-zdesc.
append itab.
endselect.
loop at itab assigning <ls_itab>.
<ls_itab>-ztable_name = 'ZXXXX'.
endloop.
*
INSERT zYYYYY FROM TABLE itab.
2006 Apr 23 8:56 AM
replace your insert statement with the following code.
<b>MODIFY zYYYYY FROM TABLE itab .</b>
Regards
Raja
2006 Apr 23 8:29 AM
Hello ,
The problem is with the statement <b>loop at itab assigning <ls_itab></b>. The types of itab and <ls_itab> are incompatible/
Change the declaration of your field symbol.
Regards,
Anand Mandalika.
2006 Apr 23 8:30 AM
because the itab structure and the filed symbol structure are differnt.
change your field symbol declararion from
field-symbols: <ls_itab> type zloc_mstr.
to
<b>field-symbols: <ls_itab> type any.</b>
Regards
Raja
When asking questions about ABAP dump it would help us if you give us the dump analysis as well from transaction ST22
2006 Apr 23 8:40 AM
2006 Apr 23 8:42 AM
with my program i made debug before the statment
insert i have all the data in itab
the problem is with the insert i thinhk?
2006 Apr 23 8:56 AM
replace your insert statement with the following code.
<b>MODIFY zYYYYY FROM TABLE itab .</b>
Regards
Raja
2006 Apr 23 9:01 AM
it's work but i get only 1 record
and i have 25 i see it it itab why?
2006 Apr 23 10:04 AM
whats the sy-dbcnt value after the execution of modify statement?
reason could be duplicate entries.
whats the key for the table ZYYYYY
and how many distinct records (based on key) you have in your itab?
Regards
Raja