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

Counting Columns in a Structure or Table?

Former Member
0 Likes
2,831

HI,

can any one tell me the best way to count the number of Columns a structure or internal table has.

Thanks

C

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,073

Hi,

Try using the describe field type s_struc components n..

data: begin of s_struc,

field1,

field2,

end of s_struc.

data: v_int type int4.

describe field s_struc type s_struc components v_int.

write: / v_int.

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

HI,

can any one tell me the best way to count the number of Columns a structure or internal table has.

Thanks

C

1 REPLY 1
Read only

Former Member
0 Likes
1,074

Hi,

Try using the describe field type s_struc components n..

data: begin of s_struc,

field1,

field2,

end of s_struc.

data: v_int type int4.

describe field s_struc type s_struc components v_int.

write: / v_int.

Thanks,

Naren

Message was edited by: Narendran Muthukumaran