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

Function module to find the columns in Internal table

Former Member
0 Likes
2,074

Hi Group,

Is there any function module which displays the columns of the internal table. I guess there is one cos when we debug any program and select the "Tables" button while debugging and enter an internal table and then do a "Find" the pop up which comes up shows the internal table columns. As this functionality is in the debugger which I cannot debug hence was wondering if some one has come across any such function module. Thanks in advance.

Regards,

Ankur Bhandari

[email protected]

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
1,354

Hi,

try that:

DATA:

my_data TYPE bsik,

descr_ref TYPE REF TO cl_abap_structdescr.

descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).

LOOP AT descr_ref->components ASSIGNING <comp_wa>.

...

Andreas

Hi,

try that:

DATA:

my_data TYPE bsik,

descr_ref TYPE REF TO cl_abap_structdescr.

descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).

LOOP AT descr_ref->components ASSIGNING <comp_wa>.

...

Andreas

7 REPLIES 7
Read only

Former Member
0 Likes
1,354

Hi Ankur,

1. GET_COMPONENT_LIST

Use the above FM.

It works fantastic.

Regards,

Amit M.

Read only

0 Likes
1,354

Hi again,

1. In the above FM

Pass Program as SY-REPID (U cann pass other prg name also)

in FieldName Pass the name of the internal table

eg. 'ITAB'

2. This FM will give u the details of the

internal table.

The u can display the COMPONENTS table

using ALV or anyother method u like.

Regards,

Amit M.

Read only

andreas_mann3
Active Contributor
0 Likes
1,355

Hi,

try that:

DATA:

my_data TYPE bsik,

descr_ref TYPE REF TO cl_abap_structdescr.

descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).

LOOP AT descr_ref->components ASSIGNING <comp_wa>.

...

Andreas

Read only

Former Member
0 Likes
1,354

Hi,

Try with HRHAP_NUMBER_OF_DISP_COLS_GET

Thanks

Eswar

Read only

0 Likes
1,354

Thanks, But can some one tell me which is the function module which the abap debugger uses to display the internal table columns while debugging.

Ankur Bhandari

Read only

Former Member
0 Likes
1,354

Hi again,

1. I am not sure, but the abap debugger

uses system C functions

(and not a normal function module)

for such purpose.

Please award points to helpful answers.

Regards,

Amit M.

Read only

0 Likes
1,354

I would like to know whether it is a function module or a c function, If C function then what it is? Cos this is exactly what I am trying to achieve, I tried understanding the ABAP debugger program SAPMSSY3 screeb no 142 , couldn't see where is the coding done when we press the button find it has the Status as "TAAB" but couldn't see the code. Any help will be appreciated.

Ankur Bhandari