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

Check Subroutine It contains active coding or not..

Former Member
0 Likes
616

Hi experts.

Example..

Include MV45AFZC

THis Program Subroutines are created but it dosent contain any coding. I want list of such Routines...

I am using such conditions. if rtab-text(1) ca 'FORM'

if rtab-text(1) = '*'.

But as it found FORM USEREXIT Statement.. It shows that code has active coding. but after this there is no active coding.. till ENDFORM.. As it got ENDFORM statement again it gives meassage code has active coding..

Please help me.

Hi experts.

Example..

Include MV45AFZC

THis Program Subroutines are created but it dosent contain any coding. I want list of such Routines...

I am using such conditions. if rtab-text(1) ca 'FORM'

if rtab-text(1) = '*'.

But as it found FORM USEREXIT Statement.. It shows that code has active coding. but after this there is no active coding.. till ENDFORM.. As it got ENDFORM statement again it gives meassage code has active coding..

Please help me.

3 REPLIES 3
Read only

Former Member
0 Likes
571

read table rtab with key line = 'Form'.

delete rtab where rtab-line(1) = '*'.

loop at rtab from sy-stabix.

lt_itab-line = rtab-line.

append lt_itab.

endloop.

describe lt_itab lines lv_lines.

if lv_lines = 2.

write:/ your message.

endif.

Edited by: BrightSide on Mar 24, 2009 11:53 AM

Read only

0 Likes
571

Hi.

this is my code now tell me how we can find out the empty forms..

please have a look ...CALL FUNCTION 'GET_INCLUDES'

EXPORTING

PROGNAME = IT_FINAL-PGMNA

TABLES

INCLTAB = ITAB.

LOOP AT ITAB.

SELECT SINGLE SUBC FROM TRDIR INTO CORRESPONDING FIELDS OF ITAB

WHERE NAME = ITAB-REPID.

modify itab transporting subc.

ENDLOOP.

LOOP AT ITAB.

IF ITAB-SUBC NE 'I'.

IF ITAB-SUBC NE 'S'.

DELETE ITAB.

ENDIF.

ENDIF.

ENDLOOP.

LOOP AT ITAB.

text_type-repid = itab-repid.

READ REPORT itab-repid INTO rtab.

LOOP AT RTAB.

if rtab-text(1) ca 'FORM' or rtab-text(1) ca 'form'.

move : rtab-text to text_type-MODULENAME.

modify itab from text_type transporting modulename

where repid = itab-repid.

if rtab-text(1) = '*' or rtab-text(1) = '"'.

text_type-text = 'code is commented'.

else.

text_type-text = 'code is uncommented'.

endif.

modify itab from text_type transporting repid modulename text

where repid = text_type-repid.

endif.

ENDLOOP.

ENDLOOP.

Read only

Former Member
0 Likes
571

Thank you......