anchor.diff:    METHOD includes.
   
       DATA: lv_program TYPE program,
  +          lv_cnam    TYPE reposrc-cnam,
             lt_functab TYPE tt_rs38l_incl.
   
  -    FIELD-SYMBOLS: <ls_func> LIKE LINE OF lt_functab.
  +    FIELD-SYMBOLS: <lv_include> LIKE LINE OF rt_includes,
  +                   <ls_func>    LIKE LINE OF lt_functab.
   
   
       lv_program = main_name( is_item ).
  
positive.code:                              io_xml   = lo_xml ).
        APPEND ls_file TO rt_files.
  
        ls_file = abap_to_file( is_item  = is_item
                                iv_extra = <ls_func>-funcname
                                it_abap  = lt_new_source ).
        APPEND ls_file TO rt_files.
  
      ENDLOOP.
  
negative.code: 
      LOOP AT lt_functab ASSIGNING <ls_func>.
        DELETE TABLE rt_includes FROM <ls_func>-include.
      ENDLOOP.
  
  * skip SAP standard includes
      LOOP AT rt_includes ASSIGNING <lv_include>.
        SELECT SINGLE cnam FROM reposrc INTO lv_cnam
          WHERE progname = <lv_include>
          AND r3state = 'A'
          AND cnam = 'SAP'.
        IF sy-subrc = 0.
          DELETE rt_includes INDEX sy-tabix.
        ENDIF.
      ENDLOOP.
  
      APPEND lv_program TO rt_includes.
  