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: 

2 call transaction in BDC program

Former Member
0 Kudos
95

Can any one give the sample code on BDC with 2 CALL TRANSACTION's one for insert to DB and another for updating. i.e xd01 and xd02.

1 REPLY 1

naveen_inuganti2
Active Contributor
0 Kudos
36

Hi......

For any two transactions..... TC1 and TC2.

Folow these steps...

1. Prepare the flat files (if you want to update data from flat files...)

2. Declare two upload internal tables and two bdc internal tables.

3. Also declare the message internal table

4. Now loop the internal table one which is for first transaction.

( Here the tables comes under this transaction must be update before second transaction tables update,

For example CO01 transaction should be run first before running of CO11.., Because CO11 is for Order confirmation.. Order confirmation must be done only after Order creation and release which can be handle by CO01...)

5. With in the loop we are having recording strings with performs to update bdctable.

6. After the loop write call transaction syntax.

7. repeat 4, 5, 6 steps for second transaction.

8. Handle the errors in messtab.

Thats it!

If you got any break in development part get back here.

Remember the main advantage of running multiple transaction with call transaction is its one step method.... i.e formatting and assigning to SAP lay out can be done in one step.

If it is the session method two sessions wl create for same procedure... As we know we cant run two sessions paralely...

Thanks,

Naveen.I