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

Main programs for the includes

Former Member
0 Likes
7,140

Hi All,

I have some include programs like MIWO0F90, LEINNF03, LEINMF11, LL03TU01, LMEREQF08, LFMR4U01, LV01ZF04. I would like to know all the tcodes or main programs accessing these includes. I tried the where used list but unable to go to a report program or transaction. Is there a method to find out.

The reason I need is, I have to test these includes and I need a report program or tcode to test these includes.

Best Regards

MS

5 REPLIES 5
Read only

Former Member
0 Likes
3,640

goto se80

drop the include name in program name

click enter.

it will take you to main program.

for example

SAPMIWO0 - is main program for MIWO0F90

another way is:

in se38. open the include. click check -> main program. it will check the main program and display the name in the status bar below.

there are others ways too.. but go with se80.. best solution

Read only

Former Member
0 Likes
3,640

hi,

go to se38-> give the program name and display.

in menu goto "Utilities -> Display Object List".

It will display the hierarchy of that program whether it used in Program or Function module..etc

Regards,

Bhavana

Read only

Former Member
0 Likes
3,640

Hi,

You can check in Table : D010INC for all these programs.

You can find the main Program for your includes and Through Main Program, You can check in Table TSTC for T.Code.

Regds,

Anil

Read only

Former Member
0 Likes
3,640

hi,

Go to Se38 and key in include file name for example LEINNF03.

Now click on Button Where Used List ( Clt + Shift + F3).

Check in the programe Check box and click on ok.

You will get main program of that include.

To find out T-code.

Key in the Main program name of Include in Se38.

Now click on Button Where Used List ( Clt + Shift + F3).

Check in the Check box Transaction Code and click on ok.

You will get main T-code of that program.

Thanks & regards,

ShreeMohan

Read only

Former Member
0 Likes
3,640

hi mario suresh,

TYPES: BEGIN OF TY_FINAL,

         PROG_NAME(30),

         PROG_LINE(6),

         FM_NAME(40),

         FM_DESC(80),

        END OF TY_FINAL.

