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

BDC Transaction Vs Session

Former Member
0 Likes
2,645

Whats the exact difference between BDC Transaction VS BDC Session? Any simple example . Thanks.

Whether BAPI can be substitute for the above two techniques?

1 ACCEPTED SOLUTION
Read only

abdul_hakim
Active Contributor
0 Likes
1,638

Hi,

here is the difference..

<b>Call transaction:</b>

1.Synchronous Processing.

2.Synchronous and Asynchronous database updates.

3.Transfer of data for individual transaction,

4.Not suited for bulk transfer.

5.No automatic errror handling.

<b>Session:</b>

1.Asynchronous Processing.

2.Synchronous database updates.

3.Transfer of data for multiple transactions.

4.Best suited for bulk transfer.

5.Automatic errror handling.

6.SAP's standard approach for data transfer

<b>You can also use BAPI's if there is one available..</b>

Cheers,

Abdul Hakim

Whats the exact difference between BDC Transaction VS BDC Session? Any simple example . Thanks.

Whether BAPI can be substitute for the above two techniques?

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,638

BDC - Call Transaction is more of an online transaction, it executes in the same work process. Creating a session, allows you to put off the process to the background process, they are be administrated via SM35. You have better error handling using a session, because it remembers the errors and you can reprocess them. You can use a BAPI if there is one available, this will be simular to the BDC - CALL Transaction, the only difference is that there is no screen processing in the BAPI, which is better, because this makes it process faster than BDC.

REgards,

Rich Heilman

Read only

Former Member
0 Likes
1,638

BDC TRansaction : <b> Online </b>-The system won't store data for later processing.

Session : <b> later processing </b>-You can store the sessions and it can be used for later processing.

BAPI can't replace Session method.

Rgds,

OPJ.

Read only

abdul_hakim
Active Contributor
0 Likes
1,639

Hi,

here is the difference..

<b>Call transaction:</b>

1.Synchronous Processing.

2.Synchronous and Asynchronous database updates.

3.Transfer of data for individual transaction,

4.Not suited for bulk transfer.

5.No automatic errror handling.

<b>Session:</b>

1.Asynchronous Processing.

2.Synchronous database updates.

3.Transfer of data for multiple transactions.

4.Best suited for bulk transfer.

5.Automatic errror handling.

6.SAP's standard approach for data transfer

<b>You can also use BAPI's if there is one available..</b>

Cheers,

Abdul Hakim

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,638

bdc can be done in two ways

1. direct input (uses some fn modules to directly update dbtab)

2. batch input.

call transcation and session methods are the methods in batch input.

there are many differences between call transcation and session method like

1. session method is asynchronous processing and synchronous update while call transaction can use any mode for update .

2. in session method logs can be seen in session over view. in call transaction we have to handle using BDCMSGCOLL

3. session will not return sy-subrc while call transcation returns sy-subrs.

like wise there are few differences.

leaving that, the question is when to use which method.

the answer is it depends upon the scenario.

i will give u a nice example:

suppose, i need to use two transactions in my bdc.

the requirement is when the data is successfully updated in the first one, then update in the second one.

which method we need to go?

1. if we need to call two transactions, in both the methods not a problem.

2. in session method , betwwen bdc_opn_group and close_group, we can call any number of bdc_insert s in which we pass the transcations.

3. in call transaction ,we can call any number of transacions using call transaction <tcode>.

but now which method to use?

the scenario is when the first one is successfull, update the second one.

session method is clearly not possible as bdc_insert does not return sy-subrc = 0 which means succefull.

so, we need to go in this situation for call transaction method only

like wise depending on the situation we need to switch over.

if huge number of data is there to update we generally prefer session method rather than call transaction.

Read only

Former Member
0 Likes
1,638

BDC is the tool which is used to migrate data from one SAP system to another or from non-sap (eg. text files, excel files etc) system to a SAP system.

BDC uses two methods for the same.

1) Call Transaction

2) Batch Input Session

Following are some of the points which shows the differences between two.

CALL TRANSACTION BATCH INPUT SESSION

1) can upload the data from only one transaction 1) can upload the data from more than one transaction*

2) This is more faster than Batch Input Session 2) As compared to call transaction, this is slow

3) Data processes synchronously 3) Data processes asynchronously.

4) The records are immediately added to the 4) The records are not added to the database until the session is processed.

database table

5) Updation in database table is either Synchronous 5) Updation in database table is always Synchronous.

or Asynchronus.

6) Error logs are not created and hence the errors need 6) Error logs are created for error record.

to be handled explicitly.

7) The value of sy-subrc returned to 0 if successful. 7) The value of sy-subrc is never returned because records are

stored temporary in session and after the records are updated to the

database.