01-08-2008 7:43 PM
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.
01-09-2008 2:32 AM
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
01-08-2008 7:47 PM
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
01-08-2008 8:26 PM
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
01-08-2008 9:13 PM
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
01-08-2008 9:21 PM
Since it's a standard SAP program, have you looked for SAP notes?
Rob
01-08-2008 9:23 PM
01-08-2008 9:45 PM
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.
01-09-2008 2:32 AM
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
01-09-2008 3:12 PM
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?
01-09-2008 3:28 PM
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
01-09-2008 3:37 PM
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?
01-09-2008 3:44 PM
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
01-09-2008 3:45 PM
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
01-09-2008 3:54 PM
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?
01-09-2008 4:55 PM
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?
01-09-2008 5:35 PM
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.