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

how can we use multiple transactions by using bdc_insert.

Former Member
0 Likes
951

hi,

how can we use multiple transactions by using bdc_insert.?

regards

eswar

hi,

how can we use multiple transactions by using bdc_insert.?

regards

eswar

3 REPLIES 3
Read only

Former Member
0 Likes
720

Hi,

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.

Regards

Read only

Former Member
0 Likes
720

hi,

If you want to record for two transations then you will use same method as one transation.For example if you want to execute two transations like VA01(sales order) and VL01N(delivery).Here first you can record for both transactions seperately and in the function module calling you will call BDC_INSERT two times

First function module contains Tcode as VA01 and Bdcdata table as data for the va01 transaction and second table contains tcode as VL01N and Bdcdata table conatins data which contains the record data of the delivery recorded data.

PERFORM open_batch_session USING p_sessa.

LOOP AT ltcap_int

WHERE NOT tot_inc IS initial.

ltcap_int-adj = ltcap_int-adj * -1.

CONCATENATE ltcap_int-fund '/' ltcap_int-cfc INTO zuonr.

PERFORM fill_bdc_header.

PERFORM fill_bdc_lines.

PERFORM post_entries.

PERFORM insert_batch_session USING 'FB01'.

ltcap_int-adj = ltcap_int-adj * -1.

ENDLOOP.

PERFORM close_batch_session.

  • perform start_batch_session using p_sessa.

  • Budgets

WRITE p_fy TO c_fy.

PERFORM open_batch_session USING p_sessb.

LOOP AT ltcap_int

WHERE NOT tot_inc IS initial.

PERFORM rollup_header.

PERFORM rollup_line.

PERFORM rollup_save.

PERFORM insert_batch_session USING 'FR21'.

IF NOT ltcap_int-gsef_amt IS INITIAL.

PERFORM rollup_header_gsef.

PERFORM rollup_line_gsef.

PERFORM rollup_save.

PERFORM insert_batch_session USING 'FR21'.

ENDIF.

ENDLOOP.

PERFORM close_batch_session.

  • perform start_batch_session using p_sessb.

We can process more than 1 transactions in session method.

For this we will create the internal tables equilant to transactions and

Between BDC_open_group and BDC_close_group we will call the BDC_Insert the no.of transactions times and populate the internal tables which contains the data pertaining to diffrent transactions.

Read only

Former Member
0 Likes
720

If you want to record for two transations then you will use same method as one transation.For example if you want to execute two transations like VA01(sales order) and VL01N(delivery).Here first you can record for both transactions seperately and in the function module calling you will call BDC_INSERT two times

First function module contains Tcode as VA01 and Bdcdata table as data for the va01 transaction and second table contains tcode as VL01N and Bdcdata table conatins data which contains the record data of the delivery recorded data.

PERFORM open_batch_session USING p_sessa.

LOOP AT ltcap_int

WHERE NOT tot_inc IS initial.

ltcap_int-adj = ltcap_int-adj * -1.

CONCATENATE ltcap_int-fund '/' ltcap_int-cfc INTO zuonr.

PERFORM fill_bdc_header.

PERFORM fill_bdc_lines.

PERFORM post_entries.

PERFORM insert_batch_session USING 'FB01'.

ltcap_int-adj = ltcap_int-adj * -1.

ENDLOOP.

PERFORM close_batch_session.

  • perform start_batch_session using p_sessa.

  • Budgets

WRITE p_fy TO c_fy.

PERFORM open_batch_session USING p_sessb.

LOOP AT ltcap_int

WHERE NOT tot_inc IS initial.

PERFORM rollup_header.

PERFORM rollup_line.

PERFORM rollup_save.

PERFORM insert_batch_session USING 'FR21'.

IF NOT ltcap_int-gsef_amt IS INITIAL.

PERFORM rollup_header_gsef.

PERFORM rollup_line_gsef.

PERFORM rollup_save.

PERFORM insert_batch_session USING 'FR21'.

ENDIF.

ENDLOOP.

PERFORM close_batch_session.

  • perform start_batch_session using p_sessb.

We can process more than 1 transactions in session method.

For this we will create the internal tables equilant to transactions and

Between BDC_open_group and BDC_close_group we will call the BDC_Insert the no.of transactions times and populate the internal tables which contains the data pertaining to diffrent transactions.