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

internal table

Former Member
0 Likes
441

If we use TYPE any ,when declaring an internal table,then can we use it for the sorted table?if yes then how?

4 REPLIES 4
Read only

Former Member
0 Likes
421

Hi,

No you cant do that.

Read only

Former Member
0 Likes
421

hi,

u can do that ,but u can access the table with key access

as index acces is not allowed.

ANY TABLE

For creating a fully-generic table type.

The generic type ANY TABLE can represent any table. You can pass tables of all three types to field symbols and interface parameters defined in this way. However, these field symbols and parameters will then only allow operations that are possible for all tables, that is, index operations are not allowed

regards,

sharad.

follow link

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm

Edited by: sharad narayan on Apr 18, 2008 11:21 AM

Edited by: sharad narayan on Apr 18, 2008 11:24 AM

Read only

Former Member
0 Likes
421

Hi ritwik,

U cannot use type any for an internal table.

U should always type refrence a structure for an internal table

or else u can type refrence to a table type also.

Eg:

Consider u hav a structure ty_Struct.

u can refrence an iternal table lik this:

Data: i_tab type standard table of ty_struct.

Or create a table type and ref it.

Eg:

data: ty_tab_struct type standard table of ty_struct.

data: i_tab type ty_tab_struct.

Thanx,

Navin.

Read only

prasanth_kasturi
Active Contributor
0 Likes
421

hi,

we can use type any for field symbols and formal parameters

regards

prasanth