DATA : gt_code(500)   TYPE c OCCURS 0,

        gv_code        LIKE LINE OF gt_code,

        gt_code2(500TYPE c OCCURS 0,

        gv_code2       LIKE LINE OF gt_code2,

        git_final      TYPE TABLE OF ty_final,

        wa_final       LIKE LINE OF  git_final.

DATA: results         TYPE match_result_tab,

       wa_results      LIKE LINE OF results,

       results2        TYPE match_result_tab,

       wa_results2     LIKE LINE OF results2.

DATA: lv_incl(25),

       lv_prog(30).

SELECTION-SCREEN : BEGIN OF SCREEN 9000.

SELECTION-SCREEN : SKIP.

PARAMETERS: program LIKE sy-repid,

             t_code  TYPE tcode.

SELECTION-SCREEN : SKIP.

SELECTION-SCREEN  END OF SCREEN 9000.

INITIALIZATION.

CALL SCREEN 9000.

AT SELECTION-SCREEN.

     SELECT SINGLE pgmna

     INTO program

     FROM tstc

    WHERE tcode = t_code.

*----------------------------------------------------------------------*

*       CLASS cl DEFINITION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS cl DEFINITION .

   public section .

     methods : include,

               fm.

ENDCLASS.               "cl

*----------------------------------------------------------------------*

*       CLASS cl IMPLEMENTATION

*----------------------------------------------------------------------*

*

*----------------------------------------------------------------------*

CLASS cl IMPLEMENTATION.

   method include.

*    SELECT SINGLE pgmna

*    INTO program

*    FROM tstc

*   WHERE tcode = t_code.

   endmethod.                    "include

   method fm.

     PERFORM read_prog.

     PERFORM print_output.

   endmethod.                    "fm

ENDCLASS.               "cl

*&---------------------------------------------------------------------*

*&      Form  READ_PROG

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM READ_PROG .

   DATA: lt_code   LIKE gt_code,

         lv_code   LIKE gv_code.

   READ REPORT program INTO gt_code.

   IF sy-subrc NE 0.

     MESSAGE i398(00) WITH 'REPORT' program 'NOT FOUND'.

   ENDIF.

   lt_code = gt_code.

   lv_prog = program.

   PERFORM fill_result USING lt_code lv_code lv_prog.

   FIND ALL OCCURRENCES OF REGEX 'INCLUDE'

     IN TABLE gt_code

     RESPECTING CASE

     RESULTS results2.

   IF results2 IS NOT INITIAL.

     LOOP AT results2 INTO wa_results2.

       CLEAR: gt_code2.

       READ TABLE gt_code INTO gv_code INDEX wa_results2-line.

       IF sy-subrc IS INITIAL.

         SPLIT gv_code AT 'INCLUDE ' INTO lv_incl lv_prog.

         REPLACE ALL OCCURRENCES OF '.' IN lv_prog WITH ''.

         READ REPORT lv_prog INTO gt_code2.

         lt_code = gt_code2.

         PERFORM fill_result USING lt_code lv_code lv_prog.

       ENDIF.

     ENDLOOP.

   ENDIF.

ENDFORM.                    " READ_PROG

*&---------------------------------------------------------------------*

*&      Form  FILL_RESULT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*      -->PT_CODE    text

*      -->PV_CODE    text

*      -->PV_PROG    text

*----------------------------------------------------------------------*

FORM FILL_RESULT  USING    PT_CODE like  gt_code

                            PV_CODE like  gv_code

                            PV_PROG like  lv_prog.

   DATAlv_line(100),

          lv_line1(100),

          lv_waste(50),

          lv_i  TYPE i,

          lv_idx  TYPE i,

          lv_desc TYPE rs38l_ftxt.

   FIND ALL OCCURRENCES OF REGEX 'CALL FUNCTION'

     IN TABLE pt_code

     RESPECTING CASE

     RESULTS results.

        LOOP AT results INTO wa_results.

     CLEAR: lv_line1, lv_idx.

     READ TABLE pt_code INTO pv_code INDEX wa_results-line.

     SPLIT pv_code AT 'CALL FUNCTION ' INTO pv_code lv_line.

     lv_i = strlen( lv_line ).

     lv_i = lv_i - 1.

     DO lv_i TIMES.

       lv_idx = lv_idx + 1.

       IF lv_idx <> lv_i.

         CONCATENATE lv_line1 lv_line+lv_idx(1) INTO lv_line1.

       ENDIF.

     ENDDO.

     SELECT SINGLE stext

       FROM tftit

       INTO lv_desc

      WHERE spras = 'EN'

        AND funcname = lv_line1.

     wa_final-prog_name  = pv_prog.

     wa_final-prog_line  = wa_results-line.

     wa_final-fm_name    = lv_line1.

     wa_final-fm_desc    = lv_desc.

     APPEND wa_final TO git_final.

ENDLOOP.

ENDFORM.                    " FILL_RESULT

*&---------------------------------------------------------------------*

*&      Form  PRINT_OUTPUT

*&---------------------------------------------------------------------*

*       text

*----------------------------------------------------------------------*

*  -->  p1        text

*  <--  p2        text

*----------------------------------------------------------------------*

FORM PRINT_OUTPUT .

   WRITE:

  /01(30) 'Program Name',

   36(8'Line No.',

   50(40) 'Function Module Name',

   90(50) 'Description'.

   LOOP AT git_final INTO wa_final.

     WRITE:

     /01(30) wa_final-prog_name,

      36(8wa_final-prog_line,

      50(40) wa_final-fm_name,

      90(80) wa_final-fm_desc.

   ENDLOOP.

ENDFORM.                    " PRINT_OUTPUT

*data : obj1 type ref to cl.

data : obj2 type ref to cl.

start-of-selection .

*  create object obj1.

   create object obj2.

*  call method obj1->include.

   call method obj2->fm.


This program fetches u the includes and function modules in a transaction code.

- N.P.Swaroop