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: 

"LEAVE TO TRANSACTION" is not allowed in batch input FB01

Former Member
0 Kudos

Hello All,

I'm trying to create BDC session on F-02 transaction,

As per the requirement, i need set editing options,before posing the entries , using fast entry screen sequence, so i was calling BDC_insert twice with 'f-02'.

First time to make setting and second time for the transaction data within open_group , close_group.

When i'm trying to process the session, i'm getting error as <i><b>'LEAVE TO TRANSACTION" is not allowed in batch input FB01'</b></i>.

Can anyone help me how to resolve the issue.

Thanks,

Santosh

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Santosh,

That is not the correct way to do it. If you want to set the "Editing Options", do a BDC for the transaction FB00. Then you do a BDC for your F-02. In F-02, when you go to the menu and select "Editing Options", what is happening in the code is that it is doing a call transaction to FB00. That is why it is causing the error. Do seperate BDC for both and you should be fine. You don't need to do FB00 everytime you are doing F-02. Just do FB00 once, and that will hold true for the entire time. Then do all your F-02 transactions.

Hope this helps and <b>please don't forget to close the post, if resolved</b>.

Srinivas

7 REPLIES 7

Former Member
0 Kudos

Santosh,

I am not clear why you have written LEAVE to TRANSACTION in a BDC program. That is to go to a transaction from a report or a dialog program.

You need to use a CALL TRANSACTION.

Regards,

Ravi

Note : Please reward posts that are helpful.

0 Kudos

Hello Ravi,

I haven't used 'Leave to transaction ' in BDC , it is the error which i'm getting while session is processing in SM35.

In program i used BDc-insert function module twice with transaction f-02 , once to make the setting and other time to pass the transaction data to create document.

Requirement was to make fast entry screen setting for

f-02 transaction and then make postings using the same. Since the fast entry screen of f-02 trn of stnd SAP is need to need to be changed.

Please help me, requirement is something like, we are calling 2 different transaction in one single bdc, updating vendor and customer data in one single bdc session processing.

Thanks,

Santosh.

Former Member
0 Kudos

Hi Santosh,

Each session corresponds to a LUW (Logical Unit of Work). So you cannot have two in a single session.

What you can do is,

Have the first LUW for fast entry and the second for posting entries....

The sessions need to be processed in the same order.

Regards,

Raj

andreas_mann3
Active Contributor
0 Kudos

Hi,

use bapi or rfbibl00 for your requirement.

sooner or later you'll get problems with your bdc on fb01 and f-02.

regards Andreas

Former Member
0 Kudos

Hi Santosh - you can get this error if you try to press the back, cancel or exit button on the first screen.

But why are you trying to do this in two calls to the same transaction. You should be able to do everything in one call.

But why do it at all. You could ensure the settings are correct before executing the BDC.

Rob

Former Member
0 Kudos

Hi Santosh,

That is not the correct way to do it. If you want to set the "Editing Options", do a BDC for the transaction FB00. Then you do a BDC for your F-02. In F-02, when you go to the menu and select "Editing Options", what is happening in the code is that it is doing a call transaction to FB00. That is why it is causing the error. Do seperate BDC for both and you should be fine. You don't need to do FB00 everytime you are doing F-02. Just do FB00 once, and that will hold true for the entire time. Then do all your F-02 transactions.

Hope this helps and <b>please don't forget to close the post, if resolved</b>.

Srinivas

Former Member
0 Kudos

Thanks All,

Problem is solved.out of all answers Srinivas Adavi answer is the correct one and exactly solves the problem.

I reward with the points, thank you very much srinivas adavi.

Bye..

Santosh