01-16-2008 11:12 AM
Hi friends,
what's the difference between
LEAVE TO TRANSACTION <tcod> [AND SKIP FIRST SCREEN].
&
CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN]
and any one give me sample program using the above 2 statements
points will be given for examples
regards and thanks
Vijaya
01-16-2008 11:14 AM
in case of call transaction,
both calling and called screen will be active. if u come back to the calling screen back, it will be available.
in case of leave to transaction,
calling screen will be quited and called screen will be active. If u want to come back to the main screen, u cant.
try this code:
report zone.
call transaction 'MM01'.
write 'hi'.
report ztwo.
leave to transaction 'MM01'.
write 'hello'. " this line wont be executed.
*Execute both and come back
Regards.
01-16-2008 11:34 AM
Hi Sravan, Can you pls send me snap shots on navigational steps of MIGO ...
01-16-2008 11:15 AM
Hi,
in case of call transaction,
both calling and called screen will be active. if u come back to the calling screen back, it will be available.
in case of leave to transaction,
calling screen will be quited and called screen will be active. If u want to come back to the main screen, u cant.
try this code:
report zone.
call transaction 'MM01'.
write 'hi'.
report ztwo.
leave to transaction 'MM01'.
write 'hello'. " this line wont be executed.
*Execute both and come back
Call is used to "Call external component".
Leave is used to "Leave processing"
Call the transaction - The called transaction ends and control returns to the point from which it was called when the LEAVE PROGRAM statement is reached.
Leave to transaction - Ends the current processing and starts the transaction. All previous internal sessions are deleted from the stack, and one new internal session is opened for the program of the transaction that you called. When this session ends, controlreturns to the next-highest area menu.
01-16-2008 11:22 AM
01-16-2008 11:16 AM
Hi,
LEAVE TO TRANSACTION tcod AND SKIP FIRST SCREEN.
This statement ends the calling program and starts transaction tcod. This deletes the call stack (internal sessions) of all previous programs. At the end of the transaction, the system returns to the area menu from which the original program in the call stack was started.
If, on the other hand, you do not want to return to the calling program at the end of the new transaction, use the statement:
CALL TRANSACTION tcod AND SKIP FIRST SCREEN USING itab.
This statement saves the data of the calling program, and starts transaction tcod. At the end of the transaction, the system returns to the statement following the call in the calling report. If the LEAVEstatement occurs within the called transaction, the transaction ends and control returns to the program in which the call occurred.
Regards,
Satish
01-16-2008 11:22 AM
Hi,
in the leave to transaction the control wont come back to the program where actually this statement has written i.e. the next staments after this statement wont get executed
where as in the case of call transaction after execution of the statement the control comes to the next statement wher it is actually written ..
hopw u got it plzz reward if it is usefull to u ...