1. For the report
ReportZfc_mm_change.TABLES: rs38m.PARAMETERS: P_PROGM likeRs38m-programmobligatory MEMORY IDRID, P_uname likeSy-uname DEFAULT sy-uname.DATAI_codeTYPE TABLE of string.READ ReportP_progm intoI_code."read the program line into I_codeIFP_PROGM (1) ='Z' ORP_PROGM (2) ='LZ' ORP_PROGM (4) ='DEMO'. Editor-call forI_code."Perform editable logicENDIF.IFSy-ucomm ='Wb_save'. Sy-uname =P_uname. INSERT ReportP_progm fromI_code."Change Write LogicENDIF.
READ report Prog to Itab [MAXIMUM WIDTH into WID].
Standard code example:
DATAProgTYPEC LENGTH -. DATAItabTYPE TABLE of string. Prog='...'. READ ReportProg intoItab.IFSY-SUBRC =0. APPEND 'FORM Subr.' toItab. ... APPEND 'PERFORM ...' toItab. APPEND 'EndForm.' toItab. GENERATE subroutine POOL itab NAME Prog. PERFORM('SUBR')inch Program(Prog).ENDIF.
Executable code:
Reportzfr_test.DATAProgTYPEC LENGTH -.DATAItabTYPE TABLE of string.DATA: MessTYPE string, SidTYPE string. Prog='zfr_test11'.READ ReportProg intoItab.IFSY-SUBRC =0. APPEND 'FORM TEST.' toItab. APPEND 'write:1.' toItab. APPEND 'EndForm.' toItab. GENERATE subroutine POOL itab NAME progMESSAGEMess shortdump-IDSID. PERFORM('TEST')inch Program(Prog)IFFOUND.ENDIF.
Report Zfr_test11.
The result is: 1.
GENERATE subroutine POOL itab NAME prog MESSAGE mess Shortdump-id SID. "Generate executable programs with existing code
Editor-call for report prog [Display-mode].
Reportzfr_test.DATAProgTYPEC LENGTH -.DATAItabTYPE TABLE of string. Prog='zfr_test11'.READ ReportProg intoItab."Read CodeEditor-call forItab."display-mode. Setting Code EditableIFSy-ucomm ='Wb_save'. INSERT ReportProg fromItab."Code WriteENDIF.
2. Use the se37->trint_objects_check_and_insert:487 line breakpoint, ct_ko200[] inside the table to empty the changes.
About ECP Direct modification of ABAP code