Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

call transaction method Vs session method

Former Member
0 Likes
808

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
776

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

7 REPLIES 7
Read only

Former Member
0 Likes
776

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.

Read only

Former Member
0 Likes
777

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

Read only

Former Member
0 Likes
776

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.

Read only

Former Member
0 Likes
776

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....

Read only

abhishek_gupta2
Participant
0 Likes
776

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 .

Read only

0 Likes
776

use bdcmsgcoll structure in the program or use fm format_message..

Read only

abhishek_gupta2
Participant
0 Likes
776

thnx evry1