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: 

Fields in internal table

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.)

5 REPLIES 5

Former Member
0 Kudos

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.)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Satya,

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

Reward if useful.

Regards,

Chitra

Former Member
0 Kudos

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.