About ECP directly modifying ABAP code

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.