2007 Apr 02 7:01 AM
hi,
I have to find all the text elements ie 'TEXT-' in ne given pgm.
This is required as i want the o/p as list of all the text literals and unassigned text symbols.
So any one can help on this.
Thanks.
Hi..,
use the READ REPORT statement... in ur program.
It reads each line of your program into an internal table as one record.. now search in the string...
<b>
parameter: p_report type SY-REPID .
data :
t_sourcetab type standard table of D022S,
wa_line(72) type c.
READ REPORT p_report INTO t_sourcetab.
Loop at t_sourcetab into wa_line.
search wa_line for 'text-'.
if sy-subrc eq 0.
write : 'Column:', sy-fdpos, 'Line.no:' , sy-tabix.
endif.
endloop.</b>
regards,
sai ramesh
2007 Apr 02 7:03 AM
Hi..
use this..
data:
begin of wa,
str type string,
end of wa.
data:
itab like standard table of wa.
READ REPORT <prog> INTO itab .
loop at itab into wa.
if wa cs 'text-'.
write:/ ' line no..',sy-tabix,
' The position...', sy-fdpos,
' the line is...' wa-str.
endif.
endloop.
this will get u all the text literals..
Ram
Message was edited by:
Rammohan Nagam
2007 Apr 02 8:59 AM
Hi,
In wa-str i only want that 'text-...' should only be displayed rather then complete line.
Thanks.
2007 Apr 02 11:28 AM
Hi Abhishek,
U can query the TADIR table using the object 'REPT' (report Text) by specifying the report name.
give object as REPT
and Obj_name as <report name>
u will get the list of text elements used int that report
2007 Apr 02 7:05 AM
2007 Apr 02 7:05 AM
Hi..,
use the READ REPORT statement... in ur program.
It reads each line of your program into an internal table as one record.. now search in the string...
<b>
parameter: p_report type SY-REPID .
data :
t_sourcetab type standard table of D022S,
wa_line(72) type c.
READ REPORT p_report INTO t_sourcetab.
Loop at t_sourcetab into wa_line.
search wa_line for 'text-'.
if sy-subrc eq 0.
write : 'Column:', sy-fdpos, 'Line.no:' , sy-tabix.
endif.
endloop.</b>
regards,
sai ramesh
2007 Apr 02 7:13 AM
Hi Abhishek Mishra,
I think this might help you in this regard....
data textpool_tab like textpool occurs 0 with header lin.
READ TEXTPOOL <PROGRAM-NAME> INTO TEXTPOOL_TAB LANGUAGE <SY-LANGU/LANGUAGE>.
This reads the text pool statements of the given program of the given language.
Check the help for further details.
Regards,
Ramesh S
*Allocate the points if reply is useful
2007 Apr 02 7:18 AM
run the prog RPR_ABAP_SOURCE_SCAN(i am in version 4.6c) and in find string give text- give prog name and press execute.
regards
shiba dutta
SHIBA DUTTA
2007 Apr 02 7:48 AM
Abhishek ,
Run Extended Program Check for your program from menu Program-->Check --> Extended Check and also Code-inspector.
These test will display the List of Un-asssigned Text as well as fields which are not used in the Program.
Tx
Parthi
Reward if helpful
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |