01-28-2010 11:01 AM
HI
I want to get maximum length of source text (include/ class), is there any FM. If i use READ REPORT ...with MAXIMUM WIDTH syntax i will face run time dump which are non-catchable exceptions where line length is greater than 72 characters.
So i want to collect all the report programs which may lead to dump when using READ REPORT....syntax.
Thanks
Lavanya
01-28-2010 11:13 AM
Hi,
I think that only thing You need to do is declare target internal table as a table of string. For me it works also for reports with long lines.
Regards,
Adrian
01-28-2010 11:26 AM
HI
Actually i want to collect all reports which may lead to dump from READ REPORT....sytax
01-28-2010 11:40 AM
Yes, but I tell You, that none of them will lead to short dump if You will use table of string as a target table. Dump is arised only if length of the longest program line is longer than length of internal table line.
So if You want to find which programs have lines which are longer than 72 chars, You can do it like this:
DATA: gt_names TYPE STANDARD TABLE OF trdir-name,
gv_name TYPE trdir-name,
gt_source TYPE TABLE OF string,
gv_width TYPE i.
SELECT name FROM trdir INTO TABLE gt_names.
LOOP AT gt_name INTO gv_name.
READ REPORT gv_name INTO gt_source MAXIMUM WIDTH INTO gv_width.
IF gv_width GT 72.
WRITE: / gv_name, gv_width.
ENDIF.
ENDLOOP.
Short dump should never occur here. If I am wrong, please post your code and also a short dump.
Hope it helps.
Adrian
02-12-2010 10:38 AM