Skip to Content
author's profile photo Former Member
Former Member

how to get maximum length of the source text

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2010 at 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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Feb 12, 2010 at 10:38 AM

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.