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

Accessing ABAP key word DB through program

Former Member
0 Likes
2,088

hello,

Is it possible to acccess and search ABAP keyword database from within the program usikng any FM etc?

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,050

Hi Sam,

From your query i understand that you want to do a search for some particular keywords in programs.You can seek the help of the following following program.

RS_ABAP_SOURCE_SCAN

Give your keyword in the string searched for  column and put Z* or Y* in program column and execute.

Please let me know you requires any further explanations on it.

Regards,

Kannan

hello,

Is it possible to acccess and search ABAP keyword database from within the program usikng any FM etc?

Thanks in advance

14 REPLIES 14
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
2,050

What exactly do you mean by "keyword" - ABAP language commands like IF... THEN? And what would be the purpose of such program?

Read only

0 Likes
2,050

I want to scan programs through another program.

Read only

0 Likes
2,050

Hi,

Use t-code 'CODE_SCANNER' which scans all components in packages for a specific search term.

Regards,

Siva

Read only

0 Likes
2,050

Sam m wrote:

I want to scan programs through another program.

Hi Sam,

Are you looking to get the whole source code of a program?

You can have all code of a program into an internal table using READ REPORT.

ABAP Keyword Documentation

Regards

Sreekanth

Message was edited by: Matthew Billingham

Read only

0 Likes
2,050

To do what? A little more information may enable proper guidance.

Read only

0 Likes
2,050


Ok sorry if I was not clear enough. I want to scan entire code for certain key words that we deem as data manipulation language e.g update etc. I am also looking for some kind of FM which will help to edit code and replace the existing content of the program.

Read only

0 Likes
2,050

Then either use one of the standard scanning programs (search for details), or write your own using READ REPORT. Replacing code is INSERT REPORT. Read very very carefully the documentation on these keywords and make sure you know what you are doing.

Read only

0 Likes
2,050

This is what i said..May i know y r u edited my post?

Read only

0 Likes
2,050

You had posted something that was contrary to rules. I don't remember exactly what.

Also please note that the language of this site is PROFESSIONAL English. SMS / Text message type spellings are not professional. They are also hard for non-fluent English speakers to understand, so they're also discourteous.

Read only

Former Member
0 Likes
2,051

Hi Sam,

From your query i understand that you want to do a search for some particular keywords in programs.You can seek the help of the following following program.

RS_ABAP_SOURCE_SCAN

Give your keyword in the string searched for  column and put Z* or Y* in program column and execute.

Please let me know you requires any further explanations on it.

Regards,

Kannan

Read only

Former Member
0 Likes
2,050

Use transaction CODE_SCANNER OR program AFX_CODE_SCANNER

Read only

Former Member
0 Likes
2,050

Thanks all for your reply. This has enriched my knowledge however not getting the correct answer. My requrirement is , if I read a program and e.g. came across a word 'DATA', then how do I find out if that is the ABAP keyword or not?

Read only

0 Likes
2,050

To get a list of every ABAP statement, use method CL_ABAP_DOCU_INDEX=>ELEMENT_LIST, but to identify non reserved keyword in the source, that wont be enough, if you have time, try to start with some xref on class like CL_ABAP_SOURCE_INFO or CL_ABAP_STATEMENT_INFO, but I never got enough time for this...

Regards,

Raymond

Read only

Former Member
0 Likes
2,050

This message was moderated.