Skip to Content
avatar image
Former Member

Named includes for ALV

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 16, 2008 at 05:23 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 05:23 AM

    Hi,

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

    Ex :

    it_book like standard table of wa_sbook.

    Regards,

    Pramod

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2008 at 05:25 AM

    Thanks for the hint, problem solved.

    Add comment
    10|10000 characters needed characters exceeded