2007 Mar 02 8:49 AM
i have written a report using ALV but its giving me the following dump:
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_READ_SRC_LINE_TOO_LONG'
was neither
caught nor passed along using a RAISING clause, in the procedure
"K_KKB_FIELDCAT_MERGE" "(FUNCTION)"
.
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
You tried to read the program "ZSEARCH_ZDIPCOPY" from the database. The READ
REPORT
statement allows you to copy a program's source code into an internal
table. The lines of source code must not be longer than the width of the
internal table. The internal table is 72 characters wide. The source
and here is the program
REPORT zsearch_zdip LINE-SIZE 400 NO STANDARD PAGE HEADING.
TABLES: zdiplomatic.
TYPE-POOLS: slis.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
DATA: BEGIN OF itab_zdip OCCURS 0,
rbtno LIKE zdiplomatic-rbtno, "rebate number
clr_dat LIKE zdiplomatic-clr_dat, "date of importation
exp_date LIKE zdiplomatic-exp_date, "expiry date
name1 LIKE zdiplomatic-name1, "full name
fax LIKE zdiplomatic-fax, "zim diplomatic id number
hse_num LIKE zdiplomatic-hse_num, "house number
street LIKE zdiplomatic-street, "street
city LIKE zdiplomatic-city, "city
make LIKE zdiplomatic-make, "vehicle make
model LIKE zdiplomatic-model, "vehicle model
reg_num LIKE zdiplomatic-reg_num, "reg num
chassis LIKE zdiplomatic-chassis, "chassis
engine_snr LIKE zdiplomatic-engine_snr,"engine number
station LIKE zdiplomatic-st_nam, "station
officer LIKE zdiplomatic-officer, "officer
END OF itab_zdip.
DATA WA_zdip LIKE STANDARD TABLE OF itab_zdip WITH HEADER LINE.
TOP-OF-PAGE.
FORMAT COLOR COL_NORMAL.
WRITE: 'Z I M B A B W E R E V E N U E A U T H O R I T Y'.
WRITE: / 'D I P L O M A T I C R E B A T E S E A R C H R E S U L T S'.
FORMAT COLOR OFF.
ULINE.
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK bli WITH FRAME TITLE text-bli.
SELECT-OPTIONS: name1 FOR zdiplomatic-name1,
clr_dat FOR zdiplomatic-clr_dat,
exp_date FOR zdiplomatic-exp_date,
fax FOR zdiplomatic-fax,
reg_num FOR zdiplomatic-reg_num,
chassis FOR zdiplomatic-chassis,
make FOR zdiplomatic-make,
model FOR zdiplomatic-model,
st_nam FOR zdiplomatic-st_nam,
officer FOR zdiplomatic-officer,
eng_snr FOR zdiplomatic-engine_snr.
SELECTION-SCREEN END OF BLOCK bli.
SELECT rbtno "rebate number
clr_dat "date of importation
exp_date "expiry date
name1 "full name
fax "zim diplomatic id number
hse_num "house number
street "street
city "city
make "vehicle make
model "vehicle model
reg_num "reg num
chassis "chassis
engine_snr "engine number
st_nam "station
officer "officer
FROM zdiplomatic INTO CORRESPONDING FIELDS OF TABLE WA_zdip
WHERE name1 IN name1.
IF sy-subrc NE 0.
WRITE / 'No Information found for the corresponding selection criteria!' COLOR COL_NEGATIVE.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'ITAB_ZDIP'
i_inclname = v_repid
CHANGING
ct_fieldcat = gt_fieldcat.
Pass the program.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = gt_fieldcat
TABLES
t_outtab = WA_zdip.
what is wrong with the program?
i have written a report using ALV but its giving me the following dump:
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_READ_SRC_LINE_TOO_LONG'
was neither
caught nor passed along using a RAISING clause, in the procedure
"K_KKB_FIELDCAT_MERGE" "(FUNCTION)"
.
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
You tried to read the program "ZSEARCH_ZDIPCOPY" from the database. The READ
REPORT
statement allows you to copy a program's source code into an internal
table. The lines of source code must not be longer than the width of the
internal table. The internal table is 72 characters wide. The source
and here is the program
REPORT zsearch_zdip LINE-SIZE 400 NO STANDARD PAGE HEADING.
TABLES: zdiplomatic.
TYPE-POOLS: slis.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
DATA: BEGIN OF itab_zdip OCCURS 0,
rbtno LIKE zdiplomatic-rbtno, "rebate number
clr_dat LIKE zdiplomatic-clr_dat, "date of importation
exp_date LIKE zdiplomatic-exp_date, "expiry date
name1 LIKE zdiplomatic-name1, "full name
fax LIKE zdiplomatic-fax, "zim diplomatic id number
hse_num LIKE zdiplomatic-hse_num, "house number
street LIKE zdiplomatic-street, "street
city LIKE zdiplomatic-city, "city
make LIKE zdiplomatic-make, "vehicle make
model LIKE zdiplomatic-model, "vehicle model
reg_num LIKE zdiplomatic-reg_num, "reg num
chassis LIKE zdiplomatic-chassis, "chassis
engine_snr LIKE zdiplomatic-engine_snr,"engine number
station LIKE zdiplomatic-st_nam, "station
officer LIKE zdiplomatic-officer, "officer
END OF itab_zdip.
DATA WA_zdip LIKE STANDARD TABLE OF itab_zdip WITH HEADER LINE.
TOP-OF-PAGE.
FORMAT COLOR COL_NORMAL.
WRITE: 'Z I M B A B W E R E V E N U E A U T H O R I T Y'.
WRITE: / 'D I P L O M A T I C R E B A T E S E A R C H R E S U L T S'.
FORMAT COLOR OFF.
ULINE.
START-OF-SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK bli WITH FRAME TITLE text-bli.
SELECT-OPTIONS: name1 FOR zdiplomatic-name1,
clr_dat FOR zdiplomatic-clr_dat,
exp_date FOR zdiplomatic-exp_date,
fax FOR zdiplomatic-fax,
reg_num FOR zdiplomatic-reg_num,
chassis FOR zdiplomatic-chassis,
make FOR zdiplomatic-make,
model FOR zdiplomatic-model,
st_nam FOR zdiplomatic-st_nam,
officer FOR zdiplomatic-officer,
eng_snr FOR zdiplomatic-engine_snr.
SELECTION-SCREEN END OF BLOCK bli.
SELECT rbtno "rebate number
clr_dat "date of importation
exp_date "expiry date
name1 "full name
fax "zim diplomatic id number
hse_num "house number
street "street
city "city
make "vehicle make
model "vehicle model
reg_num "reg num
chassis "chassis
engine_snr "engine number
st_nam "station
officer "officer
FROM zdiplomatic INTO CORRESPONDING FIELDS OF TABLE WA_zdip
WHERE name1 IN name1.
IF sy-subrc NE 0.
WRITE / 'No Information found for the corresponding selection criteria!' COLOR COL_NEGATIVE.
ENDIF.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'ITAB_ZDIP'
i_inclname = v_repid
CHANGING
ct_fieldcat = gt_fieldcat.
Pass the program.
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = gt_fieldcat
TABLES
t_outtab = WA_zdip.
what is wrong with the program?
2007 Mar 02 8:54 AM
You tried to read the program "ZSEARCH_ZDIP" from the database. The READ
REPORT
statement allows you to copy a program's source code into an internal
table. The lines of source code must not be longer than the width of the
internal table. The internal table is 72 characters wide.
this is the probelm in ur program...
In the read report statement it can read a report line by line and stores that in the internal table line by line.. If any line contains more than 72 characters it goes for a dump..
so make sure that the all the lines in the source code of the program ZSEARCH_ZDIPCOPY should not exceed 72 chars..
( including the commenting lines also.. ).
in read report it uses a variable w_line(72) ... so it gives dump when more than 72 chars are there in ur line..
reward if it hepls u...
sai ramesh.
2007 Mar 02 9:53 AM
2007 Mar 02 10:00 AM
how or where do i manipulate column headers in ALV. i need to change the headers that coming out
2007 Mar 02 10:04 AM
Please share the problem with us , what was the problem,
to change the headers
loop at it_fieldcat into wa_fieldcat.
case wa_fieldcat-fieldname.
when 'FIELD1'.
wa_fieldcat-seltext_m = 'Field 1'.
modify it_fieldcat from wa_fieldcat.
when 'FIELD2'.
wa_fieldcat-seltext_m = 'Field 2'.
modify it_fieldcat from wa_fieldcat.
endcase.
endloop.
2007 Mar 02 8:54 AM
Hi Willard,
Use TYPE instead of LIKE in your internal table field declarations.
Regards,
Ravi
2007 Mar 02 8:55 AM
change the declaration
DATA: v_repid TYPE syrepid.
to
DATA: v_repid <b>like sy-repid</b>.
and also assign the below statement in INITIALIZATION only once , uhad assigned twice
INITIALIZATION.
v_repid = sy-repid.
2007 Mar 02 8:56 AM
try moving the following code
Pass the program.
v_repid = sy-repid.
before
'REUSE_ALV_FIELDCATALOG_MERGE'.
2007 Mar 02 9:02 AM
is that working .....
let me know if it solves ur problem...!!
2007 Mar 02 9:18 AM
always u maintain the source code is not more than 72 characters wide(for all Programs)
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |