Application Development and Automation 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: 
Read only

Read Report Statement

Former Member
0 Likes
2,813

Hi Experts..

I hope you all are doing fine..

I need your help..

I want to used read report statement for reading reports and I want make a list of reports which coding is commented. and second list of reports which coding in uncommented...

Can anyone tell me. how can i find out the coding is commented or not?

Thanks in advance..

8 REPLIES 8
Read only

Former Member
0 Likes
1,487

You can load the report into internal table.

1. If first character is "*" then line is commented.

2. If first non blank character is """ (double Quote) then that line is also commented.

This logic you can use to break the report into commented part and actual code part.

Read only

Former Member
0 Likes
1,487

Hi,

use the keyword SCAN and you can achieve it.

once when you get all the data into an internal table use this keyword

you have option with comments in this this will get you the commented lines

refer this link:

[SCAN|http://help.sap.com/abapdocu/en/ABAPSCAN.htm]

regards

sarves

Read only

0 Likes
1,487

Solved..

Read only

Former Member
0 Likes
1,487

Hi,

If the line is started with '*' then it indicates as a comment, this line wont be executed.

when you commented the code in se38 program, those block of code will be displayed in the blue color

Thanks

Ramakrishna Pathi

Read only

Former Member
0 Likes
1,487

Hi,

If you want to check list of programs at a time then replace parameter with select-options and do the required changes.

*======================================================================*
*  Program Name: YSAT_TEST2                                          *
*----------------------------------------------------------------------*
* Original MOC#: SCN                                                *
*        Author: SATYASURESH DONEPUDI                                  *
* Creation Date: 03/17/2009                                            *
*   Transaction:                                                       *
*----------------------------------------------------------------------*
*   Description: To know any of the program lines commented or not
*======================================================================*

REPORT  YSAT_TEST2.

tables : d010sinf.
types : begin of ty_source,
              prog like d010sinf-prog,
        end of ty_source.
types : begin of ty_out,
              lines(300) type c,
        end of ty_out.

data : it_source type standard table of ty_source with header line.
data : it_out type standard table of ty_out with header line.

parameters : pr_opt(10) type c. " Program Name
break-point.

select prog from d010sinf
       into corresponding fields of table it_source
       where d010sinf~prog like pr_opt.

read table it_source index 1.

*-Get the code
read report it_source-prog into it_out.

loop at it_out.
    if it_out-lines(1) = '*'.
       write: /10
       'some of the program lines were commented in the program:',
                                                        it_source-prog.
       exit.
    endif.
endloop.

Regards,

~Satya

Read only

former_member222860
Active Contributor
0 Likes
1,487

Use this Std Report

RPR_ABAP_SOURCE_SCAN

in the search criteria , give string as **

U'll see the comment lines.

Read only

Former Member
0 Likes
1,487

hi,

Try if u can do it with "Read Textpool......"

I am actually not sure abt it, but u can try.

Thabks and Regards

Suraj S Nair.

Read only

0 Likes
1,487

Hi guys..

Thanks for your reply..

But i am using ALV grid display.. I need to move the text into one Itab-text field.

after read report statement i put the move statement but it was creating another record in itab,,

help me

thanks..