2007 Jun 18 6:58 AM
Hi Experts,
What is the syntax or code to quit or exit transaction just like the cancel functionality? Thanks!
Best Regards,
Kurrt
2007 Jun 18 7:05 AM
i am not sure what is your requirement exactly... but if you have to leave to another transaction then you can use LEAVE TO TRANSACTION <TCODE>.
or you can use LEAVE PROGRAM for leaving from the transaction.
regards
shiba dutta
i am not sure what is your requirement exactly... but if you have to leave to another transaction then you can use LEAVE TO TRANSACTION <TCODE>.
or you can use LEAVE PROGRAM for leaving from the transaction.
regards
shiba dutta
2007 Jun 18 7:04 AM
Hi,
EXIT in Loops
Basic form
EXIT.
Effect
Exits the current loop processing in loop structures such as:
DO ... ENDDO
WHILE ... ENDWHILE
LOOP ... ENDLOOP
SELECT ... ENDSELECT
Note
Outside loop structures, the system exits the current processing block (event block, dialog module, procedure). During report processing, that is, during the event blocks START-OF-SELECTION, GET, END-OF-SELECTION, the system goes to the basic list display.
SAP recommends that you use EXIT only in loops. To exit processing blocks, use the statement RETURN.
Example
DATA: SAP_COUNT TYPE I,
WA_T100 TYPE T100.
SELECT * FROM T100 INTO WA_T100 WHERE SPRSL = SY-LANGU AND
ARBGB = 'DS'.
WRITE / WA_T100-TEXT.
IF WA_T100-TEXT CS 'SAP'.
ADD 1 TO SAP_COUNT.
IF SAP_COUNT = 3.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
Note
If several loops are nested, EXIT only exits the current loop. The processing continues after the corresponding END... statement in the loop at the next higher level.
Use the Function
module TH_DELETE_MODE to close the session. If you have only one screen this will kill that
<b>Reward points</b>
Regards
2007 Jun 18 7:05 AM
i am not sure what is your requirement exactly... but if you have to leave to another transaction then you can use LEAVE TO TRANSACTION <TCODE>.
or you can use LEAVE PROGRAM for leaving from the transaction.
regards
shiba dutta
2007 Jun 18 7:41 AM
Hi Kurtt,
Even I was not able to get a clear picture of your requirement bit if you are talking about the 'Exit' button on the standard toolbar, then its Function code is 'I' and Functional Type is 'S' (ie System Function). However, I did not get why you need to know this because as far as I know, you need not implement th elogic behind standard toolbar.
SEcondly if you want to have an exit in your trnasaction, then you can give your own button with your own functio code either on the application toolbar or on the screen. You can also use the 'Leave program' or 'Leave to screen 0' statements according to your functionality or requirement in any of your case statements.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |