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

bdc doubt (session method)

Former Member
0 Likes
437

hi all,

i have read from many materials that using session methods we can run multiple transactions at a time

whereas using call transaction only one transaction at a

time.

so iwant to know that how we can run multiple transaction at a time.

plz clear my doubt

thanks & regards

sanjeev

4 REPLIES 4
Read only

former_member404244
Active Contributor
0 Likes
413

Hi Sanjeev,

go for call transaction,becoz it returns sy-subrc value.So first run one transaction and if sy-subrc eq 0 then only run the other transaction.

Regards,

Nagaraj

Read only

Former Member
0 Likes
413

Hi sanjeev,

1. Well, thats not directly true.

2.

a) for making one bdc session, we do

bdc_open_group

bdc_insert

bdc_close_group

b) and for one call transaction,

we simply do

call transaction.

3. The above full (a)

is only for one tcode.

If we repeat it, i mean, we repeat the full steps of a,

then another session will be created,

in which we can give another tcode,

thats all.

4. The same thing applies for (b) also.

regards,

amit m.

Read only

Former Member
0 Likes
413

I agree with Amit on his version but I feel your point of multiple transaction in session as compared to Call transaction might be referring to the below point.

In session method you create a session where you are calling the same transaction multiple times with different data...Example you created a session to change a field in material master...here if you check the created bdc session, if you would find that you are calling mm02 for each material record...hence a session can contain multiple transaction. In short, though you have a transaction call for each material record a bdc contains multiple such calls in one session. But in call transaction basically you call that transaction again for each material record but it is one call for each record.

Read only

Former Member
0 Likes
413

Hi,

In session method we can call two different

trasaction by calling function

BDC_insert with two different tcodes

and they will be part of same session

bdc_open_group

CALL FUNCTION 'BDC_OPEN_GROUP'

EXPORTING

CLIENT = SY-MANDT

GROUP = WS-MAPPE

KEEP = 'X'

USER = SY-UNAME.

ws-tcode = 'VA01'.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = WS-TCODE " Transaction code

TABLES

DYNPROTAB = BDCDATA. " Transaction data

refresh bdcdata

ws-tcode = 'VA02'.

CALL FUNCTION 'BDC_INSERT'

EXPORTING

TCODE = WS-TCODE " Transaction code

TABLES

DYNPROTAB = BDCDATA. " Transaction data

where as in call trasansction we can call only one

transaction at a time

call transaction 'VA01' using bdcdata messages into

messtab.

call transaction 'VA02' using bdcdata messages into

messtab.

regards

amole