Merge pull request #584 from cqse/master

Fix handling of extenstion objects
This commit is contained in:
Lars Hvam 2017-01-27 12:10:59 +01:00 committed by GitHub
commit c1cbc25ac5

View File

@ -1104,12 +1104,28 @@ CLASS lcl_objects_program IMPLEMENTATION.
ELSE. ELSE.
* function module RPY_PROGRAM_INSERT cannot handle function group includes * function module RPY_PROGRAM_INSERT cannot handle function group includes
INSERT REPORT is_progdir-name IF strlen( is_progdir-name ) > 30.
FROM it_source " special treatment for extenstions
STATE 'I' " if the program name exceeds 30 characters it is not a usual
PROGRAM TYPE is_progdir-subc. " ABAP program but might be some extension, which requires the internal
IF sy-subrc <> 0. " addition EXTENSION TYPE, see
lcx_exception=>raise( 'error from INSERT REPORT' ). " http://help.sap.com/abapdocu_751/en/abapinsert_report_internal.htm#!ABAP_ADDITION_1@1@
" This e.g. occurs in case of transportable Code Inspector variants (ending with ===VC)
INSERT REPORT is_progdir-name
FROM it_source
STATE 'I'
EXTENSION TYPE is_progdir-name+30.
IF sy-subrc <> 0.
lcx_exception=>raise( 'error from INSERT REPORT .. EXTENSION TYPE' ).
ENDIF.
ELSE.
INSERT REPORT is_progdir-name
FROM it_source
STATE 'I'
PROGRAM TYPE is_progdir-subc.
IF sy-subrc <> 0.
lcx_exception=>raise( 'error from INSERT REPORT' ).
ENDIF.
ENDIF. ENDIF.
IF NOT it_tpool[] IS INITIAL. IF NOT it_tpool[] IS INITIAL.