Close Sidebar close
Sapignite
  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products

Subscribe & Follow

All product names on this web site are trademarks of the companies that own them. Sapignite.com is not affiliated with SAP AG in any way. SAP AG is the registered trademark holder of SAP, SAP R/3, mySAP, ABAP, xApps, NetWeaver, and other proprietary terms. The technical information on this site is verified to the greatest extent possible, however, any information found on this site is used at the site visitor's own risk. Sapignite.com reserves the right to correct any errors or omissions in any portion of this site at any time without obligation.

  • SAP
  • Coding Challenges
  • Download
  • SAP Ignite Products
Sapignite
Sapignite
    ABAP SAP

    Suicide Bomber Report Program in SAP ABAP

    August 4, 2017

    Functional Consultant:
    I need one report which deletes the junk entries from the table (which are created due to program errors.)

    My answer:
    Ya simple.

    (But the next statement which he added made me think)

    Functional Consultant:
    The Report should be such that it should be executed only once and just after the execution it should be deleted automatically. Just like a suicide bomber. So that there is no chance that user executes that report by mistake once again.

    Requirement is confusing???? But let’s don’t get into functional things.

    So now i have a requirement that my program should delete the unwanted records from the table based on some condition and just after that it should delete itself.

    At first glance it sounds strange but it is not at all difficult.

    See the Diagram below:

    When you create a program and generate it . It generates LOAD.  The LOAD consists largely of byte code whose statements are linked with C functions. So next time when you call this program application server use this LOAD and execute it. The actual source code is stored in
    the Repository. In the database in the form in which they are developed. These are the only versions that can be displayed in the Workbench.

    The LOAD is generated automatically when the program is called if none exists yet or if the LOAD in the database or the program buffer is obsolete. You can also generate programs explicitly, for example, in the ABAP Editor with menu path Program -> Generate.

    A saved or buffered LOAD is considered obsolete when:

    • The developed version of the program was changed.
    • An object that the program uses was changed in the Data Dictionary.

    I got the following function module which can be used to delete a Report Program. (Note: This FM deletes the Source code of the program which is stored inside the DATABASE in Repository)

    I know what you are thinking now!!!!!

    What would happen to the LOAD when you delete the report program from the database?

    The answer is: The LOAD will be removed from the buffer automatically when Application server realised that the Report program is deleted from the database (Don’t ask me how much time application server takes, as it is in micro-second).

    So finally my program is look like:

    Report ZDELENTREIS.

    “Code to delete unwanted entries from the table

    “as per client requirement

    Data : l_subrc type i.

    “Call function module RKE_DELETE_REPORT

    “To delete this report to avoid re use

     CALL FUNCTION ‘RKE_DELETE_REPORT’
    EXPORTING
    PROGRAM = ‘
    ZDELENTREIS’
    importing
    subrc   = l_subrc.

    how to delete sap abap reportreport programming in SAP abapRKE_DELETE_REPORT SAP ABAPsap abap reportsap abap report commit work
    raju borda
    Raju is working with Technical areas like SAP ABAP, PI , Web design, JAVA , PBT, robotics as architect also functional areas like SCM , QM, MM , insurance . When he is not Doing above geeky things you might find him travelling , Cooking , dancing or drinking with friends :-) .
    • Have you ever seen standard SAP ABAP code like these

    • How to Enhance SAP Standard Code Inspector

    You Might Also Like

    Webdynpro for ABAP integration with google maps !

    August 18, 2017

    Let’s remember our old friend : Classical Reports !

    August 7, 2017

    Learn Parallel Processing in ABAP

    July 28, 2017

    No Comments

    Leave a Reply Cancel Reply

Sign up for some exciting content

Recent Posts

  • How to prepare for SAP IBP Certification
  • What is SAP Leonardo ?
  • RoadMap UI Tutorial webdynpro for ABAP
  • Offline Adobe forms in WebDynPro for ABAP
  • MVC Architecture for Webdynpro for ABAP

Categories

  • ABAP
  • Android
  • Coding Challenges
  • Enhancement
  • featured
  • Interviews
  • Learning Hub
  • PI ( Process integration )
  • SAP
  • SAP HANA
  • Uncategorized
  • Webdynpro for ABAP
  • Webdynpro For ABAP