‎2009 Apr 17 2:00 PM
how can i build a program
which execute only one time
after complete the execution
the program self destroyed.
is any way to done this.
tks
narendra
‎2009 Apr 21 1:54 PM
Hi,
After saving your source code in a local file or include, Try this.
&----
*& Report ZTEST_MISION_IMPOSSIBLE
*&
&----
*&
*&
&----
REPORT ztest_mision_impossible.
PARAMETERS : p_yrwtdi AS CHECKBOX.
AT SELECTION-SCREEN OUTPUT.
IF p_yrwtdi IS NOT INITIAL.
CALL FUNCTION 'RS_DELETE_PROGRAM'
EXPORTING
program = sy-repid
suppress_popup = 'X'
EXCEPTIONS
enqueue_lock = 1
object_not_found = 2
permission_failure = 3
reject_deletion = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
START-OF-SELECTION.
WRITE : 'Mission : Impossible!'.
END-OF-SELECTION.
Issa
Edited by: Issa SY on Apr 21, 2009 2:55 PM
‎2009 Apr 17 2:09 PM
Yes , you can ...
BUt for that you have to do soem research..
Once processing is over .. at end-of-selection event .. create a FM and delete the TADIR entry for this object.
‎2009 Apr 17 2:19 PM
If possible you can create one customised table and set flag after completing your job. Add logic in your program that it will proceed only when flag from this customised table is empty.
‎2009 Apr 17 2:23 PM
Please see the help file on statement GENERATE SUBROUTINE POOL.
Rob
‎2009 Apr 17 9:31 PM
try writing a BDC (at end of selection) for deleting that object, this will ensure deleting any entries anywhere corresponding to this program
Edited by: Sudhakar Manda on Apr 18, 2009 2:01 AM
‎2009 Apr 21 10:21 AM
You might have trouble getting any further than a unit test with this...
‎2009 Apr 21 1:54 PM
Hi,
After saving your source code in a local file or include, Try this.
&----
*& Report ZTEST_MISION_IMPOSSIBLE
*&
&----
*&
*&
&----
REPORT ztest_mision_impossible.
PARAMETERS : p_yrwtdi AS CHECKBOX.
AT SELECTION-SCREEN OUTPUT.
IF p_yrwtdi IS NOT INITIAL.
CALL FUNCTION 'RS_DELETE_PROGRAM'
EXPORTING
program = sy-repid
suppress_popup = 'X'
EXCEPTIONS
enqueue_lock = 1
object_not_found = 2
permission_failure = 3
reject_deletion = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
START-OF-SELECTION.
WRITE : 'Mission : Impossible!'.
END-OF-SELECTION.
Issa
Edited by: Issa SY on Apr 21, 2009 2:55 PM
‎2009 Apr 21 2:11 PM