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

finding 'text-'

Former Member
0 Likes
970

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.

8 REPLIES 8
Read only

Former Member
0 Likes
937

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

Read only

0 Likes
937

Hi,

In wa-str i only want that 'text-...' should only be displayed rather then complete line.

Thanks.

Read only

0 Likes
937

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

Read only

Former Member
0 Likes
937

chk this program RS_ABAP_SOURCE_SCAN

Read only

Former Member
0 Likes
937

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

Read only

learnsap
Active Participant
0 Likes
937

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

Read only

Former Member
0 Likes
937

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

Read only

Former Member
0 Likes
937

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