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

Batch-Input before COMMIT?

Former Member
0 Likes
705

Hi,

I have a question corresponding to an IDOC-interface to an external system in the module WM. I use the WMTOCO-IDOC and its two User-Exits to handle special operations that have to be done before and after the confirmation (which is made by SAP) of a transport order (TO).

Now my problem is: in this User-Exit I have to create a new TO and if all operations (also by SAP) are successfull, I should also print this new generated TO. To print a TO I want to read the customizing-settings via a function module and after that I plan to use Batch-Input (Direct Input in a CALL TRANSACTION) for LT31.

As I should print it only if there were no errors before occured, I plan to start this CALL TRANSACTION-call in the user-exit that is used for error-handling. But the final COMMIT WORK is done by the SAP after the second user exit. So the new generated TO doesn't really exist in this moment on the database, isn't it?

How can I handle this situation so that I can print the new transport order via transaction-call. Do you have any hints or tips?

Thank you much

Greets

JetGum

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

I don't know if this is your problem, but are you calling CALL TRANSACTION with OPTIONS and then put the field RACOMMIT = 'X' (then the batch input won't terminate after the commit work)?

Maybe you should try this...

Jen

3 REPLIES 3
Read only

Former Member
0 Likes
583

I don't know if this is your problem, but are you calling CALL TRANSACTION with OPTIONS and then put the field RACOMMIT = 'X' (then the batch input won't terminate after the commit work)?

Maybe you should try this...

Jen

Read only

0 Likes
582

Hi Jen,

the problem is that I want to use a transaction that needs data (TO number) that I created already but I don't called a COMMIT, see following structure (simplified):



* Creating TO
PERFORM create_new_transport_order CHANGING lv_generated_to_num.

CALL TRANSACTION LT31 WITH lv_generated_to_num.

<....>

COMMIT WORK.

Is it possible to call a transaction with data that is not really in the database yet? That's my question/problem.

Thanks

Read only

0 Likes
582

I think you should create the TO in database and after call the transaction, because if not, the order won't exist in the tables..

how do you create the TO? maybe you can create the TO and after you can do the commit work and then call the transaction (and the second commit work).