Skip to Content
author's profile photo Former Member
Former Member

Problem with Field catalog

Guys, Please help me.. I have been breaking my head with this...! The fieldcatalog is not getting populated. Please help me.

REPORT ztest.

TYPE-POOLS: slis.

DATA: lt_fcat TYPE slis_t_fieldcat_alv.

DATA: BEGIN OF gt_log OCCURS 0,

vbeln LIKE vbbe-vbeln,

posnr LIKE vbbe-posnr,

message TYPE bapi_msg,

color_line(4),

END OF gt_log.

*Definition of local variables for Field catalog

DATA: lv_program_name LIKE sy-repid,

lv_internal_tabname TYPE slis_tabname. "Internal table for ALV

lv_program_name = sy-repid.

lv_internal_tabname = 'GT_LOG'.

*Field Catalog

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = lv_program_name

i_internal_tabname = lv_internal_tabname

CHANGING

ct_fieldcat = lt_fcat

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 04:49 PM

    Hi Friend,

    Looking at your code, I found that you have not the fieldcatalog at all.

    You need to fill the fieldcatalog with all the fields you want to display in the alv.

    Check the following links regarding field catalog:

    http://abap-gallery.blogspot.com/2007/07/field-catalog-in-alv.html

    Check this link for sample program:

    http://www.saptechnical.com/Tutorials/ALV/SampleALVGridProgram.htm

    Hope this helps you.

    Any queries, get back to me.

    Regards,

    Chandra Sekhar

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dude.. stop advertising your website links here.

      The function module was supposed to populate the field catalog based on the Internal table, But some how it's not working.. any one else... please help me.

  • Posted on Jul 08, 2008 at 04:52 PM

    Make sure to pass the I_INCLNAME as well.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = lv_program_name
        i_internal_tabname     = lv_internal_tabname
        i_inclname             = lv_program_name    "<--- Here
        i_bypassing_buffer     = 'X'

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 08, 2008 at 05:02 PM

    Answered

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.