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

Deep structured Internal table in ALV

Former Member
0 Likes
629

Hi All.

I have a table which has got some more tables in it.

For eg, one particular applicant can have taken 5 subjects at a level, 3 at another level and so on.

I want to show this data in ALV.

Is it possible? If so, how do I make the field catalog?

Table would be something like this :

begin of itab occurs 0,

field1 type c,

field2 type c,

deep_1 type table of ws1,

deep_2 type table of ws2,

field3 type c,

end of itab.

Please assist.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
538

Hi Aishi,

U can try using Heirarchial or tree display in ALV.

Regards,

Madhavi

Hi All.

I have a table which has got some more tables in it.

For eg, one particular applicant can have taken 5 subjects at a level, 3 at another level and so on.

I want to show this data in ALV.

Is it possible? If so, how do I make the field catalog?

Table would be something like this :

begin of itab occurs 0,

field1 type c,

field2 type c,

deep_1 type table of ws1,

deep_2 type table of ws2,

field3 type c,

end of itab.

Please assist.

2 REPLIES 2
Read only

Former Member
0 Likes
539

Hi Aishi,

U can try using Heirarchial or tree display in ALV.

Regards,

Madhavi

Read only

former_member537489
Participant
0 Likes
538

Dear Aishi,

I have encountered a similar problem and im giiving you my solution:

I want to show this table which has 2 deep structures:

data : begin of itab_disp occurs 0.

data : num_belnr like sy-tabix.

include structure bbkpf as a.

include structure bbseg as b RENAMING WITH SUFFIX _.

data : box.

data : processed.

data : end of itab_disp.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = GD_REPID

I_INTERNAL_TABNAME = 'ITAB_DISP'

I_INCLNAME = GD_REPID

CHANGING

CT_FIELDCAT = LT_FIELDCAT.

data : w type slis_fieldcat_alv.

loop at LT_FIELDCAT into w.

if w-COL_POS > n . " >= 32.

concatenate w-FIELDNAME '_' into w-FIELDNAME.

condense w-FIELDNAME.

else.

endif.

modify LT_FIELDCAT from w.

endloop.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

I_CALLBACK_PROGRAM = GD_REPID

I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

I_CALLBACK_PF_STATUS_SET = 'PF_STATUS_SET2'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

IS_LAYOUT = GD_LAYOUT

IT_FIELDCAT = LT_FIELDCAT

I_SAVE = 'A'

is_variant = vari

TABLES

T_OUTTAB = ITAB_DISP.

Please let me know if it helped..

Roxani