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

regarding LSMW error

Former Member
0 Likes
755

Hi all,

i am doing an lsmw for a custom transaction. Problem is the when we press back its calling

WHEN 'BACK' OR 'EXIT' OR 'CANC'.

CLEAR OK_CODE.

LEAVE TO TRANSACTION 'ZP241'.

so when i m running the LSMW and pressing back button, i am getting error as a pop up

'LEAVE TO TRANSACTION' IS NOT ALLOWED IN BATCH I/P.

And eventually my session is getting failed.

regards,

satya

1 ACCEPTED SOLUTION
Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
685

Since you are dealing with custom code, I highly recommend you change it to better support your LSMW.

Batch input process transactions, so, once the first one is done, LEAVE TO TRANSACTION will be another transaction and therefore not supported.

Rearrange your ok_code case statement and run multiple LSMW sessions for the different transactions (or replace leave to transaction to LEAVE to screen (of the other transaction) , thus keeping it all in the same "transaction".

Good luck,

Leonardo De Araujo

4 REPLIES 4
Read only

LeonardoAraujo
SAP Mentor
SAP Mentor
0 Likes
686

Since you are dealing with custom code, I highly recommend you change it to better support your LSMW.

Batch input process transactions, so, once the first one is done, LEAVE TO TRANSACTION will be another transaction and therefore not supported.

Rearrange your ok_code case statement and run multiple LSMW sessions for the different transactions (or replace leave to transaction to LEAVE to screen (of the other transaction) , thus keeping it all in the same "transaction".

Good luck,

Leonardo De Araujo

Read only

0 Likes
685

Hi Leonardo,

We cant change the code. Is there any other option.

regards,

satya

Read only

0 Likes
685

Unfortunately I don't see another way.

If it is custom code, you should be able to change it (and correct it).

Leonardo

Read only

Former Member
0 Likes
685

Thanks