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: 

Named includes for ALV

Former Member
0 Kudos

Hi, I'm trying to pass an internal table for display using ALV, something like the following:


CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    i_callback_program = g_repid
    it_fieldcat        = gt_fieldcat[]
  TABLES
    t_outtab           = it_sbook.

I tried to declare it_sbook using a named include like below, but it didn't work. I got the error "Field symbol has not yet been assigned".


DATA:
  BEGIN OF wa_sbook.
    INCLUDE TYPE sbook.
    DATA: phone(10) TYPE p,
  END OF wa_sbook,
  it_sbook LIKE TABLE OF wa_sbook.

Is there a particular reason for this?

Thanks.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

show the Fieldcatalog population logic, the error is from there..., if you type the fieldname wrongly, if you use small letters for fieldname/tablename then you will get the error.

3 REPLIES 3

Former Member
0 Kudos

Hi,

You should mention the tables type : Whether standad, hashed, sorted etc..

Ex :

it_book like standard table of wa_sbook.

Regards,

Pramod

former_member188685
Active Contributor
0 Kudos

show the Fieldcatalog population logic, the error is from there..., if you type the fieldname wrongly, if you use small letters for fieldname/tablename then you will get the error.

Former Member
0 Kudos

Thanks for the hint, problem solved.