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

ALV Reporting

Hi,

This is sandeep..

i am trying to work on ALV's by using REUSE_ALV_FIELDCATALOG_MERGE and REUSE_ALV_GRID_DISPLAY...i am getting dump in my program..

The details of Error is..,

Runtime Errors: READ_REPORT_LINE_TOO_LONG

Exception: CX_SY_READ_SRC_LINE_TOO_LONG

Short Text:

The ABAP program lines are wider than the internal table.

Module Name: K_KKB_FIELDCAT_MERGE

LineNo: 365

SourceCode: <u>Read report l_prog_tab_local into l_abap_source.</u>

Please help me on this issue...

below i am giving the code...

TABLES: MARA.

TYPE-POOLS:SLIS.

DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

data gs_layout type slis_layout_alv.

DATA V_REPID TYPE SY-REPID.

DATA: BEGIN OF I_MARA OCCURS 0,

MATNR LIKE MARA-MATNR,

MATKL LIKE MARA-MATKL,

MTART LIKE MARA-MTART,

END OF I_MARA.

SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

V_REPID = SY-REPID.

SELECT MATNR MATKL MTART FROM MARA INTO TABLE I_MARA WHERE MATNR IN S_MATNR.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = V_REPID

I_INTERNAL_TABNAME = 'I_MARA'

I_INCLNAME = V_REPID

CHANGING

CT_FIELDCAT = I_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = V_REPID

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND =

  • I_CALLBACK_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

  • I_BACKGROUND_ID = ' '

  • I_GRID_TITLE =

  • I_GRID_SETTINGS =

IS_LAYOUT = gs_layout

IT_FIELDCAT = I_FIELDCAT

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

  • IT_SORT =

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

  • IT_EVENTS =

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = I_MARA.

Thanks & Regards,

Sandeep.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 10:28 AM

    hi,

    now check it

    TABLES: MARA.

    TYPE-POOLS:SLIS.

    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.

    data gs_layout type slis_layout_alv.

    DATA V_REPID TYPE SY-REPID.

    DATA: BEGIN OF I_MARA OCCURS 0,

    MATNR LIKE MARA-MATNR,

    MATKL LIKE MARA-MATKL,

    MTART LIKE MARA-MTART,

    END OF I_MARA.

    SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.

    V_REPID = SY-REPID.

    SELECT MATNR MATKL MTART FROM MARA INTO TABLE I_MARA WHERE MATNR IN

    S_MATNR.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = V_REPID

    I_INTERNAL_TABNAME = 'I_MARA'

    I_INCLNAME = V_REPID

    CHANGING

    CT_FIELDCAT = I_FIELDCAT.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER = ' '

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    • I_CALLBACK_PF_STATUS_SET = ' '

    • I_CALLBACK_USER_COMMAND =

    • I_CALLBACK_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_END_OF_LIST = ' '

    • I_STRUCTURE_NAME =

    • I_BACKGROUND_ID = ' '

    • I_GRID_TITLE =

    • I_GRID_SETTINGS =

    IS_LAYOUT = gs_layout

    <b>IT_FIELDCAT = I_FIELDCAT[]</b>

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    • I_SAVE = ' '

    • IS_VARIANT =

    • IT_EVENTS =

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    <b>T_OUTTAB = I_MARA[].</b>

    regards

    ASHOK KUMAR

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 10:28 AM

    hi sandeep,

    just split the select query u have written.

    this is bcoz of the length of the report

    SELECT MATNR MATKL MTART

    FROM MARA

    INTO TABLE I_MARA

    WHERE MATNR IN S_MATNR.

    Regards,

    Padma.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 12, 2007 at 10:28 AM

    hi,

    check this example change code like this.

    &----


    *& Report ZSR_ALV_GRID

    *&

    &----


    *&

    *&

    &----


    REPORT ZSR_ALV_GRID.

    &----


    *& declaratin of table *

    *& *

    &----


    TABLES : lfa1.

    &----


    • declaraing selectoptions *

    &----


    SELECT-OPTIONS : s_lifnr FOR lfa1-lifnr.

    &----


    • declaraing internal table *

    &----


    DATA : BEGIN OF itab OCCURS 0,

    lifnr LIKE lfa1-lifnr,

    land1 LIKE lfa1-land1,

    name1 LIKE lfa1-name1,

    END OF itab.

    &----


    • declaraing TYPEPOLL SLIS *

    &----


    TYPE-POOLS : slis.

    DATA : b_lfa1 TYPE slis_t_fieldcat_alv,

    w_lfa1 TYPE slis_fieldcat_alv.

    START-OF-SELECTION.

    &----


    • retrieving data from lfa1*

    &----


    SELECT lifnr

    land1

    name1

    FROM lfa1

    INTO TABLE itab

    WHERE lifnr IN s_lifnr.

    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

    EXPORTING

    I_PROGRAM_NAME = SY-REPID

    I_STRUCTURE_NAME = 'LFA1'

      • I_CLIENT_NEVER_DISPLAY = 'X'

      • I_INCLNAME =

      • I_BYPASSING_BUFFER =

      • I_BUFFER_ACTIVE =

      CHANGING

      ct_fieldcat = B_LFA1

        • EXCEPTIONS

        • INCONSISTENT_INTERFACE = 1

        • PROGRAM_ERROR = 2

        • OTHERS = 3

        .IF sy-subrc <> 0.

          • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

          • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

          ENDIF.

          &----


          • calling fn modlue alv_list_display

          &----


          CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

          EXPORTING

          • I_INTERFACE_CHECK = ' '

          • I_BYPASSING_BUFFER = ' '

          • I_BUFFER_ACTIVE = ' '

          i_callback_program = sy-repid

          • I_CALLBACK_PF_STATUS_SET = ' '

          • I_CALLBACK_USER_COMMAND = ' '

          • I_CALLBACK_TOP_OF_PAGE = ' '

          • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

          • I_CALLBACK_HTML_END_OF_LIST = ' '

          • I_STRUCTURE_NAME = 'lfa1'

          • I_BACKGROUND_ID = ' '

          • I_GRID_TITLE =

          • I_GRID_SETTINGS =

          • IS_LAYOUT =

          it_fieldcat = b_lfa1

          TABLES

          t_outtab = itab

          EXCEPTIONS

          program_error = 1

          OTHERS = 2

          .

          IF sy-subrc <> 0.

          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

          ENDIF.

          Add a comment
          10|10000 characters needed characters exceeded

        • author's profile photo Former Member
          Former Member
          Posted on Jul 12, 2007 at 10:33 AM

          Hi

          change:

          <b>SELECT MATNR MATKL MTART FROM MARA INTO TABLE I_MARA WHERE MATNR IN S_MATNR.</b>

          into

          <b>SELECT MATNR MATKL MTART FROM MARA

          INTO TABLE I_MARA WHERE MATNR IN S_MATNR.</b>

          because the line has more than 72 char

          Regards, Dieter

          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.