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

Multiple transactions using Call transaction

Former Member
0 Likes
2,744

Hi All,

Can we use multiple transactions using Call transaction like Session method by refreshing the BDCDATA in the loop after every BDC insert? if not why.

Your answers will be rewarded.

Regards

Krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,483

Hi,

1.The basic defference in call transaction and session is that,session can handle multiple transactions.Where as Call Transaction,does not handle the Multiple transactions.

2.Why becaz,Call Transaction is Syncronus Processing and Session is Asnycronus Processing.

Regards,

Shiva Kumar

6 REPLIES 6
Read only

Former Member
0 Likes
1,484

Hi,

1.The basic defference in call transaction and session is that,session can handle multiple transactions.Where as Call Transaction,does not handle the Multiple transactions.

2.Why becaz,Call Transaction is Syncronus Processing and Session is Asnycronus Processing.

Regards,

Shiva Kumar

Read only

Former Member
0 Likes
1,483

No. The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

Read only

Former Member
0 Likes
1,483

Hi,

You cant use multiple transactions using call transaction. To over come this we go with session method.

One thing you can do is you can refresh the bdcdata after call transaction and again use the same table for calling another transaction in the same program

populate bdcdata

call transaction 'MM01' using bdcdata

refresh bdcdata

populate bdcdata

call transaction 'SE11' usind bdcdata.

regards

padma

Read only

Former Member
0 Likes
1,483

Hi Krishna,

The Session Method allows multiple transactions to be processed by SAP.

The CALL TRANSACTION method allows only a single transaction to be processed by SAP.

In Session method it is possible in the following manner.


CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT

GROUP = 'ERROR'

KEEP = 'X'
USER = SY-UNAME

PROG = SY-CPROG .
G_FLAG = 'X' .
ENDIF .

CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XK01'

TABLES
DYNPROTAB = T_BDCDATA .


ENDFORM. " SUB_CREATE_SES

CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'XD01'

TABLES
DYNPROTAB = T1_BDCDATA .


ENDFORM. " SUB_CREATE_SES


CALL FUNCTION 'BDC_CLOSE_GROUP' ....

Read only

Former Member
0 Likes
1,483

Hi

Good

multiple transaction is possible using session method.

Have one BDC_OPEN_GROUP, multiple BDC_INSERT s and one BDC_CLOSE_GROUP.

You should have multiple BDC_INSERT s for multiple transactions.

call function BDC_OPENGROUP.

Build BDC data and cal lBDC_INSERT for transaction 1

Build BDC data and cal lBDC_INSERT for transaction 2

Build BDC data and cal lBDC_INSERT for transaction 3

paas the tcodes to bdc_insert.

call function BDC_CLOSE_GROUP.

Thanks

mrutyun^

Read only

0 Likes
1,483

Hi mrutyun,

Thanks for your response but can we use same Call transcation statement for different transactions.

Like Call Transction for XK01 using BDCDATA1

Call Transction for MM01 using BDCDATA2

Call Transction for VA01 using BDCDATA3

Please advise.

regards

Krishna