‎2009 Sep 02 6:28 PM
Hi gurus,
Im wrting a program that search in all Z programs a certain statement, like all programs that have the Call Transaction statement but im facing dificulties to know the tables where the code of a programa is.
Is there anyway to get this? can i actually get a code from a program in a standart table?
Thanks in advance,
Best Regards,
João Martins
‎2009 Sep 02 6:32 PM
For this already have a standard program
RPR_ABAP_SOURCE_SCAN
I think this will solve your problem
a®
‎2009 Sep 02 6:32 PM
‎2009 Sep 02 6:32 PM
For this already have a standard program
RPR_ABAP_SOURCE_SCAN
I think this will solve your problem
a®
‎2009 Sep 02 6:34 PM
You can use RPR_ABAP_SOURCE_SCAN program to search for any string in all programs.
‎2009 Sep 02 7:13 PM
Hi ,
try this..
RSRSCAN1 -- to find a string or comment or source code contains text in the reports and their includes
or
RPR_ABAP_SOURCE_SCAN - Scan ABAP Report Sources
Prabhudas
‎2009 Sep 02 7:24 PM
2 more :
program RS_ABAP_SOURCE_SCAN : exists in basis 7.0
program AFX_CODE_SCANNER : exists in basis 7.0
Note:
program RPR_ABAP_SOURCE_SCAN : does NOT exist in basis 7.0 (supplied in ECC?)
program RSRSCAN1: exists in basis 7.0 but will dump if some sources have lines wider than 72 characters
‎2009 Sep 02 8:16 PM
fetch all z* names from trdir.
select * from trdir
where name like 'Z%' ."check the field name in trdir as i am not infront of sap now
now
loop at itab into is.
read report is-name into itab2. "you can search your line in this itab2 with read statement on itab2.
endloop
‎2009 Sep 02 8:31 PM
Hi,
you can use the report RPR_ABAP_SOURCE_SCAN as suggested, but if you need more computing and manage the result witha Z program you could take a look to the code below
This example retrieve all the occurrence of INCLUDE statement in a report source code.
READ REPORT IP_REPONAME INTO SOURCE.
gt_kw = 'INCLUDE'.
APPEND gt_kw.
SCAN ABAP-SOURCE SOURCE TOKENS INTO gt_tk
STATEMENTS INTO gt_stm
* OVERFLOW INTO OVERFLOW_AREA
KEYWORDS FROM gt_kw
PROGRAM FROM IP_REPONAME
* INCLUDE PROGRAM FROM IP_REPONAME
MESSAGE INTO MESS
WITHOUT TRMAC
* WITH INCLUDES
WITH ANALYSIS.This solve your issue
Regards,
Ivan