Application Development 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: 

Search content of ABAP programs

Former Member
0 Kudos

I need a way to search all of our Z programs for select statments. Is there a way to do this?

1 ACCEPTED SOLUTION

ssimsekler
Active Contributor
0 Kudos

Hi Scott

ABAP programs are not stored in transparent tables and that's why you can not use "SE16" for your requirement.

Maybe you can try the report <b>"RPR_ABAP_SOURCE_SCAN"</b> if you have report execution i.e. "SE38" or "SA38" authorization.

Or you may request from an ABAPer to handle the issue.

*--Serdar

10 REPLIES 10

Former Member
0 Kudos

Hi,

Read reports into internal table and search for 'SELECT'

Regards

Venkat

0 Kudos

Thanks for reply but I'm on the functional side without ABAP rights. Is there a table I could go against in SE16 or perhaps an existing SAP utility report?

0 Kudos

Hi,

Can you tell me what is your exact requirement?

Regards

Venkat

ssimsekler
Active Contributor
0 Kudos

Hi Scott

ABAP programs are not stored in transparent tables and that's why you can not use "SE16" for your requirement.

Maybe you can try the report <b>"RPR_ABAP_SOURCE_SCAN"</b> if you have report execution i.e. "SE38" or "SA38" authorization.

Or you may request from an ABAPer to handle the issue.

*--Serdar

0 Kudos

Perfect! Program RPR_ABAP_SOURCE_SCAN was what I was hoping for. Thanks!

0 Kudos

Hi Scott

Would like to give points regarding to SDN customs.

You can give points by clicking to the yellow star icon at the header of each post. By this way, you can give;

-one 10 points (solved)

-two 6 points (very helpful answer)

-many 2 points (helpful answer)

Thanks...

*--Serdar

Former Member
0 Kudos

Hi Scott,

Use table D010SINF.

Have a nice day

Venkat

0 Kudos

Another way to dump all your programs to local disk, search strings in windows operation system.

REPORT ZBAK_UP .

TABLES : TADIR,TRDIRT.

DATA: BEGIN OF ITAB OCCURS 100,

TEXT(75),

END OF ITAB.

DATA: BEGIN OF REPNAME OCCURS 10,

OBJ_NAME LIKE TADIR-OBJ_NAME,

END OF REPNAME.

PARAMETERS : DEVCLASS LIKE TADIR-DEVCLASS,

DIRNAME(50) DEFAULT 'C:\'.

SELECT * FROM TADIR INTO CORRESPONDING FIELDS OF TABLE REPNAME WHERE

OBJECT = 'PROG' AND DEVCLASS = DEVCLASS.

DATA NAME LIKE RLGRAP-FILENAME.

LOOP AT REPNAME.

READ REPORT REPNAME-OBJ_NAME INTO ITAB.

****Get report title

SELECT SINGLE * FROM TRDIRT WHERE NAME EQ REPNAME-OBJ_NAME

AND SPRSL = 'E'.

CONCATENATE '*' TRDIRT-TEXT INTO TRDIRT-TEXT.

INSERT TRDIRT-TEXT INTO ITAB INDEX 1.

CONCATENATE DIRNAME '\' REPNAME-OBJ_NAME '.txt'

INTO NAME.

*exit.

CALL FUNCTION 'WS_DOWNLOAD'

EXPORTING

FILENAME = NAME

TABLES

DATA_TAB = ITAB

EXCEPTIONS

FILE_OPEN_ERROR = 1

FILE_WRITE_ERROR = 2

INVALID_FILESIZE = 3

INVALID_TABLE_WIDTH = 4

INVALID_TYPE = 5

NO_BATCH = 6

UNKNOWN_ERROR = 7

GUI_REFUSE_FILETRANSFER = 8

OTHERS = 9.

ENDLOOP.

MESSAGE I002(SY) WITH 'All the reports transfered Succefully'.

https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-7-2&contenttype=url&content=https://

Former Member
0 Kudos

Hi,

You can use the report RSRSCAN1 if you have access to t-codes SA38 or SE38.

Faraz

0 Kudos

Or use the code inspector

with the search for abap tokens option.