In SAP ABAP Batch Data Communication (BDC), what is the main difference between the session method and the CALL TRANSACTION method?

Difficulty: Medium

Correct Answer: The session method stores BDC data in a session for later background processing with standard logs, while CALL TRANSACTION processes records immediately in the program with optional synchronous or asynchronous updates

Explanation:


Introduction / Context:
Batch Data Communication (BDC) is a classic technique in SAP ABAP for automating data entry into online transactions. There are two main ways to perform BDC: the session method and the CALL TRANSACTION method. Interviewers often ask about their differences because the choice between them affects logging, error handling, performance, and user control over processing. This question focuses on the conceptual difference between these two BDC approaches.


Given Data / Assumptions:

  • We are writing an ABAP program that loads large amounts of data into standard SAP transactions.
  • We understand BDC as a method of simulating user input through screens and fields.
  • We need to distinguish how the session method and CALL TRANSACTION method process data and handle logs.


Concept / Approach:
In the session method, the program records BDC data into a session using function modules like BDC_OPEN_GROUP and BDC_INSERT. The session is then processed later using transaction SM35, usually in the background, and generates standard batch input logs. In the CALL TRANSACTION method, the program calls a transaction directly with BDC data using CALL TRANSACTION, processing each record immediately and optionally capturing messages in an internal table. This means session method is more robust and better for standard batch processing with logs, while CALL TRANSACTION provides more flexibility and control within the program.


Step-by-Step Solution:
Step 1: For the session method, the program collects BDC data and writes it to a batch input session. Step 2: Later, an administrator or scheduled job runs transaction SM35 to process that session, often in the background. Step 3: Standard batch input logs are generated automatically, and error handling is supported through the batch input monitor. Step 4: For the CALL TRANSACTION method, the program uses CALL TRANSACTION tcode USING bdcdata OPTIONS FROM opt MESSAGES INTO messtab. Step 5: Each record is processed immediately, and the program can react to success or error messages in messtab, making this method more flexible but also more dependent on custom error handling.


Verification / Alternative check:
By reading SAP documentation and practising with simple BDC programs, you can see that sessions created by the session method appear in SM35, while CALL TRANSACTION does not create such sessions. Instead, CALL TRANSACTION runs directly when the program executes. Comparing the available logs and how errors are handled in both approaches confirms the core differences described above.


Why Other Options Are Wrong:
Option A is incorrect because the session method typically runs in the background, not online only, and can still produce standard logs. CALL TRANSACTION does not always run in the background and can provide logs through message tables. Option C is incorrect because both methods can be used with dialog transactions; CALL TRANSACTION is not restricted to update function modules. Option D is incorrect because the two methods differ significantly in how they manage sessions, logging, and timing of execution.


Common Pitfalls:
A common pitfall is using CALL TRANSACTION for very large volumes of data without proper error logging, which makes it hard to trace failures. Another mistake is assuming that both methods provide the same level of restart capability; in reality, the session method is better for restartable background processing. Developers should choose the method based on volume, logging needs, and control requirements, rather than using CALL TRANSACTION everywhere by default.


Final Answer:
The main difference is that the session method stores BDC data in a session for later background processing with standard logs, while CALL TRANSACTION processes records immediately within the program with optional synchronous or asynchronous updates.

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion