Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

self destroyed program

Former Member
0 Likes
855

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
828

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

7 REPLIES 7
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
828

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.

Read only

0 Likes
828

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.

Read only

Former Member
0 Likes
828

Please see the help file on statement GENERATE SUBROUTINE POOL.

Rob

Read only

Former Member
0 Likes
828

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

Read only

Former Member
0 Likes
828

You might have trouble getting any further than a unit test with this...

Read only

Former Member
0 Likes
829

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

Read only

ThomasZloch
Active Contributor
0 Likes
828

check with your IT auditors, they will pull you by the ears