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

Difference between Session method and Call transaction method

Former Member
0 Kudos
635

Hi,

Difference between Session method and Call transaction method in BDC

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
435

Hi,

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.

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

Reward if useful!

6 REPLIES 6
Read only

Former Member
0 Kudos
435

hi,

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.

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

Check these link:

http://www.sap-img.com/abap/difference-between-batch-input-and-call-transaction-in-bdc.htm

http://www.sap-img.com/abap/question-about-bdc-program.htm

http://www.itcserver.com/blog/2006/06/30/batch-input-vs-call-transaction/

http://www.planetsap.com/bdc_main_page.htm

Read only

Former Member
0 Kudos
436

Hi,

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.

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

Reward if useful!

Read only

Former Member
0 Kudos
435

Hi,

Batch Input Session method is asynchronous as told by others here. But the advantage of this is that you have all the error messages and the data for each transaction held persistantly. You don't have to code anything for processing them or writing the logs.

But at the same time, the same feature can be disadvantageous if you need to react to an error or if there are too many errors to manually correct in a session. Since the session are created in the program and its execution is done seperately, you loose the trackability of such transactions.

With a call transaction, what was a disadvantage above will become an advantage. Call transaction immediately gives you messages back and you can react to it in your program. But the disadvantage is that, if you have several hundreds of transactions to run, running them from within the program can be resource crunching affair. It will hamper the system performance and you cannot really distribute the load. Of course, you have some mechanisms with which you can overcome this, but you will have to code for it. Also, storing the messages and storing the errored transaction data etc will have to be handled by you in the program. Whereas, in batch input session, your program's job is to just create the session, after that everything is standard SAP system's responsibility.

Ideally, you should do a call transaction if the resources are not a problem and if it fails, put the errored transaction into a session.

You can decide based on the data volume that your BDC is processing. If data volume is high go for session else call transaction will do.The call transaction updates will be instantaneous where as session needs to be processed explictly after creation.

you can do it both manually and by using program RSBDCSUB

<b>Reward points</b>

Regards

Read only

Former Member
0 Kudos
435

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

Srinu

Read only

Former Member
435

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

Srinu

Read only

Former Member
0 Kudos
435

Hi Subramanian,

Call transaction is mainly used when you want to update the database using a single

transaction , you can also update the database in asynchronous mode, where as

session is used to perform huge database updations using more than one transaction

and which will last for a long time.

Regards,

Antony Thomas

reward if find useful!