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

Unable to resolve the exception READ_REPORT_LINE_TOO_LONG in Abap program.

Hi,

I am getting the exception READ_REPORT_LINE_TOO_LONG in my abap program.Given below is the full analysis of the exception and then the program code :-

Error Analysis :-

-


An exception occurred that is explained in detail below.

The exception, which is assigned to class 'CX_SY_READ_SRC_LINE_TOO_LONG', was

not caught in

procedure "K_KKB_FIELDCAT_MERGE" "(FUNCTION)", nor was it propagated by a

RAISING clause.

Since the caller of the procedure could not have anticipated that the

exception would occur, the current program is terminated.

The reason for the exception is:

There was an attempt to read program "ZANI_TEST_INTERACTIVE_ALV" from the

database.

The READ REPORT statement allows you to copy a program text into an

internal table. The occupied line length in the program text must not

exceed the width of the internal table.

The internal table "\FUNCTION=K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" is 72

characters wide. The program line is

91 characters wide.

-


Program Code :-

-


&----


*& Report ZANI_TEST_INTERACTIVE_ALV

*&

&----


*&

*&

&----


REPORT ZANI_TEST_INTERACTIVE_ALV.

TABLES: LFA1.

TYPE-POOLS: slis.

DATA: it_lfa1 TYPE TABLE OF lfa1,

wa_lfa1 TYPE lfa1,

it_fieldcat TYPE slis_t_fieldcat_alv.

SELECTION-SCREEN BEGIN OF BLOCK input WITH FRAME TITLE input.

SELECT-OPTIONS: acc_no FOR LFA1-LIFNR.

SELECTION-SCREEN END OF BLOCK input.

START-OF-SELECTION.

IF NOT acc_no IS INITIAL.

SELECT * FROM LFA1

INTO CORRESPONDING FIELDS OF TABLE it_lfa1

WHERE LIFNR IN acc_no.

ELSE.

SELECT * FROM LFA1

INTO CORRESPONDING FIELDS OF TABLE it_lfa1.

ENDIF.

PERFORM form_build_fieldcatalog USING 'IT_LFA1' CHANGING it_fieldcat.

PERFORM form_display_alv USING it_lfa1 it_fieldcat.

&----


*& Form form_build_fieldcatalog

&----


  • text

----


  • -->P_0058 text

  • <--P_IT_FIELDCAT text

----


form form_build_fieldcatalog using p_it_tabname TYPE slis_tabname

changing p_it_fieldcat TYPE slis_t_fieldcat_alv.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = sy-repid

I_INTERNAL_TABNAME = p_it_tabname

  • I_STRUCTURE_NAME =

  • I_CLIENT_NEVER_DISPLAY = 'X'

I_INCLNAME = sy-repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = p_it_fieldcat

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.

endform. " form_build_fieldcatalog

&----


*& Form form_display_alv

&----


  • text

----


  • -->P_IT_LFA1 text

----


form form_display_alv using p_it_lfa1 LIKE it_lfa1 p_it_fieldcat TYPE slis_t_fieldcat_alv.

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 = '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 =

IT_FIELDCAT = P_it_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 =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_HTML_HEIGHT_TOP = 0

  • I_HTML_HEIGHT_END = 0

  • IT_ALV_GRAPHICS =

  • IT_HYPERLINK =

  • IT_ADD_FIELDCAT =

  • IT_EXCEPT_QINFO =

  • IR_SALV_FULLSCREEN_ADAPTER =

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

t_outtab = p_it_lfa1

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.

endform. " form_display_alv

-


Please suggest a solution for this problem.. Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 12:25 PM

    Hi,

    I'm not sure whether this will help you or not, but as try you can do this.

    In ABAP Editor->Utilities->Settings->Editor->Check the check box 'Downward-compatible Lne lngth(72).

    Regards,

    Manoj Kumar P

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 07:40 AM

    Hi

    I think the number of characters used per line is more than 72.

    Please change the same using setting

    Regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 07:59 AM

    hi,

    it is getting because of fieldcat hear ur internal table is having all fields in lfa1, lfa1 is having more fileds alv cont display that much fields at a time . for that u are getting that messgae . u can solve this problem by filling fieldcat table manuvally insted of by FM 'fieldcat_merge'. fill filedcat table some fields which are need to display by manuvally.

    thanq,

    rajesh.k

    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.