2007 May 21 8:10 AM
Hello,
Is it possible to use call transaction statement and open the called transaction in a new session?
2007 May 21 8:12 AM
Hi,
You can use the call statement like:
CALL TRANSACTION tcod.
Additions:
1. ... AND SKIP FIRST SCREEN
2. ... USING itab
2a. ... OPTIONS FROM opt
2b. ... MODE mode
2c. ... UPDATE f
2d. ... MESSAGES INTO itab
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Incorrect transaction call.
Effect
Calls the transaction tcod; you can specify tcod either as a literal or a variable. The called transaction ends and control returns to the point from which it was called when the LEAVE PROGRAM statement is reached. You can only use one of the two additions in each statement.
Notes
Please consult Data Area and Modularization Unit Organization documentation as well.
You can use a namespace prefix with transactions.
Example
CALL TRANSACTION 'SP01'.
Addition 1
... AND SKIP FIRST SCREEN
Effect
Skips the initial screen of the transaction (as long as all of its required fields can be filled using the SPA/GPA mechanism.
Addition 2
... USING itab
Effect
Calls transaction tcod and passes the internal table itab to it. itab contains one or more screens in batch input format.
If the transaction sends a message, it is placed in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ..., SY-MSGV4.
The return code is set as follows:
SY-SUBRC = 0:
Processing successful.
SY-SUBRC <> 0:
An error occurred and the transaction terminated.
Notes
A called transaction ends successfully in the following circumstances:
1. COMMIT WORK
2. Next screen = 0
3. LEAVE TO TRANSACTION SPACE
You cannot use either MODE or UPDATE with the OPTIONS FROM addition.
Addition 2a
... OPTIONS FROM opt
Effect
Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
DISMODE
Display mode (like the MODE addition)
UPDMODE
Update mode (like the UPDATE addition)
CATTMODE
CATT mode (controls a CATT)
CATT mode can have the following values:
' ' No CATT active
'N' CATT without single-screen control
'A' CATT with single-screen control
DEFSIZE
Use default window size
RACOMMIT
Do not end transaction at COMMIT WORK
NOBINPT
No batch input mode (that is, SY-BINPT = SPACE)
NOBIEND
No batch input mode after the end of BDC data.
The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
'X' Yes
' ' No
If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
DISMODE
From addition MODE
UPDMODE
From addition UPDATE
CATTMODE
No CATT active
DEFSIZE
Do not use default window size
RACOMMIT
Successful end on COMMIT WORK
NOBINPT
Batch input mode active ( SY-BINPT = X
NOBIEND
Batch input mode remains active after the BDC data
Addition 2b
... MODE mode
Effect
The display mode mode can take the following values:
'A' Display the screens
'E' Only display if an error occurs
'N' Do not display
If you do not specify the MODE addition, the display mode is 'A'.
If you called a transaction in display mode E and a screen appears because there is no more BDC data, the system automatically switches to display mode A.
Addition 2c
... UPDATE f
Effect
The specified update mode f determines the update type. It can take the following values:
'A' (asynchronous update)
'S' (synchronous update)
'L' (local update)
If you do not specify the UPDATE addition, the default update mode 'A' is used.
Addition 2d
... MESSAGES INTO itab
Effect
Any messages that occur during CALL TRANSACTION USING ... are collected in the specified internal table. The internal table must have the structure BDCMSGCOLL.
Example
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM = 'SAPMS38M'.
WA_BDCDATA-DYNPRO = '0100'.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.
WA_BDCDATA-FVAL = PROGRAM.
APPEND WA_BDCDATA TO BDCDATA.
...
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO ITAB.
Notes
Runtime errors:
CALL_TRANSACTION_NOT_FOUND: Transaction unknown
CALL_TRANSACTION_IS_MENU: Transaction is a menu
CALL_TRANSACTION_USING_NESTED: Recursive CALL TRANSACTION USING
CALL_TRANSACTION_LOCKED: Transaction is locked
Regards,
Balakrishna.N
Hi,
You can use the call statement like:
CALL TRANSACTION tcod.
Additions:
1. ... AND SKIP FIRST SCREEN
2. ... USING itab
2a. ... OPTIONS FROM opt
2b. ... MODE mode
2c. ... UPDATE f
2d. ... MESSAGES INTO itab
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Incorrect transaction call.
Effect
Calls the transaction tcod; you can specify tcod either as a literal or a variable. The called transaction ends and control returns to the point from which it was called when the LEAVE PROGRAM statement is reached. You can only use one of the two additions in each statement.
Notes
Please consult Data Area and Modularization Unit Organization documentation as well.
You can use a namespace prefix with transactions.
Example
CALL TRANSACTION 'SP01'.
Addition 1
... AND SKIP FIRST SCREEN
Effect
Skips the initial screen of the transaction (as long as all of its required fields can be filled using the SPA/GPA mechanism.
Addition 2
... USING itab
Effect
Calls transaction tcod and passes the internal table itab to it. itab contains one or more screens in batch input format.
If the transaction sends a message, it is placed in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ..., SY-MSGV4.
The return code is set as follows:
SY-SUBRC = 0:
Processing successful.
SY-SUBRC <> 0:
An error occurred and the transaction terminated.
Notes
A called transaction ends successfully in the following circumstances:
1. COMMIT WORK
2. Next screen = 0
3. LEAVE TO TRANSACTION SPACE
You cannot use either MODE or UPDATE with the OPTIONS FROM addition.
Addition 2a
... OPTIONS FROM opt
Effect
Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
DISMODE
Display mode (like the MODE addition)
UPDMODE
Update mode (like the UPDATE addition)
CATTMODE
CATT mode (controls a CATT)
CATT mode can have the following values:
' ' No CATT active
'N' CATT without single-screen control
'A' CATT with single-screen control
DEFSIZE
Use default window size
RACOMMIT
Do not end transaction at COMMIT WORK
NOBINPT
No batch input mode (that is, SY-BINPT = SPACE)
NOBIEND
No batch input mode after the end of BDC data.
The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
'X' Yes
' ' No
If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
DISMODE
From addition MODE
UPDMODE
From addition UPDATE
CATTMODE
No CATT active
DEFSIZE
Do not use default window size
RACOMMIT
Successful end on COMMIT WORK
NOBINPT
Batch input mode active ( SY-BINPT = X
NOBIEND
Batch input mode remains active after the BDC data
Addition 2b
... MODE mode
Effect
The display mode mode can take the following values:
'A' Display the screens
'E' Only display if an error occurs
'N' Do not display
If you do not specify the MODE addition, the display mode is 'A'.
If you called a transaction in display mode E and a screen appears because there is no more BDC data, the system automatically switches to display mode A.
Addition 2c
... UPDATE f
Effect
The specified update mode f determines the update type. It can take the following values:
'A' (asynchronous update)
'S' (synchronous update)
'L' (local update)
If you do not specify the UPDATE addition, the default update mode 'A' is used.
Addition 2d
... MESSAGES INTO itab
Effect
Any messages that occur during CALL TRANSACTION USING ... are collected in the specified internal table. The internal table must have the structure BDCMSGCOLL.
Example
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM = 'SAPMS38M'.
WA_BDCDATA-DYNPRO = '0100'.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.
WA_BDCDATA-FVAL = PROGRAM.
APPEND WA_BDCDATA TO BDCDATA.
...
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO ITAB.
Notes
Runtime errors:
CALL_TRANSACTION_NOT_FOUND: Transaction unknown
CALL_TRANSACTION_IS_MENU: Transaction is a menu
CALL_TRANSACTION_USING_NESTED: Recursive CALL TRANSACTION USING
CALL_TRANSACTION_LOCKED: Transaction is locked
Regards,
Balakrishna.N
2007 May 21 8:12 AM
Hi,
You can use the call statement like:
CALL TRANSACTION tcod.
Additions:
1. ... AND SKIP FIRST SCREEN
2. ... USING itab
2a. ... OPTIONS FROM opt
2b. ... MODE mode
2c. ... UPDATE f
2d. ... MESSAGES INTO itab
In an ABAP Objects context, a more severe syntax check is performed that in other ABAP areas. See Incorrect transaction call.
Effect
Calls the transaction tcod; you can specify tcod either as a literal or a variable. The called transaction ends and control returns to the point from which it was called when the LEAVE PROGRAM statement is reached. You can only use one of the two additions in each statement.
Notes
Please consult Data Area and Modularization Unit Organization documentation as well.
You can use a namespace prefix with transactions.
Example
CALL TRANSACTION 'SP01'.
Addition 1
... AND SKIP FIRST SCREEN
Effect
Skips the initial screen of the transaction (as long as all of its required fields can be filled using the SPA/GPA mechanism.
Addition 2
... USING itab
Effect
Calls transaction tcod and passes the internal table itab to it. itab contains one or more screens in batch input format.
If the transaction sends a message, it is placed in the fields SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1, ..., SY-MSGV4.
The return code is set as follows:
SY-SUBRC = 0:
Processing successful.
SY-SUBRC <> 0:
An error occurred and the transaction terminated.
Notes
A called transaction ends successfully in the following circumstances:
1. COMMIT WORK
2. Next screen = 0
3. LEAVE TO TRANSACTION SPACE
You cannot use either MODE or UPDATE with the OPTIONS FROM addition.
Addition 2a
... OPTIONS FROM opt
Effect
Allows you to control processing using the values of the componetns of the structure opt, which must have the ABAP Dictionary type CTU_PARAMS. The components have the following meanings:
DISMODE
Display mode (like the MODE addition)
UPDMODE
Update mode (like the UPDATE addition)
CATTMODE
CATT mode (controls a CATT)
CATT mode can have the following values:
' ' No CATT active
'N' CATT without single-screen control
'A' CATT with single-screen control
DEFSIZE
Use default window size
RACOMMIT
Do not end transaction at COMMIT WORK
NOBINPT
No batch input mode (that is, SY-BINPT = SPACE)
NOBIEND
No batch input mode after the end of BDC data.
The components DEFSIZE , RACOMMIT, NOBINPT, and NOBIEND always take the following values:
'X' Yes
' ' No
If you do not use the OPTIONS FROM addition, the following control parameter settings apply:
DISMODE
From addition MODE
UPDMODE
From addition UPDATE
CATTMODE
No CATT active
DEFSIZE
Do not use default window size
RACOMMIT
Successful end on COMMIT WORK
NOBINPT
Batch input mode active ( SY-BINPT = X
NOBIEND
Batch input mode remains active after the BDC data
Addition 2b
... MODE mode
Effect
The display mode mode can take the following values:
'A' Display the screens
'E' Only display if an error occurs
'N' Do not display
If you do not specify the MODE addition, the display mode is 'A'.
If you called a transaction in display mode E and a screen appears because there is no more BDC data, the system automatically switches to display mode A.
Addition 2c
... UPDATE f
Effect
The specified update mode f determines the update type. It can take the following values:
'A' (asynchronous update)
'S' (synchronous update)
'L' (local update)
If you do not specify the UPDATE addition, the default update mode 'A' is used.
Addition 2d
... MESSAGES INTO itab
Effect
Any messages that occur during CALL TRANSACTION USING ... are collected in the specified internal table. The internal table must have the structure BDCMSGCOLL.
Example
DATA: BDCDATA TYPE TABLE OF BDCDATA.
DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
DATA: PROGRAM LIKE SY-REPID,
WA_BDCDATA TYPE BDCDATA.
WA_BDCDATA-PROGRAM = 'SAPMS38M'.
WA_BDCDATA-DYNPRO = '0100'.
WA_BDCDATA-DYNBEGIN = 'X'.
APPEND WA_BDCDATA TO BDCDATA.
CLEAR WA_BDCDATA.
WA_BDCDATA-FNAM = 'RS38M-PROGRAMM'.
WA_BDCDATA-FVAL = PROGRAM.
APPEND WA_BDCDATA TO BDCDATA.
...
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO ITAB.
Notes
Runtime errors:
CALL_TRANSACTION_NOT_FOUND: Transaction unknown
CALL_TRANSACTION_IS_MENU: Transaction is a menu
CALL_TRANSACTION_USING_NESTED: Recursive CALL TRANSACTION USING
CALL_TRANSACTION_LOCKED: Transaction is locked
Regards,
Balakrishna.N
2007 May 21 8:19 AM
Hello Marian,
The 'call transaction' does not come by option for opening the transaction in a new session...however you can create a FM of our own and put the call transaction statement in that. But while calling the FM do like this....
call function z_XX_XXX starting new task 'YYYY'.
where 'YYYY' is the transaction name and Z_XX_XXX is the function module created.
Also there are some standard FMs which will open the transaction in a new session.
CALL FUNCTION 'ABAP4_CALL_TRANSACTION' STARTING NEW TASK 'YYYY'
Hope this helps you.
Reward points if useful
Regards,
Prakash Ghantasala
2007 May 21 8:21 AM
hi,
please go through these FM
1.COPF_CALL_TRANSACTION
in this give your tcode and make NEW_SESSION = 'X'
2.ABAP4_CALL_TRANSACTION
3.HLP_MODE_CREATE
4. or you can just write TRANSACTION <...> AND SKIP FIRST SCREEN
in your program hope this will solve your problem
and don't forget to reward points,
regards,
2007 May 21 8:40 AM
HI,
No it is not possible open the called transaction in a new session
Regards,
kumar.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |