Application Development 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: 

abt bdc

Former Member
0 Kudos

i want to process two transaction codes in bdc,is it possible?

if it is possible,then how? plz giv me reply asap.

n one more doubt,for 2 t.codes,v prepare only one excel sheet naa or nt

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hI

You can not use CALL TRANSACTION method for two TOCDEs simultaneously. If u want to process two tcodes one after another then u have to go for BDC session method.

To do it..

Fill ur bdc_tab with entries of PA10 transaction screens and fields and then PA30 transaction screens and fields. Use SHDB for recording for easiness.

Then u can Create session session with this BDC_TAB and process as u want .

using SUBMIT or SM35.

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.

2 REPLIES 2

Former Member
0 Kudos

hI

You can not use CALL TRANSACTION method for two TOCDEs simultaneously. If u want to process two tcodes one after another then u have to go for BDC session method.

To do it..

Fill ur bdc_tab with entries of PA10 transaction screens and fields and then PA30 transaction screens and fields. Use SHDB for recording for easiness.

Then u can Create session session with this BDC_TAB and process as u want .

using SUBMIT or SM35.

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.

0 Kudos

Naresh - you can process more than one transaction in a program using CALL TRANSACTION. In fact that is one of the benefits of CALL TRANSACTION. You can test the results of one session and decide how to process the next one based on the earlier results.

Rob