ABAP Program to show My Inactive Programs

0
449

Ever found caught in the circumstance where you don’t know, which of your ABAP programs are Inactive?

The utility display a list of all the inactive programs under a SAP user.

REPORT zinactive_programs.

*—database tables used
TABLES: dwinactiv .

*—types used
TYPES: BEGIN OF ty_tab.
        INCLUDE STRUCTURE dwinactiv.
TYPES: END OF  ty_tab.
*–internal tables used
DATA: itab TYPE TABLE OF ty_tab WITH HEADER LINE.

*—selection screen
SELECT-OPTIONS: s_uname FOR dwinactiv-uname.

*—start of selection
START-OF-SELECTION.

perform get_data.

END-OF-SELECTION.

perform display_data.

*&———————————————————————*
*&      Form  get_data
*———————————————————————-*

form get_data .

  SELECT   object
           obj_name
           uname
           delet_flag
           FROM  dwinactiv
           INTO TABLE itab
           WHERE uname IN s_uname.

sort itab by uname.

endform.                    ” get_data
*&———————————————————————*
*&      Form  display_data
*———————————————————————-*

form display_data .

  LOOP AT itab .
    on change of itab-uname.
    format color 7.
    WRITE:/ itab-uname .
    write:/ ‘in active objects under user is :’.
    format color off.
    ENDon.
    write:/1   itab-object,
           35   itab-obj_name,
           120   itab-delet_flag.
  ENDLOOP.

endform.                    ” display_data

 

 

On program execution, selection screen looks like

Selection Screen

And the output screen looks like

Inactive List Output

LEAVE A REPLY

Please enter your comment!
Please enter your name here