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: 

BDC Session Method

Former Member
0 Kudos

Hi,

I use Call Transaction & BDC Session in the same program so as to capture the Error Transaction (Error in Call Transaction) into BDC Session Method. For some reason, BDC session always creates 1 session, but my BDCDATA table has records for more than 1 transaction. I am not sure what is missing in the BDC Session method. Please advice.

Appreciate your help in advance.

Thanks,

Kannan

1 ACCEPTED SOLUTION

naimesh_patel
Active Contributor
0 Kudos

May be you are getting only one error from the CALL Transaction.

Or, you are closing the Session after each BDC_INSERT. You must call the BDC_CLOSE after all BDC_INSERT. So, call the BDC_INSERT just after the ENDLOOP of the main LOOP.

Regards,

Naimesh Patel

5 REPLIES 5

naimesh_patel
Active Contributor
0 Kudos

May be you are getting only one error from the CALL Transaction.

Or, you are closing the Session after each BDC_INSERT. You must call the BDC_CLOSE after all BDC_INSERT. So, call the BDC_INSERT just after the ENDLOOP of the main LOOP.

Regards,

Naimesh Patel

0 Kudos

Hi

Thanks for your reply.

1. First I use call transaction using BDCDATA.

2. If Call transaction encounters Error

3. append lines of BDCDATA to BDCDATAX.

4. After all the records are called using call Transaction, Check the table BDCDATAX not Iniital.

5. BDC_OPEN_GROUP.

6. BDC_INSERT with BDCDATAX

7. BDC_CLOSE_GROUP.

Here the BDCDATAX data for 2 call transaction Errors. It should create 1 session with 2 Transactions.

Please let mem know what i am missing.

Thanks,

Kannan.

0 Kudos

What is happening in your design, you are passing the BDC_INSERT will all the values. and It is only processing the first transaction because it doesn't find starting of the next transaction.

In this sceanario, What I am doing is:

1. First I use call transaction using BDCDATA.

2. If Call transaction encounters Error

3. If it is the first time, Call BDC_OPEN_GROUP.

4. Call the BDC_INSERT with BDCDATA

5. After all the records are called using call Transaction, After the loop BDC_CLOSE_GROUP.

Regards,

Naimesh Patel

0 Kudos

Hi,

Thanks for your reply. But theuser donot want to see 100 Error Sessions in SM35 for 100 erros in calltransaction. Instead thye want to see only 1 BDC Session with 100 transactions in it. They can go to that 1 BDC Session in SM35 and process them for all Transaction.

Can I make this logic working in BDC Session Method? Appreciate Your Help in Advance.

Thanks,

Kannan

0 Kudos

I think you need to change your Recording in a such a way that it will come to the first screen of the next transaction.

E.g. If you create Sales Order in VA01, system will not go back to the main screen when you sucessfully created the Sales Order.You have to include this step in the recording to go back to the main screen.

The advantage of insertting individual transactions is you can have the individual processing status and you can easily find out which transaction went wrong and why from the field list values.

Regards,

Naimesh Patel