* =============================================================== * Stefanos Moschidis - SAP Certified Technical Consultant * =============================================================== * =============================================================== * This Program Deletes all breakpoints from a given Mainprogram * and from all includes * =============================================================== REPORT Z_VIEW_AND_DELETE_BREAKPOINTS no standard page heading. * ==================================== * Data Declarations * ==================================== data : BREAKPOINTS type standard table of BREAKPOINT with header line . data : LINE_SELECTED type c . data : UCOMM like SY-UCOMM . * ==================================== * Selection Screen - Default * ==================================== parameters : MPROGRAM LIKE SY-REPID obligatory . * ==================================== * top of page * ==================================== top-of-page . uline . write : / 'Breakpoints of main program:' , MPROGRAM . uline . * ==================================== * Start of selection * ==================================== Start-of-selection . perform Get_all_beakpoints . * ==================================== * End of Selection * ==================================== End-of-Selection . perform put_all_breakpoints . * ==================================== * at user command * ==================================== at user-command . UCOMM = SY-UCOMM . CASE UCOMM . WHEN 'DEL_BRK' . PERFORM DEL_BRKP . WHEN 'ALL' . PERFORM SEL_ALL . WHEN 'NONE' . PERFORM SEL_NONE . WHEN OTHERS . ENDCASE . *&---------------------------------------------------------------------* *& Form Get_all_beakpoints *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM Get_all_beakpoints. clear : BREAKPOINTS , BREAKPOINTS[] . CALL FUNCTION 'SYSTEM_DEBUG_BREAKPOINTS' EXPORTING MAIN_PROGRAM = MPROGRAM TABLES BREAKPOINTS = BREAKPOINTS EXCEPTIONS GENERATE = 1 OTHERS = 2. IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF. ENDFORM. " Get_all_beakpoints *&---------------------------------------------------------------------* *& Form put_all_breakpoints *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM put_all_breakpoints. SET PF-STATUS '100' . loop at BREAKPOINTS . write : / LINE_SELECTED as checkbox , BREAKPOINTS-PROGRAM , BREAKPOINTS-LINE no-grouping . endloop . uline . write : / 'End of List' . uline . ENDFORM. " put_all_breakpoints *---------------------------------------------------------------------* * FORM SEL_ALL * *---------------------------------------------------------------------* * ........ * *---------------------------------------------------------------------* FORM SEL_ALL. DO . READ LINE SY-INDEX FIELD VALUE LINE_SELECTED . IF SY-SUBRC <> 0 . EXIT . ENDIF . IF LINE_SELECTED = ' ' . MODIFY LINE SY-INDEX FIELD VALUE LINE_SELECTED FROM 'X' . ENDIF . ENDDO . ENDFORM. *---------------------------------------------------------------------* * FORM SEL_NONE * *---------------------------------------------------------------------* * ........ * *---------------------------------------------------------------------* FORM SEL_NONE. DO . READ LINE SY-INDEX FIELD VALUE LINE_SELECTED . IF SY-SUBRC <> 0 . EXIT . ENDIF . IF LINE_SELECTED = 'X' . MODIFY LINE SY-INDEX FIELD VALUE LINE_SELECTED FROM ' ' . ENDIF . ENDDO . ENDFORM. *&---------------------------------------------------------------------* *& Form DEL_BRKP *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM DEL_BRKP. DO . CLEAR LINE_SELECTED . READ LINE SY-INDEX FIELD VALUE LINE_SELECTED . READ LINE SY-INDEX FIELD VALUE BREAKPOINTS-PROGRAM . READ LINE SY-INDEX FIELD VALUE BREAKPOINTS-LINE . IF SY-SUBRC <> 0 . EXIT . ENDIF . CHECK LINE_SELECTED = 'X' . CALL FUNCTION 'RS_DELETE_BREAKPOINT' EXPORTING INDEX = BREAKPOINTS-LINE MAINPROG = mPROGRAM PROGRAM = BREAKPOINTS-PROGRAM . ENDDO . ENDFORM. " DEL_BRKP