‎2008 Feb 08 5:54 AM
hi
in which cases we use call transaction, in which cases we use session method
‎2008 Feb 08 5:59 AM
Session Method usually are used to transfer large amount of data. For example you are implementing a new SAP project, and of course you will need some data transfer from legacy system to SAP system.
CALL TRANSACTION is used especially for integration actions between two SAP systems or between different modules. Users sometimes wish to do something like that click a button or an item then SAP would inserts or changes data automatically. Here CALL TRANSACTION should be considered.
‎2008 Feb 08 6:02 AM
it is easy see we use call transaction whenever when we want user to monitor e.g. when we edit a record in ALV display and then save it a BDC run to save it .it is through call transaction.
but session method is meant for background processing of mass data and to get error log and other details all together .so it do not need anyone to monitor in session method.
plz reward if useful
vivek
‎2008 Feb 08 6:13 AM
‎2008 Feb 08 6:20 AM
SESSION METHOD
- It is one of the BDC techniques for uploading legacy data into SAP
- The data is transferring from the internal table to database table
through sessions.
- Data along with its action is stored in session.
- When the program has finished generating the session, you can run
the session to execute the transaction.
- Unless session is processed, the data is not transferred to
database tables.
- The following Function Modules are used in the session method.
1. BDC_OPEN_GROUP (Used to create the session)
Import Parameters :
USER - User Name
CLIENT - Client
GROUP - Name of the session
HOLD - The date when you want to process the session
KEEP - X retain session even after processing it
' ' - Delete the session after processing.
2. BDC_INSERT (Data is transferred to session)
Import Parameters :
TCODE - Transaction code
DYNPROTAB BDCDATA table
3. BDC_CLOSE_GROUP (Used to close a session)
- Processing Steps
1. Generate the batch input session using function module
BDC_OPEN_GROUP.
2. The proceed as follows for each transaction that the session
contains:
a. In the BDCDATA structure, enter the value for all screens
and fields that must be processed in the transaction.
b. Use BDC_INSERT to transfer the transaction and the BDCDATA
structure to the session.
3. Close the batch input session with BDC_CLOSE_GROUP.
4. Start to process the generated session in T.Code SM35.
WT IS CALL TRANSACTION METHOD? WT IS SYNTAX/PROCEDURE?
CALL TRANSACTION :
1. It is compatible for small amount of data only.
2. It process the data Synchronously. i.e., The data is updated
at the time of execution.
3. It updates data both Synchronously and Asynchronously. When
we use Synchronous mode, it always verify all the data updated
successfully in the database.
When we use Asynchronous mode, the system can not wait till
all the data updated in the database.
4. It can handle only one application at a time.
5. It does not have Log file, we need to design logfile explicitly
using BDCMSGCOLL stucture.
Syntax :
CALL TRANSACTION <T.Code> USING <BDCTAB> MODE <A/N/E> UPDATE <S/A>
MESSAGES INTO <BDCMSGCOLL Int.Table>
Parameter 1 : Transaction Code
Parameter 2 : It is name of BDCDATA table.
Parameter 3 : Specifying Mode in which you execute transaction.
A - All screen mode. All the screen of transaction
are displayed.
N - No screen mode. No screen is displayed when you
execute the transaction.
E - Error screen. Only those screens are displayed
where you have error record.
Parameter 4 : Specifying Update type by which data base table is
updated.
S - It is for Synchronous update in which if you
change data for one table then all the relacted
tables gets updated. And then sy-subrc is returned
i.e., sy-subrc is returned for once and all.
A - It is for Asynchronous update, when you change
data of one table, the sy-subrc is returned. And
then updation of other affected tables takes place
If system fails to update other tables still
sy-subrc returned is 0.
Parameter 5 : When you update database table, operation is either
successful or unsuccessful or operation is successful
with some warning. These messages are stored in
internal table which you specify along with MESSAGE
statement. This internal table should be declared like
BDCMSGCOLL structure.
Steps for CALL TRANSACTION Method :
1. Interanal table for the data (structure similler to local file)
2. BDCTAB like BDCDATA.
3. Use UPLOAD/WS_UPLOAD/GUI_UPLOAD or DATASETS for upload data from
local file to internal table (i.e. ITAB).
4. LOOP at Itab.
Populate BDCTAB table.
CALL TRANSACTION <T.Code> USING <BDCTAB> MODE <A/N/E>
UPDATE <S/A> MESSAGES INTO <BDCMSGCOLL Int.Table>
Refresh BDCTAB.
ENDLOOP.