‎2007 Feb 08 5:17 AM
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.
‎2007 Feb 08 5:47 AM
‎2007 Feb 08 5:58 AM
HI SRINIVAS
THANKS FOR YOUR REPLY.
NO. I WANT THE ABAP LOGIC TO CHECK THAT.
Thanks.
kumar
‎2007 Feb 08 6:20 AM
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