Application Development and Automation 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: 
Read only

TYPES declaration

abdulazeez12
Active Contributor
0 Likes
2,348

Hi

Iam getting error in declaring the TYPES this way:

How to declare an internal table within a structure using TYPES??

TYPES:

Begin of type_sernrtab.

include type risernr.

TYPES: celltab type lvc_t_styl,

End of type_sernrtab,

tt_sernrtab type standard table of type_sernrtab,

tt_zbgmp type standard table of zbgmp,

Begin of type_matnrtab.

include type qmatnr.

TYPES: celltab type lvc_t_styl,

tser type tt_sernrtab,

zbgmp type tt_zbgmp,

tu_line(02) type c,

End of type_matnrtab,

5 REPLIES 5
Read only

i048168
Product and Topic Expert
Product and Topic Expert
0 Likes
1,738

Hi,

just change tt_sernrtab to type_sernrtab in the fourth line from the last.

TYPES:

Begin of type_sernrtab.

include type risernr.

TYPES: celltab type lvc_t_styl,

End of type_sernrtab,

tt_sernrtab type standard table of type_sernrtab,

tt_zbgmp type standard table of zbgmp,

Begin of type_matnrtab.

include type qmatnr.

TYPES: celltab type lvc_t_styl,

**tser type type_sernrtab,

zbgmp type tt_zbgmp,

tu_line(02) type c,

End of type_matnrtab,

Regards

Vadi

Read only

0 Likes
1,738

Hi

thanks to all for the answers..

my question is still open.

I have to declare a TYPE structure which shud contain an internal table...of different type

so, I have a TYPE as:

Begin of type_sernrtab.

include type risernr.

TYPES: celltab type lvc_t_styl,

End of type_sernrtab,

Now, based on above, I am declaring a table type as:

tt_sernrtab type standard table of type_sernrtab,

Now, i want to declare an internal table with above type and this internal table shud be declared in another TYPE:

so, i shall say, tser as internal table of type tt_sernrtab. but iam getting error as "tt_sernrtab is generic type and hence cannotb e used"...how to resolve this?

Begin of type_matnrtab.

include type qmatnr.

TYPES: celltab type lvc_t_styl,

tser type tt_sernrtab,

zbgmp type tt_zbgmp,

tu_line(02) type c,

End of type_matnrtab

Any suggestions?

Shakir

Read only

Former Member
0 Likes
1,738

Hi shakir,

It is not showing any error in my system when u use types stmt. Can u tell me what is that exact error or debugg the program.

Regards...

Arun.

Read only

Former Member
0 Likes
1,738
TYPES BEGIN OF TY_MSEG.
        INCLUDE STRUCTURE MSEG.
TYPES   MTART TYPE MARA-MTART.
TYPES  MATKL TYPE MARA-MATKL.
TYPES END OF TY_MSEG.
DATA : IT_MSEG TYPE TABLE OF TY_MSEG.
Read only

Former Member
0 Likes
1,738

HI,

types : begin of i_plant,

plant type plant,

country type county,

region type region,

end of i_plant.

data : itab type table of i_plant,

wa type i_plant.