‎2009 Mar 17 5:50 AM
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..
‎2009 Mar 17 5:55 AM
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.
‎2009 Mar 17 5:56 AM
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
‎2009 Mar 25 4:47 AM
‎2009 Mar 17 6:01 AM
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
‎2009 Mar 17 6:14 AM
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
‎2009 Mar 17 6:27 AM
Use this Std Report
RPR_ABAP_SOURCE_SCANin the search criteria , give string as **
U'll see the comment lines.
‎2009 Mar 17 9:32 AM
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.
‎2009 Mar 17 9:45 AM
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..