Skip to Content
avatar image
Former Member

problem with INSERT

REPORT ZDW_LOC_MSTR .

tables : t001l.

data : begin of itab occurs 0.

include structure zloc.

data: end of itab.

field-symbols: <ls_itab> type zloc.

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 = 'loc'.

endloop.

<b>INSERT zloc_mstr FROM itab .</b>

<b>i tried FROM TABLE itab too.

and i get only 1 record and in debug i see 20 rows why?</b>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 23, 2006 at 08:54 AM

    Hi,

    When you say itab, you are referring to the header line which will have only one row. When you say table itab, you are referring to entire table.

    In the debug mode, you are looking at the table, which has 20 rows. If you use the FROM TABLE ITAB, you should see 20 rows in the database table.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded