Monday, September 26, 2011

Report that gets deleted on execution!

Many a times we came across scenarios when we need to develop a program that needs to be executed once. We end up deleting the program manually and keeping a backup in TR. Here's how we can develop a program that deletes itself on execution.

P.S. - Idea can also be used simply to dazzle folks...!! ;)

*&---------------------------------------------------------------------*
*& Report  ZREPSELFDELETE
*&---------------------------------------------------------------------*
*& This Report deletes itself on execution
*&---------------------------------------------------------------------*

REPORT  ZREPSELFDELETE.

*===Write Logic as per requirement or leave blank (demo purpose)

*===Delete Report on execution
CALL FUNCTION 'RKE_DELETE_REPORT'
  EXPORTING
    program       = 'ZREPSELFDELETE'.

--------------------------------------------------------------------------



Execute Report once and that's it. Report is deleted!

No comments:

Post a Comment