Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal table

Former Member
0 Kudos
102

hi guruji's,

One small query, how to declare one internal table using types statement withous using the occurs key word?

1 ACCEPTED SOLUTION

Former Member
0 Kudos
77

hi,

use this...



TYPES:BEGIN OF TY_AFVC,
      AUFPL TYPE AFVC-AUFPL,
      APLZL TYPE AFVC-APLZL,
      VORNR TYPE AFVC-VORNR,
      ARBID TYPE AFVC-ARBID,
      WERKS TYPE AFVC-WERKS,
      KTSCH TYPE AFVC-KTSCH,
      LTXA1 TYPE AFVC-LTXA1,
      RUECK TYPE AFVC-RUECK,
      RMZHL TYPE AFVC-RMZHL,
      OBJNR TYPE AFVC-OBJNR,
      END OF TY_AFVC.

DATA: IT_AFVC TYPE STANDARD TABLE OF TY_AFVC,
          WA_AFVC TYPE TY_AFVC.

do reward if it helps,

priya.

7 REPLIES 7

soumya_jose3
Active Contributor
0 Kudos
77

hi,

Declare as follows:

data: itab type table of mara. "This declares an internal table without header line.

data: itab type table of mara with header line. " "This declares an internal table with header line.

Regards,

Soumya.

Former Member
0 Kudos
77

Declare as follows :

TYPES: BEGIN OF ty_year,

finyr TYPE finyr, "Financial Year

begda TYPE begda, "Start Date

endda TYPE endda, "End Date

effda LIKE sy-datum, "effective date

END OF ty_year.

DATA: it_year TYPE STANDARD TABLE OF ty_year WITH HEADER LINE.

Former Member
0 Kudos
77

Ex: 

types:begin of t_tran,
       tcode type tcode,
       pgmna type program_id,
     end of t_tran.

data: gt_tran type table of t_tran.

Former Member
0 Kudos
77

Hi,

types : begin of type_a,
           fld1 type c,
           fld2 type i,
           end   of type_a.

data  : itab type table of type_a with header line.

Cheers,

jose.

Former Member
0 Kudos
77

hi

TYPES : BEGIN OF st_knc1,

kunnr TYPE knc1-kunnr, "Customer Number

bukrs TYPE knc1-bukrs, "Company Code

um01u TYPE knc1-um01u , "Sales In Posting Period

END OF st_knc1.

DATA : it_knc1 TYPE STANDARD TABLE OF st_knc1 ,

wa_knc1 TYPE st_knc1.

Former Member
0 Kudos
78

hi,

use this...



TYPES:BEGIN OF TY_AFVC,
      AUFPL TYPE AFVC-AUFPL,
      APLZL TYPE AFVC-APLZL,
      VORNR TYPE AFVC-VORNR,
      ARBID TYPE AFVC-ARBID,
      WERKS TYPE AFVC-WERKS,
      KTSCH TYPE AFVC-KTSCH,
      LTXA1 TYPE AFVC-LTXA1,
      RUECK TYPE AFVC-RUECK,
      RMZHL TYPE AFVC-RMZHL,
      OBJNR TYPE AFVC-OBJNR,
      END OF TY_AFVC.

DATA: IT_AFVC TYPE STANDARD TABLE OF TY_AFVC,
          WA_AFVC TYPE TY_AFVC.

do reward if it helps,

priya.

Former Member
0 Kudos
77

types: IT_HEADER1 type standard table of STRUCT_HEADER,

IT_ITEMS1 type standard table of STRUCT_ITEMS,

IT_FINAL1 type standard table of STRUCT_FINAL,

IT_HISTORY1 type standard table of STRUCT_HISTORY,

IT_STXH1 type standard table of STRUCT_STXH,

IT_TEXT1 type standard table of STRUCT_TEXT,

data: IT_HEADER type IT_HEADER1,

IT_ITEMS type IT_ITEMS1,

IT_FINAL type IT_FINAL1,

IT_HISTORY type IT_HISTORY1,

i hope its useful

reward if useful

vivek