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

Get ABAP variables

Former Member
0 Likes
678

Hi All,

Is there any statement or function module where in i can check what all variables are used within a ABAP program.

Ex: For the below code:

DATA : lv_name(30) TYPE c,

CONSTANTS: lc_name(30) TYPE c VALUE 'NAME'.

I need info like: lv_name, DATA, c

lc_name, Constant, c.

Thanks in advance.

5 REPLIES 5
Read only

Former Member
0 Likes
649

Hi,

You can use SCAN ABAP-SOURCE statement .

In this you will get the whole abap code of a report into tables as tokens, statements

you have many more additions available with this statement.

check this link for more information about [SCAN ABAPSOURCE|http://help.sap.com/abapdocu/en/ABAPSCAN.htm]

Thanks&Regards

Sarves

Read only

0 Likes
649

I have tried using SCAN ABAP-SOURCE but the tokens are not useful as i need to know the type each token is. Like if it is a constant i have to get an output stating its a constant.

Thanks for the quick response.

Read only

0 Likes
649

Can you please check this FM.

EIS_REPORT_GET_DEFINITION

Read only

Former Member
0 Likes
649

Hi,

You can check that by using FIND icon on the standard tool bar.

Otherwise you can use the below reports.

RPR_ABAP_SOURCE_SCAN

RS_ABAP_SOURCE_SCAN

Regards,

Kumar Bandanadham

Read only

former_member222860
Active Contributor
0 Likes
649

Hope this Report gives some hint.

RPR_ABAP_SOURCE_SCAN

In the Find String, give 'DATA' and execute.