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

BDCs

Former Member
0 Likes
585

hello Guys,

You are given functional specs for a BDC program

and you need to decide whether to write a method

call transaction or a session. How u will decide?

Please Clarify...

Regards,

Ramesh M.

hello Guys,

You are given functional specs for a BDC program

and you need to decide whether to write a method

call transaction or a session. How u will decide?

Please Clarify...

Regards,

Ramesh M.

4 REPLIES 4
Read only

dani_mn
Active Contributor
0 Likes
561

HI,

it depends on the situation to decide between the two methods both have some advantages and otherwise.

Like

Call transaction is two to three faster than session method.

while in batch session method you have proper log maintain for all the steps and you can see the error happens in LOG using SM35.

Regards,

Read only

Former Member
0 Likes
561

hi Ramesh,

Normally we use both the methods i.,e we use call tranaction method to upload the data and session method to trap error data ...

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. Process will not complete until session get correct.

Regards,

Santosh

Read only

Former Member
0 Likes
561

Batch input methods

With the batch input method, an ABAP program reads the external data that is to be entered in the R/3 System and stores the data in a "batch input session". The session records the actions that are required to transfer data into the system using normal SAP transactions.

When the program has generated the session, you can run the session to execute the SAP transactions in it. You can explicitly start and monitor a session with the batch input management function (by choosing System ® Services ® Batch input), or have the session run in the background processing system.

CALL TRANSACTION methods

In the second method, your program uses the ABAP statement 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 your program.

Selecting a Data Transfer Method

When you transfer data in ABAP, you have three options to submit the data for the data transfer. Only the first two methods can be recommended without reservation. The third method, by way of CALL DIALOG, is outmoded. CALL DIALOG is less comfortable than the other methods. You should use it only if you must.

Use the CALL TRANSACTION USING statement

Summary: With CALL TRANSACTION USING, the system processes the data more quickly than with batch input sessions. Unlike batch input sessions, CALL TRANSACTION USING does not automatically support interactive correction or logging functions.

Your program prepares the data and then calls the corresponding transaction that is then processed immediately.

The most important features of CALL TRANSACTION USING are:

Synchronous processing

Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called

You can update the database both synchronously and asynchronously

The program specifies the update type

Separate LUW (logical units of work) for the transaction

The system executes a database commit immediately before and after the CALL TRANSACTION USING statement

No batch input processing log

Create a session on the batch input queue.

Summary: Offers management of sessions, support for playing back and correcting sessions that contain errors, and detailed logging.

Your program prepares the data and stores it in a batch input session. A session is a collection of transaction data for one or more transactions. Batch input sessions are maintained by the system in the batch input queue. You can process batch input sessions in the background processing system.

Your program must open a session in the queue before transferring data to it, and must close it again afterwards. All of these operations are performed by making function module calls from the ABAP program.

The most important aspects of the session interface are:

Asynchronous processing

Transfers data for multiple transactions

Synchronous database update

During processing, no transaction is started until the previous transaction has been written to the database.

A batch input processing log is generated for each session

Sessions cannot be generated in parallel

The batch input program must not open a session until it has closed the preceding session.

Read only

Former Member
0 Likes
561

Hi,

It all depends on how you are uploading the data. In case of a session method a session gets created which you have to execute .But if you are looking at some applicaion where the data upload has to be done throgh BDC when you run the application (eg., in a module pool program you enter some contents in the screen and when you press save this will invoke a BDC to upload data through some transaction) then have to go for call transaction method.Also in case of call transaction you have to do the error handling seperately.

Regards,

Sangram

SAP Consulatnt