Former Member

# Fields in internal table

Hi friends

I have a silly question. Is there any limit to number of fields in internal table. If yes whats the number and what is the best way to declare internal table and what type of internal table would be suggested?. My internal table would be using multiple structures to make up an input file format with 150 fields.

Cheers

Satya

10|10000 characters needed characters exceeded

Former Member
Oct 11, 2007 at 02:24 PM

Satya,

I don't know the limits, but I am sure you can easily define an internal table with more than 150 fields.

The way you could have tested this yourself without having to post a message is by quickly creating a test program and define an internal table LIKE BSEG. This table has close to 300 fields.

The real limiting factor is total memory space - which is width * height. So, the wider the itab is the fewer the number of records your program can hold. (Note that total width is number of columns * average width of the column.)

10|10000 characters needed characters exceeded
• Former Member
Oct 11, 2007 at 02:29 PM

Satya,

I am not sure about the limit to the number of fields in an internal table.

One thing I can say... size does matter means the total number of records does matter I guess means the size of the data.

I think you can easily create the internal table with 150 fields, it should work

I will suggest you to creat the dynamic internal table instead of direct internal table with 150 fields.

10|10000 characters needed characters exceeded
• Former Member
Oct 11, 2007 at 02:45 PM

Hi,

there is no limit to the number of fields in a structure and hence no limit to no-of field in an int table.

How ever just FYI maximum number of key fields in a table is 16

10|10000 characters needed characters exceeded
• Former Member
Oct 12, 2007 at 03:37 AM

Hi Satya,

There is no limit to no-of field in an internal table.

Reward if useful.

Regards,

Chitra

10|10000 characters needed characters exceeded
• Former Member
Oct 12, 2007 at 06:54 AM

Hi Satya,

I am not about the limit of internal table.

As per my knowledge the best way to declare the internal table is first declare the types then the internal table.

Types declaration:

EX: Types : begin of ty_table,

Pernr type pernsno,

Begda tye begda,

Endda type endda,

End ot ty_table.

Internal table declaration:

Data : i_table type standard table of ty_table.

Above you can use standard table or sorted table or hashed table.

Performance wise hashed table is good then sorted and standard.

Its all depends on your data in internal table. Please let me know if you need any information.

Regards,

Ramakrishna kotha.