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

Regarding Source scan

Former Member
0 Likes
484

hi guys,

I want to read the abap source code and find in which subroutine "Form ..endform" the below call function Statement is used

Call function 'Gui_download'

any logic suggest me please.

I tried like this below. but how to check whether some statement exists in particular subroutine.

APPEND 'FORM' TO I_KEYWORD.

READ REPORT GS_PROG-NAME INTO I_REPORT.

IF SY-SUBRC = 0.

SCAN ABAP-SOURCE I_REPORT TOKENS INTO I_STOKEN

STATEMENTS INTO I_SSTMNT

KEYWORDS FROM I_KEYWORD.

ENDIF.

3 REPLIES 3
Read only

Former Member
0 Likes
453

Can you use program RPR_ABAP_SOURCE_SCAN?

Read only

0 Likes
453

HI SRINIVAS

THANKS FOR YOUR REPLY.

NO. I WANT THE ABAP LOGIC TO CHECK THAT.

Thanks.

kumar

Read only

0 Likes
453

Hi ,

U can write some logic as...

First get all the lines of report into an Internal tale .. i_table

Loop at i_table.

if i_table-line+0(4) = 'FORM'.

v_flag = 'X'.

v_field = i_table-line.

endif.

if i_table-line+0(7) = 'ENDFORM'.

clear v_flag , v_field.

endif.

if v_flag = 'X' and i_table-line CS 'GUI_DOWNLOAD'.

split i_table-line at ' ' into v_form v_perform.

exit.

endif.

endloop.

v_perform has the perform name ...

Regards,

GSR