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 multiple keywords in a command

Former Member
0 Likes
1,223

Hi,

I have to search commands.Eg:I have to find which program the command 'STOP' is present.

For single keyword commands like STOP ,I am using Read report to to read the report into an internal table and then using the Find command to search in that internal table.

For multiple keyword commands like MOVE <structure> TO <string>,I want to find 2 key words MOVE and TO and for commands like DO ... VARYING <var> FROM <var1> NEXT <var2> I have to find keywords DO,VARYING ,FROM,NEXT.

Is there any direct COMMAND TO SEARCH multiple keywords and also the as the number of keywords in a command can vary?

Please suggest.

6 REPLIES 6
Read only

ThomasZloch
Active Contributor
0 Likes
1,012

You could try the (SAP internal) ABAP command SCAN ABAP-SOURCE to split the program code into tokens and statements, or maybe standard program RS_ABAP_SOURCE_SCAN does already what is required.

Thomas

Read only

0 Likes
1,012

Actually if the command is consecutive MOVE a TO b then this program would help.

But variable and their lengths keep varying so I have to search for keywords MOVE and TO.

If in a program MOVE a TO b is present and I search for them using RS_ABAP_SOURCE_SCAN then it would help but If I search for MOVE and TO it does not show any output.

Hope my query is clear.

Please suggest some way to solve this

Read only

0 Likes
1,012

You can search using wildcards, e.g. try "* MOVE * TO *" as search string and check "Search for masked objects" as well.

Thomas

Read only

Former Member
0 Likes
1,012

Are you looking obsolete commands/syntax errors?

Rob

Read only

Sandra_Rossi
Active Contributor
0 Likes
1,012

Why don't you use code inspector?

Read only

Former Member
0 Likes
1,012

use standard program RPR_ABAP_SOURCE_SCAN

in program name if u want to find in Z then give z* and in find string u can write finding keyword