Application Development and Automation 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: 
Read only

Error with the FIELD CAT function module.

Former Member
0 Likes
1,230

Hi folks,

This was the error message i had got from the FIELDCAT function module.

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 "/A1SSPC/ITP_SCH_REP" 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=???" is 72 characters

wide. The program line is

204 characters wide.

Reg,

Hariharan

6 REPLIES 6
Read only

Former Member
0 Likes
1,003

Hi

Check your internal table is having the same number of fields compared to the structure

refer this thread

Regards

shiva

Read only

Former Member
0 Likes
1,003

HI,

thanks for your reply,

what the syntax for dividing a line in ABAP.

Reg,

Hariharn

Read only

0 Likes
1,003

Hi

Change the settings in SE38 utilities->settings->select checkbox

line 72 something

regards

Shiva

Read only

Former Member
0 Likes
1,003

Hariharan Natarajan

The problem is when you use the Function

REUSE_ALV_FIELDCATALOG_MERGE to populate the fieldcatalog. all the lines of the code should be 72 chars.

even if you have comments or any thing..Decrease the Lines which are above 72 chars.

READ TABLE >>>..............................................................more than 72 chars then break it into 2 lines.

and if you have comment lines more than 72 chars rreduce them to 72 chars.

Read only

Former Member
0 Likes
1,003

Hi Folks,

i had declared the internal table as this,

TABLES: /A1SSPC/ITP_SEL,

/A1SSPC/ITP_SYSD.

data: WA_A1SSPC_ITP_SYSD type /A1SSPC/ITP_SYSD,

IT_A1SSPC_ITP_SYSD TYPE STANDARD TABLE OF

/A1SSPC/ITP_SYSD.

we are suppose to give the occurs 0 here for the FELDCAT Function module.

Reg,

hariharan

Read only

0 Likes
1,003

You can do this

TYPE-POOLS:slis.
DATA: it_vabp TYPE STANDARD TABLE OF vbap WITH HEADER LINE.

DATA: it_fieldcat TYPE slis_t_fieldcat_alv.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
 EXPORTING
   i_program_name               = sy-repid
   i_internal_tabname           = 'IT_VBAP'
   i_inclname                   = sy-repid
  CHANGING
    ct_fieldcat                  = it_fieldcat
* EXCEPTIONS
*   INCONSISTENT_INTERFACE       = 1
*   PROGRAM_ERROR                = 2
          .