Application Development 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: 

runtime error - question for experts

Former Member
0 Kudos

hello experts,

I was trying to debug a program for unicode compatibility, and when I finally thought I had finished it.

This runtime error shows up

"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 "ZPM04_UPDATE_INFOREC_FROM_PO" 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

| 78 characters wide."

because the error occured in standard SAP programs, I am at loss..

Please give your suggestions.

Goldie.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

This is a known problem with the ALV functionality - SAP hasn't yet updated the logic that parses out the list of fields and lengths from your source code so that it can work with source code lines > 72 bytes. For this reason, I have my ABAP editor setting with the "Downward-Compartible Lne lngth(72)" ticked... change your setting, resave / activate the program and try running it again.

Jonathan

15 REPLIES 15

uwe_schieferstein
Active Contributor
0 Kudos

Hello Goldie

The error occured in a standard program yet the read source code (ZPM04_...) should be a customer program.

The reason for the error is clear: at least a single line of the coding exceeds the maximum of 72 characters per line.

Regards,

Uwe

Former Member
0 Kudos

Hi Goldie,

for quite some time now, sap has dismissed the former line length restriction and even standard programs, sometimes make use of it.

Just try to avoid the error by stating your internal table lines as string, or at least make them char128. That should do it.

Regards

JW

0 Kudos

Hi,

the error occured at this line in program 'SAPLSKBH'.

read report l_prog_tab_local into l_abap_source

where

l_prog_tab_local like sy-repid occurs 10 with header line.

l_abap_source like rssource occurs 0 with header line.

this func module is being called through 'reuse_alv_grid_display'.

I cant figure out how to change my program so that l_prog_tab_local is 72 char wide

goldie

0 Kudos

Since it's a standard SAP program, have you looked for SAP notes?

Rob

0 Kudos

I feel foolish asking this.

But how do i do that?

Former Member
0 Kudos

It is a long shot but try this. Go to SE38, enter the program name ZPM04_UPDATE_INFOREC_FROM_PO and click change. Then in the menu, "Utilities-->Settings", under the editor tab, check the box 'Downwards-Comp. Line Lngth(72) and activate the program.

Then check the unicode compatibility aspect now.

Former Member
0 Kudos

This is a known problem with the ALV functionality - SAP hasn't yet updated the logic that parses out the list of fields and lengths from your source code so that it can work with source code lines > 72 bytes. For this reason, I have my ABAP editor setting with the "Downward-Compartible Lne lngth(72)" ticked... change your setting, resave / activate the program and try running it again.

Jonathan

0 Kudos

I tried it didnt work. still the same result.

I tried to see this aspect in the standard prog 'SAPLSBKH' and it was already set there.

I tried to change it and got this message.

" When reading the source code, the system discovered that it contains lines whose length exceeds the set length (see the function 'Settings in the Editor). Here you can choose between automatic linebreak and reading without linebreak. In the latter case, the maximum possible line length is assumed. "

The problem is I cant find the tab settings in editor anywhere nor can I find the automatic line break.

Do u have any idea abt this?

0 Kudos

You need to Change the setting in the program ZPM04_UPDATE_INFOREC_FROM_PO, not in the program SAPLSBKH.

SAPLSBKH read the Report ZPM04_UPDATE_INFOREC_FROM_PO and it gets error because some lines in the ZPM04_UPDATE_INFOREC_FROM_PO are longer than 72 characters.

As suggested by other SDN members you have to follow this steps:

Go to SE38.

Enter ZPM04_UPDATE_INFOREC_FROM_PO and change.

Utilities > Setting

In the Editor Tab, set the checkbox "Downword Compatilbe line Length (72)". You can find out this checkbox in the last section of the Editor tab.

Press Enter.

In the Pop-Up, Say "YES" for the line breaks.

Regards,

Naimesh Patel

0 Kudos

I am not getting any pop-up when I save the settings in change mode.

But if i do it in display mode the pop-up shows up.

but it pop up doesnt show any thing.

its the same when i hit f1 help.

can you please tell me what is displayed in the pop-up.

do i have to select anything before saving it?

0 Kudos

The Popup says like this"

"Source code contains lines that exceed the set line

length.

Insert line break?

- YES - NO - INFO - Cancle

"

If you have the radiobutton "Back-End Editor", Select it also along with the "Downword compatible line length(72)" and save it.

if you got the pop, than you can come back to setting and reselect the "Front-End Editor".

Regards,

Naimesh Patel

0 Kudos

Hi

Just as some guys has said you, you can do only one thing, change your Z-PROGRAM in order to make sure every line of the code is not longer than 72 char.

In this moment I'm working on 4.6C, but I believe you can set your editor in order to arrange your code.

Max

0 Kudos

it still isnt working naimesh.

This program was actually written by somebody else.

I am modifying it.

DO you think its not working because of that?

0 Kudos

hi max,

what i understand is.. I have to truncate my code lines to 72.

but my question is will the error throw up even for commented lines?

0 Kudos

Thank you all guys.

I finally found the code which was exceeding the 72 char limit and manually trucated it.

thanks for all your help.