메뉴 건너뛰기

SAP 한국 커뮤니티



p. 232 페이지 예제 5-3-7 에러납니다.

도움이 2008.06.16 22:19 조회 수 : 2396 추천:2

<P>*&---------------------------------------------------------------------*<BR>*& Report  YUSR11_Z05_013                                              *<BR>*&                                                                     *<BR>*&---------------------------------------------------------------------*<BR>*&                                                                     *<BR>*&                                                                     *<BR>*&---------------------------------------------------------------------*</P>
<P>REPORT  YUSR11_Z05_013                .</P>
<P>TYPES: BEGIN OF line,<BR>         COL1(3) TYPE C,<BR>         COL2    TYPE I,<BR>       END OF line.</P>
<P>DATA<BR>ITAB LIKE STANDARD TABLE OF LINE.<BR>DATA I_IDX TYPE I.</P>
<P>PERFORM fill CHANGING ITAB.</P>
<P>PERFORM OUT USING ITAB.</P>
<P>*---------------------------------------------------------------------*<BR>*       FORM FILL                                                     *<BR>*---------------------------------------------------------------------*<BR>*       ........                                                      *<BR>*---------------------------------------------------------------------*<BR>*  -->  F_ITAB                                                        *<BR>*---------------------------------------------------------------------*<BR>FORM FILL CHANGING F_ITAB LIKE ITAB.<BR>  DATA F_LINE LIKE LINE OF F_ITAB.<BR>  DO 5 TIMES.<BR>    I_IDX = SY-INDEX MOD 2.<BR>    IF I_IDX = 0.<BR>      F_ITAB-COL1 = 'KIM'.<BR>      F_ITAB-COL2 = SY-INDEX.<BR>      APPEND F_ITAB.<BR>    ELSE.<BR>      F_ITAB-COL1 = 'LEE'.<BR>      F_ITAB-COL2 = SY-INDEX.<BR>      APPEND F_ITAB.<BR>    ENDIF.<BR>  ENDDO.<BR>ENDFORM.</P>
<P>*---------------------------------------------------------------------*<BR>*       FORM OUT                                                      *<BR>*---------------------------------------------------------------------*<BR>*       ........                                                      *<BR>*---------------------------------------------------------------------*<BR>*  -->  VALUE(F_ITAB)                                                 *<BR>*---------------------------------------------------------------------*<BR>FORM OUT USING VALUE(F_ITAB) LIKE ITAB.<BR>  DATA F_LINE LIKE LINE OF F_ITAB.<BR>  LOOP AT F_ITAB INTO F_LINE.<BR>    WRITE :/ F_LINE-COL1, F_LINE-COL2.<BR>  ENDLOOP.<BR>ENDFORM.</P>
<P><BR>MOVE itab[] TO jtab.</P>
<P>PERFORM out TABLES jtab.</P>
<P>*---------------------------------------------------------------------*<BR>*       FORM fill                                                     *<BR>*---------------------------------------------------------------------*<BR>*       ........                                                      *<BR>*---------------------------------------------------------------------*<BR>*  -->  F_ITAB                                                        *<BR>*  -->  DO                                                            *<BR>*  -->  5                                                             *<BR>*  -->  TIMES                                                         *<BR>*---------------------------------------------------------------------*<BR>FORM fill TABLES f_itab LIKE itab[].<BR>  DO 5 TIMES.<BR>    l_idx = sy-index MOD 2.<BR>    IF l_idx = 0.<BR>      f_itab-col1 = 'kim'.<BR>      f_itab-col2 = sy-index.<BR>      APPEND f_itab.<BR>    ELSE.<BR>      f_itab-col1 = 'LEE'.<BR>      f_itab-col2 = sy-index.<BR>      APPEND f_itab.<BR>    ENDIF.<BR>  ENDDO.<BR>ENDFORM.</P>
<P>*---------------------------------------------------------------------*<BR>*       FORM out                                                      *<BR>*---------------------------------------------------------------------*<BR>*       ........                                                      *<BR>*---------------------------------------------------------------------*<BR>*  -->  F_ITAB                                                        *<BR>*---------------------------------------------------------------------*<BR>FORM out TABLES f_itab LIKE jtab.<BR>  LOOP AT f_itab.<BR>    WRITE:/ f_itab-col1, f_itab-col2.<BR>  ENDLOOP.<BR>ENDFORM.</P>
<P> </P>
<P> </P>
<P>ROW 36</P>
<P>"F_ITAB" is a table without a header line and therefore has no component called "COL1".</P>
<P> </P>
<P>에러가 나네요..</P>
<P>header line 없어서 나는 에러인듯 싶은데..</P>
<P>그래서 위에 itab 에 with header line을 넣고 하였더니</P>
<P> </P>
<P>ROW 32</P>
<P>"F_ITAB" is not an internal table.</P>
<P> </P>
<P>에러가 나네요</P>