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

main diff between call transaction and session method

Former Member
0 Likes
6,531

hi frnds.

my friend went for an interview they asked her whts the diff between call tran adn session?

she told more thn one transaction we can call for an session she told itseems. but he told tht by cal tran also u cn call more thn one tran it seems... so please canu help me out regarding this question? how we hve to tell in interview?

in advance thanks....

8 REPLIES 8
Read only

Former Member
0 Likes
4,808

Call transaction runs directly and is usually faster since you don't have the additional overhead involved in creating and processing a session.

The sessions method creates a session which is later processed using SM35. There is more overhead, but there are some advantages.

With the session method, you can review the details of the batch session, such as input values and processing errors, using the tools in SM35.

SM35 also has built in capabilities for handling errors and marking transactions in error. Using call transaction, this must be done explicitly.

Call transaction is better suited when dealing with small amounts of data.

It is better to use the session method when processing large amounts of data.

Good luck

Brian

Message was edited by:

Brian Sammond

Read only

Former Member
0 Likes
4,808

Hi

Synchronous versus Asynchronous

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘S’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘A’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.

reward if usefull

Read only

Former Member
0 Likes
4,808

Hi

Diff b/w call transaction and session method is

Call transaction.

1) asynchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

Session method.

1) synchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Rgds

Raghav T

Read only

Former Member
0 Likes
4,808

The most important aspects of the CALL TRANSACTION USING interface are: - Synchronous processing - <b>Transfers data for a single transaction</b> - Synchronous and asynchronous database updating both possible The program specifies which kind of updating is desired. - Separate LUW for the transaction The system performs a database commit immediately before and after the CALL TRANSACTION USING statement. - No batch input processing log is generated.

The most important aspects of the session method interface are: - Asynchronous processing - <b>Transfers data for multiple transactions</b> - 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

Reward points if it is usefull......

Girish

Read only

Former Member
Read only

Former Member
0 Likes
4,808

Hi,

SESSION method:

Is a standard procedure for transferring large amount of data into the R/3 system.

Data consistency is ensured because batch input uses all thje checks conducted on the normal screen.

It is a two step procedure:

1. Progarm: creates batch input session. This session is the data file that includes everything to begin the transaction.

2. Process session: Which then actually transfers the data to database table.

In this method an ABAP/4 program reads the external data that is to be entered in the SAP system and stores the data in a session.

A session stores the actions that are required to enter your data using normal SAP transactions i.e. data is transferred to session which inturn transfers data to database table. Session is an intermediate step between internal table and database table.

Data along with it's actions are stored in session. i.e. data for screen fields, to which screen it is passed, the program name behind it and how next screen is processed.

When the program has finished generating the session, u can run the session to execute the SAP transactions in it.

BDC_OPEN_GROUP

You create the session through program by BDC_OPEN_GROUP function.

1) User Name: User Name.

2) Group : Name of the session

3) Lock Date : The date when you want to process the session.

4) Keep : This parameter is passed as 'X' when you want to retain session even after processing it.

BDC_INSERT

Data is transferred to session by BDC_INSERT.

BDC_CLOSE_GROUP.

With this function the session will be closed.

CALL TRANSACTION method.

Syntax: call transaction <tr code> using <bdctab>

mode <A/N/E>

update <S/A>

messages into <internal table>.

<tr code> : transaction code

<bdctab> : Name of the BDC table

mode: mode in which you execute the transaction.

A : all screen mode ( all the screens of the transaction are displayed )

N : no screen mode ( no screen will be displayed when you execute the transaction )

E : error screen ( only those screens are displayed where in you have error record )

Update type:

S: synchronous update in which if you change data of one table then all the related tables gets updated and SY_SUBRC is returned for once and all.

A: asynchronous update in which if you change data of one table, the sy-subrc is returned and then updation of other affected tables takes place. So if system fails to update other tables still sy-subrc returned is zero.(that is when first table gets updated ).

messages: if you update database table, operation is either successful or unsuccessful. These messages are stored in internal table. This internal table structure is like BDCMSGCOLL.

TCODE: transaction code.

DYNAME: batch input module name.

DYNNUMB: batch input dyn no.

MSGTYP: batch input message type.

MSGSPRA: batch input language id of message.

MSGID: message id.

MSGV1….MSGV5: message variables

For each entry which is updated in the database table message is available in BDCMSGCOLL.

Reward if useful

Regards

sanjay reddy

Read only

Former Member
0 Likes
4,808

Hi

Batch Input and CALL TRANSACTION are both data transfer methods. Batch Input usually are used to transfer large amount of data. For example you are implementing a new SAP project, and of course you will need some data transfer from legacy system to SAP system. If there is no standard batch input program, direct input program, you would need to write your own data transfer program and it is going to be batch input program. CALL TRANSACTION methods is real-time method, whenever you run the program CALL TRANSACTION can be triggered. CALL TRANSACTION is used especially for integration actions between two SAP systems or between different modules. Users sometimes wish to do something like that click a button or an item then SAP would inserts or changes data automatically. Here CALL TRANSACTION should be considered. You use CALL TRANSACTION and you do everything automatically, collect necessary data, call transaction and so do database update. If any error occurs, show the user them.

Batch Input

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

It 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 modules calls from the ABAP program.

The most important aspects of the session interface are:

Asynchronous processing

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

CALL TRANSACTION

In the second method, your program uses the ABAP statement CALL TRANSACTION USING to run an SAP transaction. External data doesn’t have to be deposited in a session for later processing. Instead, the entire batch input process takes place inline in your program. With CALL TRANSACTION USING, the system process 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

Read only

Former Member
0 Likes
4,808

Hi

Session method.

1) Assynchronous processing.

2) can tranfer large amount of data.

3) processing is slower.

4) error log is created

5) data is not updated until session is processed.

Call transaction.

1) Synchronous processing

2) can transfer small amount of data

3) processing is faster.

4) errors need to be handled explicitly

5) data is updated automatically

The most important aspects of the CALL TRANSACTION is - Asynchronous processing - Transfers data for a single transaction -

While for session method -It does not update transaction figures until the session has been processed.

Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.

Call Transaction method makes an immediate call on the transaction and upload starts immediately.,

Session method only creates a session of the whole recording including all the values that have to be inserted,it does not insert values into the system. This session can be invoked anytime to upload values

In short call transaction is immediates

session is not immediate

<b>Synchronous is simoultaneous upload</b>

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘S’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With synchronous updating, we can check SY-SUBRC to determine the success of the transaction and the actual update to the database.

<b>Asynchornous is non-simultaneous upload</b>

DO.

………

PERFORM FILL_BDC_TAB.

CALL TRANSACTION ‘FK02’

USING BDC_TAB

MODE ‘N’

UPDATE ‘A’.

IF SY-SUBRC < > 0.

WRITE: /‘ERROR’.

ENDIF.

ENDDO.

With asynchronous updating, we can check SY-SUBRC to determine the success of the transaction only, not the actual update to the database.