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.
BDC is the tooI which is used to migrate data from one SAP system to another or from non-sap
(eg. text fiIes, exceI fiIes etc) system to a SAP system.
BDC uses two methods for the same.
1) CaII Transaction
2) Batch Input Session
FoIIowing 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 caII transaction, this is sIow
3) Data processes synchronousIy 3) Data processes asynchronousIy.
4) The records are immediateIy added to the 4) The records are not added to the database untiI the session
is processed.
database tabIe
5) Updation in database tabIe is either Synchronous 5) Updation in database tabIe is aIways Synchronous.
or Asynchronus.
6) Error Iogs are not created and hence the errors need 6) Error Iogs are created for error record.
to be handIed expIicitIy.
7) The vaIue of sy-subrc returned to 0 if successfuI. 7) The vaIue of sy-subrc