2007 Jun 20 4:29 AM
Hi ,
why call transaction method is faster than session method . Or is it as per the requirement one can be given preference over the other . plz shed light on this .
Thx ,
Abhishek
2007 Jun 20 4:32 AM
hi..
SESSION METHOD
Data is not updated in database table unless Session is processed.
No sy-subrc is returned.
Error log is created for error records.
Updation in database table is always synchronous
CALL TRANSACTION
Immediate updation in database table.
Sy-subrc is returned.
Errors need to be handled explicitly
Updation in database table can be synchronous Or Asynchronous.
Thanks
Ashu
2007 Jun 20 4:32 AM
Hi Abhishek,
Check this link. You will get a clear idea of the difference.
http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/
In the link Batch input is nothing but session method.
Get back to me if you got any more questions. Reward if useful.
Regards
Aneesh.
2007 Jun 20 4:32 AM
hi..
SESSION METHOD
Data is not updated in database table unless Session is processed.
No sy-subrc is returned.
Error log is created for error records.
Updation in database table is always synchronous
CALL TRANSACTION
Immediate updation in database table.
Sy-subrc is returned.
Errors need to be handled explicitly
Updation in database table can be synchronous Or Asynchronous.
Thanks
Ashu
2007 Jun 20 4:41 AM
Session method Use the BDC_OPEN_GROUP to create a session. Once we have created a session, then we can insert the batch input data into it with BDC_INSERT. Use the BDC_INSERT to add a transaction to a batch input session. We specify the transaction that is to be started in the call to BDC_INSERT. We must provide a BDCDATA structure that contains all the data required to process the transaction completely. Use the BDC_CLOSE_GROUP to close a session after we have inserted all of our batch input data into it. Once a session is closed, it can be processed.
Call Transaction -
In this method, we use CALL TRANSACTION USING to run an SAP transaction. External data does not have to be deposited in a session for later processing. Instead, the entire batch input process takes place inline in our program.
Call transaction is faster then session method. But usually we use session method in real time...because we can transfer large amount of data from internal table to database and if any errors in a session, then process will not complete until session get correct.
2007 Jun 20 4:43 AM
Gupta,
Generally When we send the data through screens it has to update lot of database tables.
In session method : until first record stores in all related database tables the next record has to wait.So it will take time.
In Call transaction Method :System never worried about first reccord whether it stored or not the next record will get processed .So this method is faster.
Don't forget to reward if useful....
2007 Jun 20 4:47 AM
Thanks for ur replies ,
I have one more query ..When we say that we have Errors need to be handled explicitly in call transaction .. how do we achieve this ?
Abhishek .
2007 Jun 20 4:50 AM
use bdcmsgcoll structure in the program or use fm format_message..
2007 Jun 20 5:21 AM