Skip to Content

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

Its giving error it_sf is not an internal table

hii experts,

can anyone pls helpme out in this .




TABLES SFLIGHT.


SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
   PARAMETERS P_CARRID TYPE SFLIGHT-CARRID DEFAULT  'AA'.
   SELECTION-SCREEN END OF BLOCK B1.

   AT SELECTION-SCREEN ON P_CARRID.
     IF P_CARRID IS NOT INITIAL.
       SELECT * FROM SFLIGHT
         where CARRID = P_CARRID.
         ENDSELECT.
         IF SY-SUBRC <> 0.
           MESSAGE E001(Z_IM).
           ENDIF.
           ENDIF.



   TYPES : BEGIN OF TY_SFLIGHT,
            CARRID TYPE SFLIGHT-CARRID,
            CONNID TYPE SFLIGHT-CONNID,
             FLDATE TYPE SFLIGHT-FLDATE,
            PAYMENTSUM TYPE SFLIGHT-PAYMENTSUM,
           END OF TY_SFLIGHT.

           DATA : IT_SF TYPE  TABLE OF TY_SFLIGHT,
                  wa_sf like line of it_sf.

                  start-of-selection.

                  select * into CORRESPONDING FIELDS OF TABLE IT_SF
                    FROM SFLIGHT
                    where carrid eq p_carrid.

replied

You have placed IT_SF declaration inside event AT SELECTION SCREEN and hence compiler is not recognizing it. Move it at top below TABLES declaration and you will not face this issue.

TABLES: SFLIGHT.

TYPE: BEGIN OF TY_SFLIGHT<

           END OF TY_SFLIGHT.

DATA: IT_SF TYPE TABLE OF TY_SFLIGHT.

and then start writing your logic.

Regards,

Manish

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